From db1c229e453fc86e2bdc72ca10e22fc896b7e494 Mon Sep 17 00:00:00 2001 From: Dan Ramich Date: Thu, 4 Apr 2019 13:37:41 -0700 Subject: [PATCH] Generated fakes --- .../zz_generated_daemon_set_mock_test.go | 1357 +++++++++++++++++ .../zz_generated_deployment_mock_test.go | 1357 +++++++++++++++++ .../zz_generated_replica_set_mock_test.go | 1357 +++++++++++++++++ .../zz_generated_stateful_set_mock_test.go | 1357 +++++++++++++++++ .../zz_generated_daemon_set_controller.go | 2 +- .../zz_generated_deployment_controller.go | 2 +- .../zz_generated_replica_set_controller.go | 2 +- apis/apps/v1beta2/zz_generated_scheme.go | 2 + .../zz_generated_stateful_set_controller.go | 2 +- .../v1/fakes/zz_generated_job_mock_test.go | 1357 +++++++++++++++++ apis/batch/v1/zz_generated_job_controller.go | 2 +- apis/batch/v1/zz_generated_scheme.go | 2 + .../fakes/zz_generated_cron_job_mock_test.go | 1357 +++++++++++++++++ .../zz_generated_cron_job_controller.go | 2 +- apis/batch/v1beta1/zz_generated_scheme.go | 2 + ..._generated_cluster_auth_token_mock_test.go | 1356 ++++++++++++++++ ...erated_cluster_user_attribute_mock_test.go | 1356 ++++++++++++++++ ...generated_cluster_auth_token_controller.go | 2 +- ...rated_cluster_user_attribute_controller.go | 2 +- .../v3/zz_generated_scheme.go | 2 + ...zz_generated_component_status_mock_test.go | 1357 +++++++++++++++++ .../zz_generated_config_map_mock_test.go | 1357 +++++++++++++++++ .../fakes/zz_generated_endpoints_mock_test.go | 1357 +++++++++++++++++ .../v1/fakes/zz_generated_event_mock_test.go | 1357 +++++++++++++++++ .../zz_generated_limit_range_mock_test.go | 1357 +++++++++++++++++ .../fakes/zz_generated_namespace_mock_test.go | 1357 +++++++++++++++++ .../v1/fakes/zz_generated_node_mock_test.go | 1357 +++++++++++++++++ ...rated_persistent_volume_claim_mock_test.go | 1357 +++++++++++++++++ .../v1/fakes/zz_generated_pod_mock_test.go | 1357 +++++++++++++++++ ...erated_replication_controller_mock_test.go | 1357 +++++++++++++++++ .../zz_generated_resource_quota_mock_test.go | 1357 +++++++++++++++++ .../v1/fakes/zz_generated_secret_mock_test.go | 1357 +++++++++++++++++ .../zz_generated_service_account_mock_test.go | 1357 +++++++++++++++++ .../fakes/zz_generated_service_mock_test.go | 1357 +++++++++++++++++ ...z_generated_component_status_controller.go | 2 +- .../v1/zz_generated_config_map_controller.go | 2 +- .../v1/zz_generated_endpoints_controller.go | 2 +- apis/core/v1/zz_generated_event_controller.go | 2 +- .../v1/zz_generated_limit_range_controller.go | 2 +- .../v1/zz_generated_namespace_controller.go | 2 +- apis/core/v1/zz_generated_node_controller.go | 2 +- ...ated_persistent_volume_claim_controller.go | 2 +- apis/core/v1/zz_generated_pod_controller.go | 2 +- ...rated_replication_controller_controller.go | 2 +- .../zz_generated_resource_quota_controller.go | 2 +- apis/core/v1/zz_generated_scheme.go | 2 + .../core/v1/zz_generated_secret_controller.go | 2 +- ...zz_generated_service_account_controller.go | 2 +- .../v1/zz_generated_service_controller.go | 2 +- .../fakes/zz_generated_ingress_mock_test.go | 1357 +++++++++++++++++ ...generated_pod_security_policy_mock_test.go | 1357 +++++++++++++++++ .../zz_generated_ingress_controller.go | 2 +- ...enerated_pod_security_policy_controller.go | 2 +- .../extensions/v1beta1/zz_generated_scheme.go | 2 + .../zz_generated_auth_config_mock_test.go | 1356 ++++++++++++++++ .../fakes/zz_generated_catalog_mock_test.go | 1356 ++++++++++++++++ ...zz_generated_catalog_template_mock_test.go | 1356 ++++++++++++++++ ...ated_catalog_template_version_mock_test.go | 1356 ++++++++++++++++ ...zz_generated_cloud_credential_mock_test.go | 1356 ++++++++++++++++ ...generated_cluster_alert_group_mock_test.go | 1356 ++++++++++++++++ .../zz_generated_cluster_alert_mock_test.go | 1356 ++++++++++++++++ ..._generated_cluster_alert_rule_mock_test.go | 1356 ++++++++++++++++ .../zz_generated_cluster_catalog_mock_test.go | 1356 ++++++++++++++++ .../zz_generated_cluster_logging_mock_test.go | 1356 ++++++++++++++++ .../fakes/zz_generated_cluster_mock_test.go | 1356 ++++++++++++++++ ...nerated_cluster_monitor_graph_mock_test.go | 1356 ++++++++++++++++ ...ed_cluster_registration_token_mock_test.go | 1356 ++++++++++++++++ ...cluster_role_template_binding_mock_test.go | 1356 ++++++++++++++++ .../zz_generated_compose_config_mock_test.go | 1356 ++++++++++++++++ .../zz_generated_dynamic_schema_mock_test.go | 1356 ++++++++++++++++ .../zz_generated_etcd_backup_mock_test.go | 1356 ++++++++++++++++ .../zz_generated_global_dns_mock_test.go | 1356 ++++++++++++++++ ...generated_global_dns_provider_mock_test.go | 1356 ++++++++++++++++ ...generated_global_role_binding_mock_test.go | 1356 ++++++++++++++++ .../zz_generated_global_role_mock_test.go | 1356 ++++++++++++++++ .../zz_generated_group_member_mock_test.go | 1356 ++++++++++++++++ .../v3/fakes/zz_generated_group_mock_test.go | 1356 ++++++++++++++++ ...zz_generated_kontainer_driver_mock_test.go | 1356 ++++++++++++++++ .../zz_generated_ldap_config_mock_test.go | 1356 ++++++++++++++++ .../zz_generated_listen_config_mock_test.go | 1356 ++++++++++++++++ .../zz_generated_monitor_metric_mock_test.go | 1356 ++++++++++++++++ ...z_generated_multi_cluster_app_mock_test.go | 1356 ++++++++++++++++ ...ed_multi_cluster_app_revision_mock_test.go | 1356 ++++++++++++++++ .../zz_generated_node_driver_mock_test.go | 1356 ++++++++++++++++ .../v3/fakes/zz_generated_node_mock_test.go | 1356 ++++++++++++++++ .../fakes/zz_generated_node_pool_mock_test.go | 1356 ++++++++++++++++ .../zz_generated_node_template_mock_test.go | 1356 ++++++++++++++++ .../fakes/zz_generated_notifier_mock_test.go | 1356 ++++++++++++++++ ..._pod_security_policy_template_mock_test.go | 1356 ++++++++++++++++ ...licy_template_project_binding_mock_test.go | 1356 ++++++++++++++++ .../zz_generated_preference_mock_test.go | 1356 ++++++++++++++++ .../fakes/zz_generated_principal_mock_test.go | 1356 ++++++++++++++++ ...generated_project_alert_group_mock_test.go | 1356 ++++++++++++++++ .../zz_generated_project_alert_mock_test.go | 1356 ++++++++++++++++ ..._generated_project_alert_rule_mock_test.go | 1356 ++++++++++++++++ .../zz_generated_project_catalog_mock_test.go | 1356 ++++++++++++++++ .../zz_generated_project_logging_mock_test.go | 1356 ++++++++++++++++ .../fakes/zz_generated_project_mock_test.go | 1356 ++++++++++++++++ ...nerated_project_monitor_graph_mock_test.go | 1356 ++++++++++++++++ ...erated_project_network_policy_mock_test.go | 1356 ++++++++++++++++ ...project_role_template_binding_mock_test.go | 1356 ++++++++++++++++ .../zz_generated_role_template_mock_test.go | 1356 ++++++++++++++++ .../fakes/zz_generated_setting_mock_test.go | 1356 ++++++++++++++++ ...zz_generated_template_content_mock_test.go | 1356 ++++++++++++++++ .../fakes/zz_generated_template_mock_test.go | 1356 ++++++++++++++++ ...zz_generated_template_version_mock_test.go | 1356 ++++++++++++++++ .../v3/fakes/zz_generated_token_mock_test.go | 1356 ++++++++++++++++ .../zz_generated_user_attribute_mock_test.go | 1356 ++++++++++++++++ .../v3/fakes/zz_generated_user_mock_test.go | 1356 ++++++++++++++++ .../v3/zz_generated_auth_config_controller.go | 2 +- .../v3/zz_generated_catalog_controller.go | 2 +- ...z_generated_catalog_template_controller.go | 2 +- ...ted_catalog_template_version_controller.go | 2 +- ...z_generated_cloud_credential_controller.go | 2 +- .../zz_generated_cluster_alert_controller.go | 2 +- ...enerated_cluster_alert_group_controller.go | 2 +- ...generated_cluster_alert_rule_controller.go | 2 +- ...zz_generated_cluster_catalog_controller.go | 2 +- .../v3/zz_generated_cluster_controller.go | 2 +- ...zz_generated_cluster_logging_controller.go | 2 +- ...erated_cluster_monitor_graph_controller.go | 2 +- ...d_cluster_registration_token_controller.go | 2 +- ...luster_role_template_binding_controller.go | 2 +- .../zz_generated_compose_config_controller.go | 2 +- .../zz_generated_dynamic_schema_controller.go | 2 +- .../v3/zz_generated_etcd_backup_controller.go | 2 +- .../v3/zz_generated_global_dns_controller.go | 2 +- ...enerated_global_dns_provider_controller.go | 2 +- ...enerated_global_role_binding_controller.go | 2 +- .../v3/zz_generated_global_role_controller.go | 2 +- .../v3/zz_generated_group_controller.go | 2 +- .../zz_generated_group_member_controller.go | 2 +- ...z_generated_kontainer_driver_controller.go | 2 +- .../v3/zz_generated_ldap_config_controller.go | 2 +- .../zz_generated_listen_config_controller.go | 2 +- .../zz_generated_monitor_metric_controller.go | 2 +- ..._generated_multi_cluster_app_controller.go | 2 +- ...d_multi_cluster_app_revision_controller.go | 2 +- .../v3/zz_generated_node_controller.go | 2 +- .../v3/zz_generated_node_driver_controller.go | 2 +- .../v3/zz_generated_node_pool_controller.go | 2 +- .../zz_generated_node_template_controller.go | 2 +- .../v3/zz_generated_notifier_controller.go | 2 +- ...pod_security_policy_template_controller.go | 2 +- ...icy_template_project_binding_controller.go | 2 +- .../v3/zz_generated_preference_controller.go | 2 +- .../v3/zz_generated_principal_controller.go | 2 +- .../zz_generated_project_alert_controller.go | 2 +- ...enerated_project_alert_group_controller.go | 2 +- ...generated_project_alert_rule_controller.go | 2 +- ...zz_generated_project_catalog_controller.go | 2 +- .../v3/zz_generated_project_controller.go | 2 +- ...zz_generated_project_logging_controller.go | 2 +- ...erated_project_monitor_graph_controller.go | 2 +- ...rated_project_network_policy_controller.go | 2 +- ...roject_role_template_binding_controller.go | 2 +- .../zz_generated_role_template_controller.go | 2 +- .../v3/zz_generated_scheme.go | 2 + .../v3/zz_generated_setting_controller.go | 2 +- ...z_generated_template_content_controller.go | 2 +- .../v3/zz_generated_template_controller.go | 2 +- ...z_generated_template_version_controller.go | 2 +- .../v3/zz_generated_token_controller.go | 2 +- .../zz_generated_user_attribute_controller.go | 2 +- .../v3/zz_generated_user_controller.go | 2 +- .../zz_generated_auth_provider_mock_test.go | 1356 ++++++++++++++++ .../zz_generated_auth_provider_controller.go | 2 +- .../v3public/zz_generated_scheme.go | 2 + .../zz_generated_alertmanager_mock_test.go | 1357 +++++++++++++++++ .../zz_generated_prometheus_mock_test.go | 1357 +++++++++++++++++ .../zz_generated_prometheus_rule_mock_test.go | 1357 +++++++++++++++++ .../zz_generated_service_monitor_mock_test.go | 1357 +++++++++++++++++ .../zz_generated_alertmanager_controller.go | 2 +- .../v1/zz_generated_prometheus_controller.go | 2 +- ...zz_generated_prometheus_rule_controller.go | 2 +- .../v1/zz_generated_scheme.go | 2 + ...zz_generated_service_monitor_controller.go | 2 +- .../zz_generated_network_policy_mock_test.go | 1357 +++++++++++++++++ .../zz_generated_network_policy_controller.go | 2 +- .../v1/zz_generated_scheme.go | 2 + .../v3/fakes/zz_generated_app_mock_test.go | 1356 ++++++++++++++++ .../zz_generated_app_revision_mock_test.go | 1356 ++++++++++++++++ .../zz_generated_basic_auth_mock_test.go | 1356 ++++++++++++++++ .../zz_generated_certificate_mock_test.go | 1356 ++++++++++++++++ ...z_generated_docker_credential_mock_test.go | 1356 ++++++++++++++++ ...nerated_namespaced_basic_auth_mock_test.go | 1356 ++++++++++++++++ ...erated_namespaced_certificate_mock_test.go | 1356 ++++++++++++++++ ..._namespaced_docker_credential_mock_test.go | 1356 ++++++++++++++++ ...espaced_service_account_token_mock_test.go | 1356 ++++++++++++++++ ...generated_namespaced_ssh_auth_mock_test.go | 1356 ++++++++++++++++ ..._generated_pipeline_execution_mock_test.go | 1356 ++++++++++++++++ .../fakes/zz_generated_pipeline_mock_test.go | 1356 ++++++++++++++++ ...zz_generated_pipeline_setting_mock_test.go | 1356 ++++++++++++++++ ...nerated_service_account_token_mock_test.go | 1356 ++++++++++++++++ ...erated_source_code_credential_mock_test.go | 1356 ++++++++++++++++ ...d_source_code_provider_config_mock_test.go | 1356 ++++++++++++++++ ...enerated_source_code_provider_mock_test.go | 1356 ++++++++++++++++ ...erated_source_code_repository_mock_test.go | 1356 ++++++++++++++++ .../fakes/zz_generated_ssh_auth_mock_test.go | 1356 ++++++++++++++++ .../fakes/zz_generated_workload_mock_test.go | 1356 ++++++++++++++++ .../v3/zz_generated_app_controller.go | 2 +- .../zz_generated_app_revision_controller.go | 2 +- .../v3/zz_generated_basic_auth_controller.go | 2 +- .../v3/zz_generated_certificate_controller.go | 2 +- ..._generated_docker_credential_controller.go | 2 +- ...erated_namespaced_basic_auth_controller.go | 2 +- ...rated_namespaced_certificate_controller.go | 2 +- ...namespaced_docker_credential_controller.go | 2 +- ...spaced_service_account_token_controller.go | 2 +- ...enerated_namespaced_ssh_auth_controller.go | 2 +- .../v3/zz_generated_pipeline_controller.go | 2 +- ...generated_pipeline_execution_controller.go | 2 +- ...z_generated_pipeline_setting_controller.go | 2 +- .../v3/zz_generated_scheme.go | 2 + ...erated_service_account_token_controller.go | 2 +- ...rated_source_code_credential_controller.go | 2 +- ..._source_code_provider_config_controller.go | 2 +- ...nerated_source_code_provider_controller.go | 2 +- ...rated_source_code_repository_controller.go | 2 +- .../v3/zz_generated_ssh_auth_controller.go | 2 +- .../v3/zz_generated_workload_controller.go | 2 +- ...enerated_cluster_role_binding_mock_test.go | 1357 +++++++++++++++++ .../zz_generated_cluster_role_mock_test.go | 1357 +++++++++++++++++ .../zz_generated_role_binding_mock_test.go | 1357 +++++++++++++++++ .../v1/fakes/zz_generated_role_mock_test.go | 1357 +++++++++++++++++ ...nerated_cluster_role_binding_controller.go | 2 +- .../zz_generated_cluster_role_controller.go | 2 +- .../zz_generated_role_binding_controller.go | 2 +- .../v1/zz_generated_role_controller.go | 2 +- .../v1/zz_generated_scheme.go | 2 + 230 files changed, 147968 insertions(+), 109 deletions(-) create mode 100644 apis/apps/v1beta2/fakes/zz_generated_daemon_set_mock_test.go create mode 100644 apis/apps/v1beta2/fakes/zz_generated_deployment_mock_test.go create mode 100644 apis/apps/v1beta2/fakes/zz_generated_replica_set_mock_test.go create mode 100644 apis/apps/v1beta2/fakes/zz_generated_stateful_set_mock_test.go create mode 100644 apis/batch/v1/fakes/zz_generated_job_mock_test.go create mode 100644 apis/batch/v1beta1/fakes/zz_generated_cron_job_mock_test.go create mode 100644 apis/cluster.cattle.io/v3/fakes/zz_generated_cluster_auth_token_mock_test.go create mode 100644 apis/cluster.cattle.io/v3/fakes/zz_generated_cluster_user_attribute_mock_test.go create mode 100644 apis/core/v1/fakes/zz_generated_component_status_mock_test.go create mode 100644 apis/core/v1/fakes/zz_generated_config_map_mock_test.go create mode 100644 apis/core/v1/fakes/zz_generated_endpoints_mock_test.go create mode 100644 apis/core/v1/fakes/zz_generated_event_mock_test.go create mode 100644 apis/core/v1/fakes/zz_generated_limit_range_mock_test.go create mode 100644 apis/core/v1/fakes/zz_generated_namespace_mock_test.go create mode 100644 apis/core/v1/fakes/zz_generated_node_mock_test.go create mode 100644 apis/core/v1/fakes/zz_generated_persistent_volume_claim_mock_test.go create mode 100644 apis/core/v1/fakes/zz_generated_pod_mock_test.go create mode 100644 apis/core/v1/fakes/zz_generated_replication_controller_mock_test.go create mode 100644 apis/core/v1/fakes/zz_generated_resource_quota_mock_test.go create mode 100644 apis/core/v1/fakes/zz_generated_secret_mock_test.go create mode 100644 apis/core/v1/fakes/zz_generated_service_account_mock_test.go create mode 100644 apis/core/v1/fakes/zz_generated_service_mock_test.go create mode 100644 apis/extensions/v1beta1/fakes/zz_generated_ingress_mock_test.go create mode 100644 apis/extensions/v1beta1/fakes/zz_generated_pod_security_policy_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_auth_config_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_catalog_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_catalog_template_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_catalog_template_version_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_cloud_credential_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_cluster_alert_group_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_cluster_alert_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_cluster_alert_rule_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_cluster_catalog_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_cluster_logging_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_cluster_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_cluster_monitor_graph_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_cluster_registration_token_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_cluster_role_template_binding_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_compose_config_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_dynamic_schema_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_etcd_backup_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_global_dns_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_global_dns_provider_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_global_role_binding_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_global_role_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_group_member_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_group_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_kontainer_driver_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_ldap_config_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_listen_config_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_monitor_metric_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_multi_cluster_app_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_multi_cluster_app_revision_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_node_driver_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_node_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_node_pool_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_node_template_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_notifier_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_pod_security_policy_template_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_pod_security_policy_template_project_binding_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_preference_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_principal_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_project_alert_group_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_project_alert_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_project_alert_rule_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_project_catalog_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_project_logging_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_project_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_project_monitor_graph_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_project_network_policy_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_project_role_template_binding_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_role_template_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_setting_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_template_content_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_template_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_template_version_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_token_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_user_attribute_mock_test.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_user_mock_test.go create mode 100644 apis/management.cattle.io/v3public/fakes/zz_generated_auth_provider_mock_test.go create mode 100644 apis/monitoring.coreos.com/v1/fakes/zz_generated_alertmanager_mock_test.go create mode 100644 apis/monitoring.coreos.com/v1/fakes/zz_generated_prometheus_mock_test.go create mode 100644 apis/monitoring.coreos.com/v1/fakes/zz_generated_prometheus_rule_mock_test.go create mode 100644 apis/monitoring.coreos.com/v1/fakes/zz_generated_service_monitor_mock_test.go create mode 100644 apis/networking.k8s.io/v1/fakes/zz_generated_network_policy_mock_test.go create mode 100644 apis/project.cattle.io/v3/fakes/zz_generated_app_mock_test.go create mode 100644 apis/project.cattle.io/v3/fakes/zz_generated_app_revision_mock_test.go create mode 100644 apis/project.cattle.io/v3/fakes/zz_generated_basic_auth_mock_test.go create mode 100644 apis/project.cattle.io/v3/fakes/zz_generated_certificate_mock_test.go create mode 100644 apis/project.cattle.io/v3/fakes/zz_generated_docker_credential_mock_test.go create mode 100644 apis/project.cattle.io/v3/fakes/zz_generated_namespaced_basic_auth_mock_test.go create mode 100644 apis/project.cattle.io/v3/fakes/zz_generated_namespaced_certificate_mock_test.go create mode 100644 apis/project.cattle.io/v3/fakes/zz_generated_namespaced_docker_credential_mock_test.go create mode 100644 apis/project.cattle.io/v3/fakes/zz_generated_namespaced_service_account_token_mock_test.go create mode 100644 apis/project.cattle.io/v3/fakes/zz_generated_namespaced_ssh_auth_mock_test.go create mode 100644 apis/project.cattle.io/v3/fakes/zz_generated_pipeline_execution_mock_test.go create mode 100644 apis/project.cattle.io/v3/fakes/zz_generated_pipeline_mock_test.go create mode 100644 apis/project.cattle.io/v3/fakes/zz_generated_pipeline_setting_mock_test.go create mode 100644 apis/project.cattle.io/v3/fakes/zz_generated_service_account_token_mock_test.go create mode 100644 apis/project.cattle.io/v3/fakes/zz_generated_source_code_credential_mock_test.go create mode 100644 apis/project.cattle.io/v3/fakes/zz_generated_source_code_provider_config_mock_test.go create mode 100644 apis/project.cattle.io/v3/fakes/zz_generated_source_code_provider_mock_test.go create mode 100644 apis/project.cattle.io/v3/fakes/zz_generated_source_code_repository_mock_test.go create mode 100644 apis/project.cattle.io/v3/fakes/zz_generated_ssh_auth_mock_test.go create mode 100644 apis/project.cattle.io/v3/fakes/zz_generated_workload_mock_test.go create mode 100644 apis/rbac.authorization.k8s.io/v1/fakes/zz_generated_cluster_role_binding_mock_test.go create mode 100644 apis/rbac.authorization.k8s.io/v1/fakes/zz_generated_cluster_role_mock_test.go create mode 100644 apis/rbac.authorization.k8s.io/v1/fakes/zz_generated_role_binding_mock_test.go create mode 100644 apis/rbac.authorization.k8s.io/v1/fakes/zz_generated_role_mock_test.go diff --git a/apis/apps/v1beta2/fakes/zz_generated_daemon_set_mock_test.go b/apis/apps/v1beta2/fakes/zz_generated_daemon_set_mock_test.go new file mode 100644 index 00000000..aeb65670 --- /dev/null +++ b/apis/apps/v1beta2/fakes/zz_generated_daemon_set_mock_test.go @@ -0,0 +1,1357 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v1beta2a "github.com/rancher/types/apis/apps/v1beta2" + v1beta2 "k8s.io/api/apps/v1beta2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockDaemonSetListerMockGet sync.RWMutex + lockDaemonSetListerMockList sync.RWMutex +) + +// Ensure, that DaemonSetListerMock does implement DaemonSetLister. +// If this is not the case, regenerate this file with moq. +var _ v1beta2a.DaemonSetLister = &DaemonSetListerMock{} + +// DaemonSetListerMock is a mock implementation of DaemonSetLister. +// +// func TestSomethingThatUsesDaemonSetLister(t *testing.T) { +// +// // make and configure a mocked DaemonSetLister +// mockedDaemonSetLister := &DaemonSetListerMock{ +// GetFunc: func(namespace string, name string) (*v1beta2.DaemonSet, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v1beta2.DaemonSet, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedDaemonSetLister in code that requires DaemonSetLister +// // and then make assertions. +// +// } +type DaemonSetListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v1beta2.DaemonSet, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v1beta2.DaemonSet, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *DaemonSetListerMock) Get(namespace string, name string) (*v1beta2.DaemonSet, error) { + if mock.GetFunc == nil { + panic("DaemonSetListerMock.GetFunc: method is nil but DaemonSetLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockDaemonSetListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockDaemonSetListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedDaemonSetLister.GetCalls()) +func (mock *DaemonSetListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockDaemonSetListerMockGet.RLock() + calls = mock.calls.Get + lockDaemonSetListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *DaemonSetListerMock) List(namespace string, selector labels.Selector) ([]*v1beta2.DaemonSet, error) { + if mock.ListFunc == nil { + panic("DaemonSetListerMock.ListFunc: method is nil but DaemonSetLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockDaemonSetListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockDaemonSetListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedDaemonSetLister.ListCalls()) +func (mock *DaemonSetListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockDaemonSetListerMockList.RLock() + calls = mock.calls.List + lockDaemonSetListerMockList.RUnlock() + return calls +} + +var ( + lockDaemonSetControllerMockAddClusterScopedHandler sync.RWMutex + lockDaemonSetControllerMockAddHandler sync.RWMutex + lockDaemonSetControllerMockEnqueue sync.RWMutex + lockDaemonSetControllerMockGeneric sync.RWMutex + lockDaemonSetControllerMockInformer sync.RWMutex + lockDaemonSetControllerMockLister sync.RWMutex + lockDaemonSetControllerMockStart sync.RWMutex + lockDaemonSetControllerMockSync sync.RWMutex +) + +// Ensure, that DaemonSetControllerMock does implement DaemonSetController. +// If this is not the case, regenerate this file with moq. +var _ v1beta2a.DaemonSetController = &DaemonSetControllerMock{} + +// DaemonSetControllerMock is a mock implementation of DaemonSetController. +// +// func TestSomethingThatUsesDaemonSetController(t *testing.T) { +// +// // make and configure a mocked DaemonSetController +// mockedDaemonSetController := &DaemonSetControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v1beta2a.DaemonSetHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v1beta2a.DaemonSetHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v1beta2a.DaemonSetLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedDaemonSetController in code that requires DaemonSetController +// // and then make assertions. +// +// } +type DaemonSetControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v1beta2a.DaemonSetHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v1beta2a.DaemonSetHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v1beta2a.DaemonSetLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v1beta2a.DaemonSetHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v1beta2a.DaemonSetHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *DaemonSetControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v1beta2a.DaemonSetHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("DaemonSetControllerMock.AddClusterScopedHandlerFunc: method is nil but DaemonSetController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v1beta2a.DaemonSetHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockDaemonSetControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockDaemonSetControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedDaemonSetController.AddClusterScopedHandlerCalls()) +func (mock *DaemonSetControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1beta2a.DaemonSetHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1beta2a.DaemonSetHandlerFunc + } + lockDaemonSetControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockDaemonSetControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *DaemonSetControllerMock) AddHandler(ctx context.Context, name string, handler v1beta2a.DaemonSetHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("DaemonSetControllerMock.AddHandlerFunc: method is nil but DaemonSetController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v1beta2a.DaemonSetHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockDaemonSetControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockDaemonSetControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedDaemonSetController.AddHandlerCalls()) +func (mock *DaemonSetControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v1beta2a.DaemonSetHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v1beta2a.DaemonSetHandlerFunc + } + lockDaemonSetControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockDaemonSetControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *DaemonSetControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("DaemonSetControllerMock.EnqueueFunc: method is nil but DaemonSetController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockDaemonSetControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockDaemonSetControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedDaemonSetController.EnqueueCalls()) +func (mock *DaemonSetControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockDaemonSetControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockDaemonSetControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *DaemonSetControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("DaemonSetControllerMock.GenericFunc: method is nil but DaemonSetController.Generic was just called") + } + callInfo := struct { + }{} + lockDaemonSetControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockDaemonSetControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedDaemonSetController.GenericCalls()) +func (mock *DaemonSetControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockDaemonSetControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockDaemonSetControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *DaemonSetControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("DaemonSetControllerMock.InformerFunc: method is nil but DaemonSetController.Informer was just called") + } + callInfo := struct { + }{} + lockDaemonSetControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockDaemonSetControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedDaemonSetController.InformerCalls()) +func (mock *DaemonSetControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockDaemonSetControllerMockInformer.RLock() + calls = mock.calls.Informer + lockDaemonSetControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *DaemonSetControllerMock) Lister() v1beta2a.DaemonSetLister { + if mock.ListerFunc == nil { + panic("DaemonSetControllerMock.ListerFunc: method is nil but DaemonSetController.Lister was just called") + } + callInfo := struct { + }{} + lockDaemonSetControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockDaemonSetControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedDaemonSetController.ListerCalls()) +func (mock *DaemonSetControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockDaemonSetControllerMockLister.RLock() + calls = mock.calls.Lister + lockDaemonSetControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *DaemonSetControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("DaemonSetControllerMock.StartFunc: method is nil but DaemonSetController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockDaemonSetControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockDaemonSetControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedDaemonSetController.StartCalls()) +func (mock *DaemonSetControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockDaemonSetControllerMockStart.RLock() + calls = mock.calls.Start + lockDaemonSetControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *DaemonSetControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("DaemonSetControllerMock.SyncFunc: method is nil but DaemonSetController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockDaemonSetControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockDaemonSetControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedDaemonSetController.SyncCalls()) +func (mock *DaemonSetControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockDaemonSetControllerMockSync.RLock() + calls = mock.calls.Sync + lockDaemonSetControllerMockSync.RUnlock() + return calls +} + +var ( + lockDaemonSetInterfaceMockAddClusterScopedHandler sync.RWMutex + lockDaemonSetInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockDaemonSetInterfaceMockAddHandler sync.RWMutex + lockDaemonSetInterfaceMockAddLifecycle sync.RWMutex + lockDaemonSetInterfaceMockController sync.RWMutex + lockDaemonSetInterfaceMockCreate sync.RWMutex + lockDaemonSetInterfaceMockDelete sync.RWMutex + lockDaemonSetInterfaceMockDeleteCollection sync.RWMutex + lockDaemonSetInterfaceMockDeleteNamespaced sync.RWMutex + lockDaemonSetInterfaceMockGet sync.RWMutex + lockDaemonSetInterfaceMockGetNamespaced sync.RWMutex + lockDaemonSetInterfaceMockList sync.RWMutex + lockDaemonSetInterfaceMockObjectClient sync.RWMutex + lockDaemonSetInterfaceMockUpdate sync.RWMutex + lockDaemonSetInterfaceMockWatch sync.RWMutex +) + +// Ensure, that DaemonSetInterfaceMock does implement DaemonSetInterface. +// If this is not the case, regenerate this file with moq. +var _ v1beta2a.DaemonSetInterface = &DaemonSetInterfaceMock{} + +// DaemonSetInterfaceMock is a mock implementation of DaemonSetInterface. +// +// func TestSomethingThatUsesDaemonSetInterface(t *testing.T) { +// +// // make and configure a mocked DaemonSetInterface +// mockedDaemonSetInterface := &DaemonSetInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v1beta2a.DaemonSetHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v1beta2a.DaemonSetLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v1beta2a.DaemonSetHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v1beta2a.DaemonSetLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v1beta2a.DaemonSetController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v1beta2.DaemonSet) (*v1beta2.DaemonSet, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v1beta2.DaemonSet, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v1beta2.DaemonSet, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v1beta2a.DaemonSetList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v1beta2.DaemonSet) (*v1beta2.DaemonSet, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedDaemonSetInterface in code that requires DaemonSetInterface +// // and then make assertions. +// +// } +type DaemonSetInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v1beta2a.DaemonSetHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v1beta2a.DaemonSetLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v1beta2a.DaemonSetHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v1beta2a.DaemonSetLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v1beta2a.DaemonSetController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v1beta2.DaemonSet) (*v1beta2.DaemonSet, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v1beta2.DaemonSet, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v1beta2.DaemonSet, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v1beta2a.DaemonSetList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v1beta2.DaemonSet) (*v1beta2.DaemonSet, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v1beta2a.DaemonSetHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v1beta2a.DaemonSetLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v1beta2a.DaemonSetHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v1beta2a.DaemonSetLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v1beta2.DaemonSet + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v1beta2.DaemonSet + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *DaemonSetInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v1beta2a.DaemonSetHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("DaemonSetInterfaceMock.AddClusterScopedHandlerFunc: method is nil but DaemonSetInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v1beta2a.DaemonSetHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockDaemonSetInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockDaemonSetInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedDaemonSetInterface.AddClusterScopedHandlerCalls()) +func (mock *DaemonSetInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1beta2a.DaemonSetHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1beta2a.DaemonSetHandlerFunc + } + lockDaemonSetInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockDaemonSetInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *DaemonSetInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v1beta2a.DaemonSetLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("DaemonSetInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but DaemonSetInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1beta2a.DaemonSetLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockDaemonSetInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockDaemonSetInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedDaemonSetInterface.AddClusterScopedLifecycleCalls()) +func (mock *DaemonSetInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1beta2a.DaemonSetLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1beta2a.DaemonSetLifecycle + } + lockDaemonSetInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockDaemonSetInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *DaemonSetInterfaceMock) AddHandler(ctx context.Context, name string, sync v1beta2a.DaemonSetHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("DaemonSetInterfaceMock.AddHandlerFunc: method is nil but DaemonSetInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v1beta2a.DaemonSetHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockDaemonSetInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockDaemonSetInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedDaemonSetInterface.AddHandlerCalls()) +func (mock *DaemonSetInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v1beta2a.DaemonSetHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v1beta2a.DaemonSetHandlerFunc + } + lockDaemonSetInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockDaemonSetInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *DaemonSetInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v1beta2a.DaemonSetLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("DaemonSetInterfaceMock.AddLifecycleFunc: method is nil but DaemonSetInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v1beta2a.DaemonSetLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockDaemonSetInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockDaemonSetInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedDaemonSetInterface.AddLifecycleCalls()) +func (mock *DaemonSetInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v1beta2a.DaemonSetLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v1beta2a.DaemonSetLifecycle + } + lockDaemonSetInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockDaemonSetInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *DaemonSetInterfaceMock) Controller() v1beta2a.DaemonSetController { + if mock.ControllerFunc == nil { + panic("DaemonSetInterfaceMock.ControllerFunc: method is nil but DaemonSetInterface.Controller was just called") + } + callInfo := struct { + }{} + lockDaemonSetInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockDaemonSetInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedDaemonSetInterface.ControllerCalls()) +func (mock *DaemonSetInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockDaemonSetInterfaceMockController.RLock() + calls = mock.calls.Controller + lockDaemonSetInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *DaemonSetInterfaceMock) Create(in1 *v1beta2.DaemonSet) (*v1beta2.DaemonSet, error) { + if mock.CreateFunc == nil { + panic("DaemonSetInterfaceMock.CreateFunc: method is nil but DaemonSetInterface.Create was just called") + } + callInfo := struct { + In1 *v1beta2.DaemonSet + }{ + In1: in1, + } + lockDaemonSetInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockDaemonSetInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedDaemonSetInterface.CreateCalls()) +func (mock *DaemonSetInterfaceMock) CreateCalls() []struct { + In1 *v1beta2.DaemonSet +} { + var calls []struct { + In1 *v1beta2.DaemonSet + } + lockDaemonSetInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockDaemonSetInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *DaemonSetInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("DaemonSetInterfaceMock.DeleteFunc: method is nil but DaemonSetInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockDaemonSetInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockDaemonSetInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedDaemonSetInterface.DeleteCalls()) +func (mock *DaemonSetInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockDaemonSetInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockDaemonSetInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *DaemonSetInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("DaemonSetInterfaceMock.DeleteCollectionFunc: method is nil but DaemonSetInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockDaemonSetInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockDaemonSetInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedDaemonSetInterface.DeleteCollectionCalls()) +func (mock *DaemonSetInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockDaemonSetInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockDaemonSetInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *DaemonSetInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("DaemonSetInterfaceMock.DeleteNamespacedFunc: method is nil but DaemonSetInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockDaemonSetInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockDaemonSetInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedDaemonSetInterface.DeleteNamespacedCalls()) +func (mock *DaemonSetInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockDaemonSetInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockDaemonSetInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *DaemonSetInterfaceMock) Get(name string, opts v1.GetOptions) (*v1beta2.DaemonSet, error) { + if mock.GetFunc == nil { + panic("DaemonSetInterfaceMock.GetFunc: method is nil but DaemonSetInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockDaemonSetInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockDaemonSetInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedDaemonSetInterface.GetCalls()) +func (mock *DaemonSetInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockDaemonSetInterfaceMockGet.RLock() + calls = mock.calls.Get + lockDaemonSetInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *DaemonSetInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v1beta2.DaemonSet, error) { + if mock.GetNamespacedFunc == nil { + panic("DaemonSetInterfaceMock.GetNamespacedFunc: method is nil but DaemonSetInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockDaemonSetInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockDaemonSetInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedDaemonSetInterface.GetNamespacedCalls()) +func (mock *DaemonSetInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockDaemonSetInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockDaemonSetInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *DaemonSetInterfaceMock) List(opts v1.ListOptions) (*v1beta2a.DaemonSetList, error) { + if mock.ListFunc == nil { + panic("DaemonSetInterfaceMock.ListFunc: method is nil but DaemonSetInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockDaemonSetInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockDaemonSetInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedDaemonSetInterface.ListCalls()) +func (mock *DaemonSetInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockDaemonSetInterfaceMockList.RLock() + calls = mock.calls.List + lockDaemonSetInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *DaemonSetInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("DaemonSetInterfaceMock.ObjectClientFunc: method is nil but DaemonSetInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockDaemonSetInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockDaemonSetInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedDaemonSetInterface.ObjectClientCalls()) +func (mock *DaemonSetInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockDaemonSetInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockDaemonSetInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *DaemonSetInterfaceMock) Update(in1 *v1beta2.DaemonSet) (*v1beta2.DaemonSet, error) { + if mock.UpdateFunc == nil { + panic("DaemonSetInterfaceMock.UpdateFunc: method is nil but DaemonSetInterface.Update was just called") + } + callInfo := struct { + In1 *v1beta2.DaemonSet + }{ + In1: in1, + } + lockDaemonSetInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockDaemonSetInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedDaemonSetInterface.UpdateCalls()) +func (mock *DaemonSetInterfaceMock) UpdateCalls() []struct { + In1 *v1beta2.DaemonSet +} { + var calls []struct { + In1 *v1beta2.DaemonSet + } + lockDaemonSetInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockDaemonSetInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *DaemonSetInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("DaemonSetInterfaceMock.WatchFunc: method is nil but DaemonSetInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockDaemonSetInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockDaemonSetInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedDaemonSetInterface.WatchCalls()) +func (mock *DaemonSetInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockDaemonSetInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockDaemonSetInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockDaemonSetsGetterMockDaemonSets sync.RWMutex +) + +// Ensure, that DaemonSetsGetterMock does implement DaemonSetsGetter. +// If this is not the case, regenerate this file with moq. +var _ v1beta2a.DaemonSetsGetter = &DaemonSetsGetterMock{} + +// DaemonSetsGetterMock is a mock implementation of DaemonSetsGetter. +// +// func TestSomethingThatUsesDaemonSetsGetter(t *testing.T) { +// +// // make and configure a mocked DaemonSetsGetter +// mockedDaemonSetsGetter := &DaemonSetsGetterMock{ +// DaemonSetsFunc: func(namespace string) v1beta2a.DaemonSetInterface { +// panic("mock out the DaemonSets method") +// }, +// } +// +// // use mockedDaemonSetsGetter in code that requires DaemonSetsGetter +// // and then make assertions. +// +// } +type DaemonSetsGetterMock struct { + // DaemonSetsFunc mocks the DaemonSets method. + DaemonSetsFunc func(namespace string) v1beta2a.DaemonSetInterface + + // calls tracks calls to the methods. + calls struct { + // DaemonSets holds details about calls to the DaemonSets method. + DaemonSets []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// DaemonSets calls DaemonSetsFunc. +func (mock *DaemonSetsGetterMock) DaemonSets(namespace string) v1beta2a.DaemonSetInterface { + if mock.DaemonSetsFunc == nil { + panic("DaemonSetsGetterMock.DaemonSetsFunc: method is nil but DaemonSetsGetter.DaemonSets was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockDaemonSetsGetterMockDaemonSets.Lock() + mock.calls.DaemonSets = append(mock.calls.DaemonSets, callInfo) + lockDaemonSetsGetterMockDaemonSets.Unlock() + return mock.DaemonSetsFunc(namespace) +} + +// DaemonSetsCalls gets all the calls that were made to DaemonSets. +// Check the length with: +// len(mockedDaemonSetsGetter.DaemonSetsCalls()) +func (mock *DaemonSetsGetterMock) DaemonSetsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockDaemonSetsGetterMockDaemonSets.RLock() + calls = mock.calls.DaemonSets + lockDaemonSetsGetterMockDaemonSets.RUnlock() + return calls +} diff --git a/apis/apps/v1beta2/fakes/zz_generated_deployment_mock_test.go b/apis/apps/v1beta2/fakes/zz_generated_deployment_mock_test.go new file mode 100644 index 00000000..4466c0fc --- /dev/null +++ b/apis/apps/v1beta2/fakes/zz_generated_deployment_mock_test.go @@ -0,0 +1,1357 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v1beta2a "github.com/rancher/types/apis/apps/v1beta2" + v1beta2 "k8s.io/api/apps/v1beta2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockDeploymentListerMockGet sync.RWMutex + lockDeploymentListerMockList sync.RWMutex +) + +// Ensure, that DeploymentListerMock does implement DeploymentLister. +// If this is not the case, regenerate this file with moq. +var _ v1beta2a.DeploymentLister = &DeploymentListerMock{} + +// DeploymentListerMock is a mock implementation of DeploymentLister. +// +// func TestSomethingThatUsesDeploymentLister(t *testing.T) { +// +// // make and configure a mocked DeploymentLister +// mockedDeploymentLister := &DeploymentListerMock{ +// GetFunc: func(namespace string, name string) (*v1beta2.Deployment, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v1beta2.Deployment, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedDeploymentLister in code that requires DeploymentLister +// // and then make assertions. +// +// } +type DeploymentListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v1beta2.Deployment, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v1beta2.Deployment, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *DeploymentListerMock) Get(namespace string, name string) (*v1beta2.Deployment, error) { + if mock.GetFunc == nil { + panic("DeploymentListerMock.GetFunc: method is nil but DeploymentLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockDeploymentListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockDeploymentListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedDeploymentLister.GetCalls()) +func (mock *DeploymentListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockDeploymentListerMockGet.RLock() + calls = mock.calls.Get + lockDeploymentListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *DeploymentListerMock) List(namespace string, selector labels.Selector) ([]*v1beta2.Deployment, error) { + if mock.ListFunc == nil { + panic("DeploymentListerMock.ListFunc: method is nil but DeploymentLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockDeploymentListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockDeploymentListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedDeploymentLister.ListCalls()) +func (mock *DeploymentListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockDeploymentListerMockList.RLock() + calls = mock.calls.List + lockDeploymentListerMockList.RUnlock() + return calls +} + +var ( + lockDeploymentControllerMockAddClusterScopedHandler sync.RWMutex + lockDeploymentControllerMockAddHandler sync.RWMutex + lockDeploymentControllerMockEnqueue sync.RWMutex + lockDeploymentControllerMockGeneric sync.RWMutex + lockDeploymentControllerMockInformer sync.RWMutex + lockDeploymentControllerMockLister sync.RWMutex + lockDeploymentControllerMockStart sync.RWMutex + lockDeploymentControllerMockSync sync.RWMutex +) + +// Ensure, that DeploymentControllerMock does implement DeploymentController. +// If this is not the case, regenerate this file with moq. +var _ v1beta2a.DeploymentController = &DeploymentControllerMock{} + +// DeploymentControllerMock is a mock implementation of DeploymentController. +// +// func TestSomethingThatUsesDeploymentController(t *testing.T) { +// +// // make and configure a mocked DeploymentController +// mockedDeploymentController := &DeploymentControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v1beta2a.DeploymentHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v1beta2a.DeploymentHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v1beta2a.DeploymentLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedDeploymentController in code that requires DeploymentController +// // and then make assertions. +// +// } +type DeploymentControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v1beta2a.DeploymentHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v1beta2a.DeploymentHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v1beta2a.DeploymentLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v1beta2a.DeploymentHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v1beta2a.DeploymentHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *DeploymentControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v1beta2a.DeploymentHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("DeploymentControllerMock.AddClusterScopedHandlerFunc: method is nil but DeploymentController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v1beta2a.DeploymentHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockDeploymentControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockDeploymentControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedDeploymentController.AddClusterScopedHandlerCalls()) +func (mock *DeploymentControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1beta2a.DeploymentHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1beta2a.DeploymentHandlerFunc + } + lockDeploymentControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockDeploymentControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *DeploymentControllerMock) AddHandler(ctx context.Context, name string, handler v1beta2a.DeploymentHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("DeploymentControllerMock.AddHandlerFunc: method is nil but DeploymentController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v1beta2a.DeploymentHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockDeploymentControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockDeploymentControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedDeploymentController.AddHandlerCalls()) +func (mock *DeploymentControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v1beta2a.DeploymentHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v1beta2a.DeploymentHandlerFunc + } + lockDeploymentControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockDeploymentControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *DeploymentControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("DeploymentControllerMock.EnqueueFunc: method is nil but DeploymentController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockDeploymentControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockDeploymentControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedDeploymentController.EnqueueCalls()) +func (mock *DeploymentControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockDeploymentControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockDeploymentControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *DeploymentControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("DeploymentControllerMock.GenericFunc: method is nil but DeploymentController.Generic was just called") + } + callInfo := struct { + }{} + lockDeploymentControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockDeploymentControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedDeploymentController.GenericCalls()) +func (mock *DeploymentControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockDeploymentControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockDeploymentControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *DeploymentControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("DeploymentControllerMock.InformerFunc: method is nil but DeploymentController.Informer was just called") + } + callInfo := struct { + }{} + lockDeploymentControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockDeploymentControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedDeploymentController.InformerCalls()) +func (mock *DeploymentControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockDeploymentControllerMockInformer.RLock() + calls = mock.calls.Informer + lockDeploymentControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *DeploymentControllerMock) Lister() v1beta2a.DeploymentLister { + if mock.ListerFunc == nil { + panic("DeploymentControllerMock.ListerFunc: method is nil but DeploymentController.Lister was just called") + } + callInfo := struct { + }{} + lockDeploymentControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockDeploymentControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedDeploymentController.ListerCalls()) +func (mock *DeploymentControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockDeploymentControllerMockLister.RLock() + calls = mock.calls.Lister + lockDeploymentControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *DeploymentControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("DeploymentControllerMock.StartFunc: method is nil but DeploymentController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockDeploymentControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockDeploymentControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedDeploymentController.StartCalls()) +func (mock *DeploymentControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockDeploymentControllerMockStart.RLock() + calls = mock.calls.Start + lockDeploymentControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *DeploymentControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("DeploymentControllerMock.SyncFunc: method is nil but DeploymentController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockDeploymentControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockDeploymentControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedDeploymentController.SyncCalls()) +func (mock *DeploymentControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockDeploymentControllerMockSync.RLock() + calls = mock.calls.Sync + lockDeploymentControllerMockSync.RUnlock() + return calls +} + +var ( + lockDeploymentInterfaceMockAddClusterScopedHandler sync.RWMutex + lockDeploymentInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockDeploymentInterfaceMockAddHandler sync.RWMutex + lockDeploymentInterfaceMockAddLifecycle sync.RWMutex + lockDeploymentInterfaceMockController sync.RWMutex + lockDeploymentInterfaceMockCreate sync.RWMutex + lockDeploymentInterfaceMockDelete sync.RWMutex + lockDeploymentInterfaceMockDeleteCollection sync.RWMutex + lockDeploymentInterfaceMockDeleteNamespaced sync.RWMutex + lockDeploymentInterfaceMockGet sync.RWMutex + lockDeploymentInterfaceMockGetNamespaced sync.RWMutex + lockDeploymentInterfaceMockList sync.RWMutex + lockDeploymentInterfaceMockObjectClient sync.RWMutex + lockDeploymentInterfaceMockUpdate sync.RWMutex + lockDeploymentInterfaceMockWatch sync.RWMutex +) + +// Ensure, that DeploymentInterfaceMock does implement DeploymentInterface. +// If this is not the case, regenerate this file with moq. +var _ v1beta2a.DeploymentInterface = &DeploymentInterfaceMock{} + +// DeploymentInterfaceMock is a mock implementation of DeploymentInterface. +// +// func TestSomethingThatUsesDeploymentInterface(t *testing.T) { +// +// // make and configure a mocked DeploymentInterface +// mockedDeploymentInterface := &DeploymentInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v1beta2a.DeploymentHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v1beta2a.DeploymentLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v1beta2a.DeploymentHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v1beta2a.DeploymentLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v1beta2a.DeploymentController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v1beta2.Deployment) (*v1beta2.Deployment, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v1beta2.Deployment, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v1beta2.Deployment, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v1beta2a.DeploymentList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v1beta2.Deployment) (*v1beta2.Deployment, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedDeploymentInterface in code that requires DeploymentInterface +// // and then make assertions. +// +// } +type DeploymentInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v1beta2a.DeploymentHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v1beta2a.DeploymentLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v1beta2a.DeploymentHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v1beta2a.DeploymentLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v1beta2a.DeploymentController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v1beta2.Deployment) (*v1beta2.Deployment, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v1beta2.Deployment, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v1beta2.Deployment, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v1beta2a.DeploymentList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v1beta2.Deployment) (*v1beta2.Deployment, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v1beta2a.DeploymentHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v1beta2a.DeploymentLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v1beta2a.DeploymentHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v1beta2a.DeploymentLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v1beta2.Deployment + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v1beta2.Deployment + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *DeploymentInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v1beta2a.DeploymentHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("DeploymentInterfaceMock.AddClusterScopedHandlerFunc: method is nil but DeploymentInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v1beta2a.DeploymentHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockDeploymentInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockDeploymentInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedDeploymentInterface.AddClusterScopedHandlerCalls()) +func (mock *DeploymentInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1beta2a.DeploymentHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1beta2a.DeploymentHandlerFunc + } + lockDeploymentInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockDeploymentInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *DeploymentInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v1beta2a.DeploymentLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("DeploymentInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but DeploymentInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1beta2a.DeploymentLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockDeploymentInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockDeploymentInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedDeploymentInterface.AddClusterScopedLifecycleCalls()) +func (mock *DeploymentInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1beta2a.DeploymentLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1beta2a.DeploymentLifecycle + } + lockDeploymentInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockDeploymentInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *DeploymentInterfaceMock) AddHandler(ctx context.Context, name string, sync v1beta2a.DeploymentHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("DeploymentInterfaceMock.AddHandlerFunc: method is nil but DeploymentInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v1beta2a.DeploymentHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockDeploymentInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockDeploymentInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedDeploymentInterface.AddHandlerCalls()) +func (mock *DeploymentInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v1beta2a.DeploymentHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v1beta2a.DeploymentHandlerFunc + } + lockDeploymentInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockDeploymentInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *DeploymentInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v1beta2a.DeploymentLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("DeploymentInterfaceMock.AddLifecycleFunc: method is nil but DeploymentInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v1beta2a.DeploymentLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockDeploymentInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockDeploymentInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedDeploymentInterface.AddLifecycleCalls()) +func (mock *DeploymentInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v1beta2a.DeploymentLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v1beta2a.DeploymentLifecycle + } + lockDeploymentInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockDeploymentInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *DeploymentInterfaceMock) Controller() v1beta2a.DeploymentController { + if mock.ControllerFunc == nil { + panic("DeploymentInterfaceMock.ControllerFunc: method is nil but DeploymentInterface.Controller was just called") + } + callInfo := struct { + }{} + lockDeploymentInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockDeploymentInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedDeploymentInterface.ControllerCalls()) +func (mock *DeploymentInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockDeploymentInterfaceMockController.RLock() + calls = mock.calls.Controller + lockDeploymentInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *DeploymentInterfaceMock) Create(in1 *v1beta2.Deployment) (*v1beta2.Deployment, error) { + if mock.CreateFunc == nil { + panic("DeploymentInterfaceMock.CreateFunc: method is nil but DeploymentInterface.Create was just called") + } + callInfo := struct { + In1 *v1beta2.Deployment + }{ + In1: in1, + } + lockDeploymentInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockDeploymentInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedDeploymentInterface.CreateCalls()) +func (mock *DeploymentInterfaceMock) CreateCalls() []struct { + In1 *v1beta2.Deployment +} { + var calls []struct { + In1 *v1beta2.Deployment + } + lockDeploymentInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockDeploymentInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *DeploymentInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("DeploymentInterfaceMock.DeleteFunc: method is nil but DeploymentInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockDeploymentInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockDeploymentInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedDeploymentInterface.DeleteCalls()) +func (mock *DeploymentInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockDeploymentInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockDeploymentInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *DeploymentInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("DeploymentInterfaceMock.DeleteCollectionFunc: method is nil but DeploymentInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockDeploymentInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockDeploymentInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedDeploymentInterface.DeleteCollectionCalls()) +func (mock *DeploymentInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockDeploymentInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockDeploymentInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *DeploymentInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("DeploymentInterfaceMock.DeleteNamespacedFunc: method is nil but DeploymentInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockDeploymentInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockDeploymentInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedDeploymentInterface.DeleteNamespacedCalls()) +func (mock *DeploymentInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockDeploymentInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockDeploymentInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *DeploymentInterfaceMock) Get(name string, opts v1.GetOptions) (*v1beta2.Deployment, error) { + if mock.GetFunc == nil { + panic("DeploymentInterfaceMock.GetFunc: method is nil but DeploymentInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockDeploymentInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockDeploymentInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedDeploymentInterface.GetCalls()) +func (mock *DeploymentInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockDeploymentInterfaceMockGet.RLock() + calls = mock.calls.Get + lockDeploymentInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *DeploymentInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v1beta2.Deployment, error) { + if mock.GetNamespacedFunc == nil { + panic("DeploymentInterfaceMock.GetNamespacedFunc: method is nil but DeploymentInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockDeploymentInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockDeploymentInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedDeploymentInterface.GetNamespacedCalls()) +func (mock *DeploymentInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockDeploymentInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockDeploymentInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *DeploymentInterfaceMock) List(opts v1.ListOptions) (*v1beta2a.DeploymentList, error) { + if mock.ListFunc == nil { + panic("DeploymentInterfaceMock.ListFunc: method is nil but DeploymentInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockDeploymentInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockDeploymentInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedDeploymentInterface.ListCalls()) +func (mock *DeploymentInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockDeploymentInterfaceMockList.RLock() + calls = mock.calls.List + lockDeploymentInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *DeploymentInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("DeploymentInterfaceMock.ObjectClientFunc: method is nil but DeploymentInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockDeploymentInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockDeploymentInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedDeploymentInterface.ObjectClientCalls()) +func (mock *DeploymentInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockDeploymentInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockDeploymentInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *DeploymentInterfaceMock) Update(in1 *v1beta2.Deployment) (*v1beta2.Deployment, error) { + if mock.UpdateFunc == nil { + panic("DeploymentInterfaceMock.UpdateFunc: method is nil but DeploymentInterface.Update was just called") + } + callInfo := struct { + In1 *v1beta2.Deployment + }{ + In1: in1, + } + lockDeploymentInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockDeploymentInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedDeploymentInterface.UpdateCalls()) +func (mock *DeploymentInterfaceMock) UpdateCalls() []struct { + In1 *v1beta2.Deployment +} { + var calls []struct { + In1 *v1beta2.Deployment + } + lockDeploymentInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockDeploymentInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *DeploymentInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("DeploymentInterfaceMock.WatchFunc: method is nil but DeploymentInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockDeploymentInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockDeploymentInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedDeploymentInterface.WatchCalls()) +func (mock *DeploymentInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockDeploymentInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockDeploymentInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockDeploymentsGetterMockDeployments sync.RWMutex +) + +// Ensure, that DeploymentsGetterMock does implement DeploymentsGetter. +// If this is not the case, regenerate this file with moq. +var _ v1beta2a.DeploymentsGetter = &DeploymentsGetterMock{} + +// DeploymentsGetterMock is a mock implementation of DeploymentsGetter. +// +// func TestSomethingThatUsesDeploymentsGetter(t *testing.T) { +// +// // make and configure a mocked DeploymentsGetter +// mockedDeploymentsGetter := &DeploymentsGetterMock{ +// DeploymentsFunc: func(namespace string) v1beta2a.DeploymentInterface { +// panic("mock out the Deployments method") +// }, +// } +// +// // use mockedDeploymentsGetter in code that requires DeploymentsGetter +// // and then make assertions. +// +// } +type DeploymentsGetterMock struct { + // DeploymentsFunc mocks the Deployments method. + DeploymentsFunc func(namespace string) v1beta2a.DeploymentInterface + + // calls tracks calls to the methods. + calls struct { + // Deployments holds details about calls to the Deployments method. + Deployments []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// Deployments calls DeploymentsFunc. +func (mock *DeploymentsGetterMock) Deployments(namespace string) v1beta2a.DeploymentInterface { + if mock.DeploymentsFunc == nil { + panic("DeploymentsGetterMock.DeploymentsFunc: method is nil but DeploymentsGetter.Deployments was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockDeploymentsGetterMockDeployments.Lock() + mock.calls.Deployments = append(mock.calls.Deployments, callInfo) + lockDeploymentsGetterMockDeployments.Unlock() + return mock.DeploymentsFunc(namespace) +} + +// DeploymentsCalls gets all the calls that were made to Deployments. +// Check the length with: +// len(mockedDeploymentsGetter.DeploymentsCalls()) +func (mock *DeploymentsGetterMock) DeploymentsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockDeploymentsGetterMockDeployments.RLock() + calls = mock.calls.Deployments + lockDeploymentsGetterMockDeployments.RUnlock() + return calls +} diff --git a/apis/apps/v1beta2/fakes/zz_generated_replica_set_mock_test.go b/apis/apps/v1beta2/fakes/zz_generated_replica_set_mock_test.go new file mode 100644 index 00000000..0520a866 --- /dev/null +++ b/apis/apps/v1beta2/fakes/zz_generated_replica_set_mock_test.go @@ -0,0 +1,1357 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v1beta2a "github.com/rancher/types/apis/apps/v1beta2" + v1beta2 "k8s.io/api/apps/v1beta2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockReplicaSetListerMockGet sync.RWMutex + lockReplicaSetListerMockList sync.RWMutex +) + +// Ensure, that ReplicaSetListerMock does implement ReplicaSetLister. +// If this is not the case, regenerate this file with moq. +var _ v1beta2a.ReplicaSetLister = &ReplicaSetListerMock{} + +// ReplicaSetListerMock is a mock implementation of ReplicaSetLister. +// +// func TestSomethingThatUsesReplicaSetLister(t *testing.T) { +// +// // make and configure a mocked ReplicaSetLister +// mockedReplicaSetLister := &ReplicaSetListerMock{ +// GetFunc: func(namespace string, name string) (*v1beta2.ReplicaSet, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v1beta2.ReplicaSet, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedReplicaSetLister in code that requires ReplicaSetLister +// // and then make assertions. +// +// } +type ReplicaSetListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v1beta2.ReplicaSet, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v1beta2.ReplicaSet, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *ReplicaSetListerMock) Get(namespace string, name string) (*v1beta2.ReplicaSet, error) { + if mock.GetFunc == nil { + panic("ReplicaSetListerMock.GetFunc: method is nil but ReplicaSetLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockReplicaSetListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockReplicaSetListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedReplicaSetLister.GetCalls()) +func (mock *ReplicaSetListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockReplicaSetListerMockGet.RLock() + calls = mock.calls.Get + lockReplicaSetListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ReplicaSetListerMock) List(namespace string, selector labels.Selector) ([]*v1beta2.ReplicaSet, error) { + if mock.ListFunc == nil { + panic("ReplicaSetListerMock.ListFunc: method is nil but ReplicaSetLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockReplicaSetListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockReplicaSetListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedReplicaSetLister.ListCalls()) +func (mock *ReplicaSetListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockReplicaSetListerMockList.RLock() + calls = mock.calls.List + lockReplicaSetListerMockList.RUnlock() + return calls +} + +var ( + lockReplicaSetControllerMockAddClusterScopedHandler sync.RWMutex + lockReplicaSetControllerMockAddHandler sync.RWMutex + lockReplicaSetControllerMockEnqueue sync.RWMutex + lockReplicaSetControllerMockGeneric sync.RWMutex + lockReplicaSetControllerMockInformer sync.RWMutex + lockReplicaSetControllerMockLister sync.RWMutex + lockReplicaSetControllerMockStart sync.RWMutex + lockReplicaSetControllerMockSync sync.RWMutex +) + +// Ensure, that ReplicaSetControllerMock does implement ReplicaSetController. +// If this is not the case, regenerate this file with moq. +var _ v1beta2a.ReplicaSetController = &ReplicaSetControllerMock{} + +// ReplicaSetControllerMock is a mock implementation of ReplicaSetController. +// +// func TestSomethingThatUsesReplicaSetController(t *testing.T) { +// +// // make and configure a mocked ReplicaSetController +// mockedReplicaSetController := &ReplicaSetControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v1beta2a.ReplicaSetHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v1beta2a.ReplicaSetHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v1beta2a.ReplicaSetLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedReplicaSetController in code that requires ReplicaSetController +// // and then make assertions. +// +// } +type ReplicaSetControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v1beta2a.ReplicaSetHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v1beta2a.ReplicaSetHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v1beta2a.ReplicaSetLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v1beta2a.ReplicaSetHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v1beta2a.ReplicaSetHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ReplicaSetControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v1beta2a.ReplicaSetHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ReplicaSetControllerMock.AddClusterScopedHandlerFunc: method is nil but ReplicaSetController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v1beta2a.ReplicaSetHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockReplicaSetControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockReplicaSetControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedReplicaSetController.AddClusterScopedHandlerCalls()) +func (mock *ReplicaSetControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1beta2a.ReplicaSetHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1beta2a.ReplicaSetHandlerFunc + } + lockReplicaSetControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockReplicaSetControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ReplicaSetControllerMock) AddHandler(ctx context.Context, name string, handler v1beta2a.ReplicaSetHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ReplicaSetControllerMock.AddHandlerFunc: method is nil but ReplicaSetController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v1beta2a.ReplicaSetHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockReplicaSetControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockReplicaSetControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedReplicaSetController.AddHandlerCalls()) +func (mock *ReplicaSetControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v1beta2a.ReplicaSetHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v1beta2a.ReplicaSetHandlerFunc + } + lockReplicaSetControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockReplicaSetControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *ReplicaSetControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("ReplicaSetControllerMock.EnqueueFunc: method is nil but ReplicaSetController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockReplicaSetControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockReplicaSetControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedReplicaSetController.EnqueueCalls()) +func (mock *ReplicaSetControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockReplicaSetControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockReplicaSetControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *ReplicaSetControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("ReplicaSetControllerMock.GenericFunc: method is nil but ReplicaSetController.Generic was just called") + } + callInfo := struct { + }{} + lockReplicaSetControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockReplicaSetControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedReplicaSetController.GenericCalls()) +func (mock *ReplicaSetControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockReplicaSetControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockReplicaSetControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *ReplicaSetControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("ReplicaSetControllerMock.InformerFunc: method is nil but ReplicaSetController.Informer was just called") + } + callInfo := struct { + }{} + lockReplicaSetControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockReplicaSetControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedReplicaSetController.InformerCalls()) +func (mock *ReplicaSetControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockReplicaSetControllerMockInformer.RLock() + calls = mock.calls.Informer + lockReplicaSetControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *ReplicaSetControllerMock) Lister() v1beta2a.ReplicaSetLister { + if mock.ListerFunc == nil { + panic("ReplicaSetControllerMock.ListerFunc: method is nil but ReplicaSetController.Lister was just called") + } + callInfo := struct { + }{} + lockReplicaSetControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockReplicaSetControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedReplicaSetController.ListerCalls()) +func (mock *ReplicaSetControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockReplicaSetControllerMockLister.RLock() + calls = mock.calls.Lister + lockReplicaSetControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *ReplicaSetControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("ReplicaSetControllerMock.StartFunc: method is nil but ReplicaSetController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockReplicaSetControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockReplicaSetControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedReplicaSetController.StartCalls()) +func (mock *ReplicaSetControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockReplicaSetControllerMockStart.RLock() + calls = mock.calls.Start + lockReplicaSetControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *ReplicaSetControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("ReplicaSetControllerMock.SyncFunc: method is nil but ReplicaSetController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockReplicaSetControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockReplicaSetControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedReplicaSetController.SyncCalls()) +func (mock *ReplicaSetControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockReplicaSetControllerMockSync.RLock() + calls = mock.calls.Sync + lockReplicaSetControllerMockSync.RUnlock() + return calls +} + +var ( + lockReplicaSetInterfaceMockAddClusterScopedHandler sync.RWMutex + lockReplicaSetInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockReplicaSetInterfaceMockAddHandler sync.RWMutex + lockReplicaSetInterfaceMockAddLifecycle sync.RWMutex + lockReplicaSetInterfaceMockController sync.RWMutex + lockReplicaSetInterfaceMockCreate sync.RWMutex + lockReplicaSetInterfaceMockDelete sync.RWMutex + lockReplicaSetInterfaceMockDeleteCollection sync.RWMutex + lockReplicaSetInterfaceMockDeleteNamespaced sync.RWMutex + lockReplicaSetInterfaceMockGet sync.RWMutex + lockReplicaSetInterfaceMockGetNamespaced sync.RWMutex + lockReplicaSetInterfaceMockList sync.RWMutex + lockReplicaSetInterfaceMockObjectClient sync.RWMutex + lockReplicaSetInterfaceMockUpdate sync.RWMutex + lockReplicaSetInterfaceMockWatch sync.RWMutex +) + +// Ensure, that ReplicaSetInterfaceMock does implement ReplicaSetInterface. +// If this is not the case, regenerate this file with moq. +var _ v1beta2a.ReplicaSetInterface = &ReplicaSetInterfaceMock{} + +// ReplicaSetInterfaceMock is a mock implementation of ReplicaSetInterface. +// +// func TestSomethingThatUsesReplicaSetInterface(t *testing.T) { +// +// // make and configure a mocked ReplicaSetInterface +// mockedReplicaSetInterface := &ReplicaSetInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v1beta2a.ReplicaSetHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v1beta2a.ReplicaSetLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v1beta2a.ReplicaSetHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v1beta2a.ReplicaSetLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v1beta2a.ReplicaSetController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v1beta2.ReplicaSet) (*v1beta2.ReplicaSet, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v1beta2.ReplicaSet, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v1beta2.ReplicaSet, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v1beta2a.ReplicaSetList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v1beta2.ReplicaSet) (*v1beta2.ReplicaSet, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedReplicaSetInterface in code that requires ReplicaSetInterface +// // and then make assertions. +// +// } +type ReplicaSetInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v1beta2a.ReplicaSetHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v1beta2a.ReplicaSetLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v1beta2a.ReplicaSetHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v1beta2a.ReplicaSetLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v1beta2a.ReplicaSetController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v1beta2.ReplicaSet) (*v1beta2.ReplicaSet, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v1beta2.ReplicaSet, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v1beta2.ReplicaSet, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v1beta2a.ReplicaSetList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v1beta2.ReplicaSet) (*v1beta2.ReplicaSet, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v1beta2a.ReplicaSetHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v1beta2a.ReplicaSetLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v1beta2a.ReplicaSetHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v1beta2a.ReplicaSetLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v1beta2.ReplicaSet + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v1beta2.ReplicaSet + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ReplicaSetInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v1beta2a.ReplicaSetHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ReplicaSetInterfaceMock.AddClusterScopedHandlerFunc: method is nil but ReplicaSetInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v1beta2a.ReplicaSetHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockReplicaSetInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockReplicaSetInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedReplicaSetInterface.AddClusterScopedHandlerCalls()) +func (mock *ReplicaSetInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1beta2a.ReplicaSetHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1beta2a.ReplicaSetHandlerFunc + } + lockReplicaSetInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockReplicaSetInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *ReplicaSetInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v1beta2a.ReplicaSetLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("ReplicaSetInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but ReplicaSetInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1beta2a.ReplicaSetLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockReplicaSetInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockReplicaSetInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedReplicaSetInterface.AddClusterScopedLifecycleCalls()) +func (mock *ReplicaSetInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1beta2a.ReplicaSetLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1beta2a.ReplicaSetLifecycle + } + lockReplicaSetInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockReplicaSetInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ReplicaSetInterfaceMock) AddHandler(ctx context.Context, name string, sync v1beta2a.ReplicaSetHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ReplicaSetInterfaceMock.AddHandlerFunc: method is nil but ReplicaSetInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v1beta2a.ReplicaSetHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockReplicaSetInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockReplicaSetInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedReplicaSetInterface.AddHandlerCalls()) +func (mock *ReplicaSetInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v1beta2a.ReplicaSetHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v1beta2a.ReplicaSetHandlerFunc + } + lockReplicaSetInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockReplicaSetInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *ReplicaSetInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v1beta2a.ReplicaSetLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("ReplicaSetInterfaceMock.AddLifecycleFunc: method is nil but ReplicaSetInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v1beta2a.ReplicaSetLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockReplicaSetInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockReplicaSetInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedReplicaSetInterface.AddLifecycleCalls()) +func (mock *ReplicaSetInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v1beta2a.ReplicaSetLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v1beta2a.ReplicaSetLifecycle + } + lockReplicaSetInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockReplicaSetInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *ReplicaSetInterfaceMock) Controller() v1beta2a.ReplicaSetController { + if mock.ControllerFunc == nil { + panic("ReplicaSetInterfaceMock.ControllerFunc: method is nil but ReplicaSetInterface.Controller was just called") + } + callInfo := struct { + }{} + lockReplicaSetInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockReplicaSetInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedReplicaSetInterface.ControllerCalls()) +func (mock *ReplicaSetInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockReplicaSetInterfaceMockController.RLock() + calls = mock.calls.Controller + lockReplicaSetInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *ReplicaSetInterfaceMock) Create(in1 *v1beta2.ReplicaSet) (*v1beta2.ReplicaSet, error) { + if mock.CreateFunc == nil { + panic("ReplicaSetInterfaceMock.CreateFunc: method is nil but ReplicaSetInterface.Create was just called") + } + callInfo := struct { + In1 *v1beta2.ReplicaSet + }{ + In1: in1, + } + lockReplicaSetInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockReplicaSetInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedReplicaSetInterface.CreateCalls()) +func (mock *ReplicaSetInterfaceMock) CreateCalls() []struct { + In1 *v1beta2.ReplicaSet +} { + var calls []struct { + In1 *v1beta2.ReplicaSet + } + lockReplicaSetInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockReplicaSetInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *ReplicaSetInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("ReplicaSetInterfaceMock.DeleteFunc: method is nil but ReplicaSetInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockReplicaSetInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockReplicaSetInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedReplicaSetInterface.DeleteCalls()) +func (mock *ReplicaSetInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockReplicaSetInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockReplicaSetInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *ReplicaSetInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("ReplicaSetInterfaceMock.DeleteCollectionFunc: method is nil but ReplicaSetInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockReplicaSetInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockReplicaSetInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedReplicaSetInterface.DeleteCollectionCalls()) +func (mock *ReplicaSetInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockReplicaSetInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockReplicaSetInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *ReplicaSetInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("ReplicaSetInterfaceMock.DeleteNamespacedFunc: method is nil but ReplicaSetInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockReplicaSetInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockReplicaSetInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedReplicaSetInterface.DeleteNamespacedCalls()) +func (mock *ReplicaSetInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockReplicaSetInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockReplicaSetInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *ReplicaSetInterfaceMock) Get(name string, opts v1.GetOptions) (*v1beta2.ReplicaSet, error) { + if mock.GetFunc == nil { + panic("ReplicaSetInterfaceMock.GetFunc: method is nil but ReplicaSetInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockReplicaSetInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockReplicaSetInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedReplicaSetInterface.GetCalls()) +func (mock *ReplicaSetInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockReplicaSetInterfaceMockGet.RLock() + calls = mock.calls.Get + lockReplicaSetInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *ReplicaSetInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v1beta2.ReplicaSet, error) { + if mock.GetNamespacedFunc == nil { + panic("ReplicaSetInterfaceMock.GetNamespacedFunc: method is nil but ReplicaSetInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockReplicaSetInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockReplicaSetInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedReplicaSetInterface.GetNamespacedCalls()) +func (mock *ReplicaSetInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockReplicaSetInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockReplicaSetInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ReplicaSetInterfaceMock) List(opts v1.ListOptions) (*v1beta2a.ReplicaSetList, error) { + if mock.ListFunc == nil { + panic("ReplicaSetInterfaceMock.ListFunc: method is nil but ReplicaSetInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockReplicaSetInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockReplicaSetInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedReplicaSetInterface.ListCalls()) +func (mock *ReplicaSetInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockReplicaSetInterfaceMockList.RLock() + calls = mock.calls.List + lockReplicaSetInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *ReplicaSetInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("ReplicaSetInterfaceMock.ObjectClientFunc: method is nil but ReplicaSetInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockReplicaSetInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockReplicaSetInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedReplicaSetInterface.ObjectClientCalls()) +func (mock *ReplicaSetInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockReplicaSetInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockReplicaSetInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *ReplicaSetInterfaceMock) Update(in1 *v1beta2.ReplicaSet) (*v1beta2.ReplicaSet, error) { + if mock.UpdateFunc == nil { + panic("ReplicaSetInterfaceMock.UpdateFunc: method is nil but ReplicaSetInterface.Update was just called") + } + callInfo := struct { + In1 *v1beta2.ReplicaSet + }{ + In1: in1, + } + lockReplicaSetInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockReplicaSetInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedReplicaSetInterface.UpdateCalls()) +func (mock *ReplicaSetInterfaceMock) UpdateCalls() []struct { + In1 *v1beta2.ReplicaSet +} { + var calls []struct { + In1 *v1beta2.ReplicaSet + } + lockReplicaSetInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockReplicaSetInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *ReplicaSetInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("ReplicaSetInterfaceMock.WatchFunc: method is nil but ReplicaSetInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockReplicaSetInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockReplicaSetInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedReplicaSetInterface.WatchCalls()) +func (mock *ReplicaSetInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockReplicaSetInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockReplicaSetInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockReplicaSetsGetterMockReplicaSets sync.RWMutex +) + +// Ensure, that ReplicaSetsGetterMock does implement ReplicaSetsGetter. +// If this is not the case, regenerate this file with moq. +var _ v1beta2a.ReplicaSetsGetter = &ReplicaSetsGetterMock{} + +// ReplicaSetsGetterMock is a mock implementation of ReplicaSetsGetter. +// +// func TestSomethingThatUsesReplicaSetsGetter(t *testing.T) { +// +// // make and configure a mocked ReplicaSetsGetter +// mockedReplicaSetsGetter := &ReplicaSetsGetterMock{ +// ReplicaSetsFunc: func(namespace string) v1beta2a.ReplicaSetInterface { +// panic("mock out the ReplicaSets method") +// }, +// } +// +// // use mockedReplicaSetsGetter in code that requires ReplicaSetsGetter +// // and then make assertions. +// +// } +type ReplicaSetsGetterMock struct { + // ReplicaSetsFunc mocks the ReplicaSets method. + ReplicaSetsFunc func(namespace string) v1beta2a.ReplicaSetInterface + + // calls tracks calls to the methods. + calls struct { + // ReplicaSets holds details about calls to the ReplicaSets method. + ReplicaSets []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// ReplicaSets calls ReplicaSetsFunc. +func (mock *ReplicaSetsGetterMock) ReplicaSets(namespace string) v1beta2a.ReplicaSetInterface { + if mock.ReplicaSetsFunc == nil { + panic("ReplicaSetsGetterMock.ReplicaSetsFunc: method is nil but ReplicaSetsGetter.ReplicaSets was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockReplicaSetsGetterMockReplicaSets.Lock() + mock.calls.ReplicaSets = append(mock.calls.ReplicaSets, callInfo) + lockReplicaSetsGetterMockReplicaSets.Unlock() + return mock.ReplicaSetsFunc(namespace) +} + +// ReplicaSetsCalls gets all the calls that were made to ReplicaSets. +// Check the length with: +// len(mockedReplicaSetsGetter.ReplicaSetsCalls()) +func (mock *ReplicaSetsGetterMock) ReplicaSetsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockReplicaSetsGetterMockReplicaSets.RLock() + calls = mock.calls.ReplicaSets + lockReplicaSetsGetterMockReplicaSets.RUnlock() + return calls +} diff --git a/apis/apps/v1beta2/fakes/zz_generated_stateful_set_mock_test.go b/apis/apps/v1beta2/fakes/zz_generated_stateful_set_mock_test.go new file mode 100644 index 00000000..58a86bb3 --- /dev/null +++ b/apis/apps/v1beta2/fakes/zz_generated_stateful_set_mock_test.go @@ -0,0 +1,1357 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v1beta2a "github.com/rancher/types/apis/apps/v1beta2" + v1beta2 "k8s.io/api/apps/v1beta2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockStatefulSetListerMockGet sync.RWMutex + lockStatefulSetListerMockList sync.RWMutex +) + +// Ensure, that StatefulSetListerMock does implement StatefulSetLister. +// If this is not the case, regenerate this file with moq. +var _ v1beta2a.StatefulSetLister = &StatefulSetListerMock{} + +// StatefulSetListerMock is a mock implementation of StatefulSetLister. +// +// func TestSomethingThatUsesStatefulSetLister(t *testing.T) { +// +// // make and configure a mocked StatefulSetLister +// mockedStatefulSetLister := &StatefulSetListerMock{ +// GetFunc: func(namespace string, name string) (*v1beta2.StatefulSet, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v1beta2.StatefulSet, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedStatefulSetLister in code that requires StatefulSetLister +// // and then make assertions. +// +// } +type StatefulSetListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v1beta2.StatefulSet, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v1beta2.StatefulSet, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *StatefulSetListerMock) Get(namespace string, name string) (*v1beta2.StatefulSet, error) { + if mock.GetFunc == nil { + panic("StatefulSetListerMock.GetFunc: method is nil but StatefulSetLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockStatefulSetListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockStatefulSetListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedStatefulSetLister.GetCalls()) +func (mock *StatefulSetListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockStatefulSetListerMockGet.RLock() + calls = mock.calls.Get + lockStatefulSetListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *StatefulSetListerMock) List(namespace string, selector labels.Selector) ([]*v1beta2.StatefulSet, error) { + if mock.ListFunc == nil { + panic("StatefulSetListerMock.ListFunc: method is nil but StatefulSetLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockStatefulSetListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockStatefulSetListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedStatefulSetLister.ListCalls()) +func (mock *StatefulSetListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockStatefulSetListerMockList.RLock() + calls = mock.calls.List + lockStatefulSetListerMockList.RUnlock() + return calls +} + +var ( + lockStatefulSetControllerMockAddClusterScopedHandler sync.RWMutex + lockStatefulSetControllerMockAddHandler sync.RWMutex + lockStatefulSetControllerMockEnqueue sync.RWMutex + lockStatefulSetControllerMockGeneric sync.RWMutex + lockStatefulSetControllerMockInformer sync.RWMutex + lockStatefulSetControllerMockLister sync.RWMutex + lockStatefulSetControllerMockStart sync.RWMutex + lockStatefulSetControllerMockSync sync.RWMutex +) + +// Ensure, that StatefulSetControllerMock does implement StatefulSetController. +// If this is not the case, regenerate this file with moq. +var _ v1beta2a.StatefulSetController = &StatefulSetControllerMock{} + +// StatefulSetControllerMock is a mock implementation of StatefulSetController. +// +// func TestSomethingThatUsesStatefulSetController(t *testing.T) { +// +// // make and configure a mocked StatefulSetController +// mockedStatefulSetController := &StatefulSetControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v1beta2a.StatefulSetHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v1beta2a.StatefulSetHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v1beta2a.StatefulSetLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedStatefulSetController in code that requires StatefulSetController +// // and then make assertions. +// +// } +type StatefulSetControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v1beta2a.StatefulSetHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v1beta2a.StatefulSetHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v1beta2a.StatefulSetLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v1beta2a.StatefulSetHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v1beta2a.StatefulSetHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *StatefulSetControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v1beta2a.StatefulSetHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("StatefulSetControllerMock.AddClusterScopedHandlerFunc: method is nil but StatefulSetController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v1beta2a.StatefulSetHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockStatefulSetControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockStatefulSetControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedStatefulSetController.AddClusterScopedHandlerCalls()) +func (mock *StatefulSetControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1beta2a.StatefulSetHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1beta2a.StatefulSetHandlerFunc + } + lockStatefulSetControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockStatefulSetControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *StatefulSetControllerMock) AddHandler(ctx context.Context, name string, handler v1beta2a.StatefulSetHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("StatefulSetControllerMock.AddHandlerFunc: method is nil but StatefulSetController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v1beta2a.StatefulSetHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockStatefulSetControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockStatefulSetControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedStatefulSetController.AddHandlerCalls()) +func (mock *StatefulSetControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v1beta2a.StatefulSetHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v1beta2a.StatefulSetHandlerFunc + } + lockStatefulSetControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockStatefulSetControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *StatefulSetControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("StatefulSetControllerMock.EnqueueFunc: method is nil but StatefulSetController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockStatefulSetControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockStatefulSetControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedStatefulSetController.EnqueueCalls()) +func (mock *StatefulSetControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockStatefulSetControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockStatefulSetControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *StatefulSetControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("StatefulSetControllerMock.GenericFunc: method is nil but StatefulSetController.Generic was just called") + } + callInfo := struct { + }{} + lockStatefulSetControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockStatefulSetControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedStatefulSetController.GenericCalls()) +func (mock *StatefulSetControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockStatefulSetControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockStatefulSetControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *StatefulSetControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("StatefulSetControllerMock.InformerFunc: method is nil but StatefulSetController.Informer was just called") + } + callInfo := struct { + }{} + lockStatefulSetControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockStatefulSetControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedStatefulSetController.InformerCalls()) +func (mock *StatefulSetControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockStatefulSetControllerMockInformer.RLock() + calls = mock.calls.Informer + lockStatefulSetControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *StatefulSetControllerMock) Lister() v1beta2a.StatefulSetLister { + if mock.ListerFunc == nil { + panic("StatefulSetControllerMock.ListerFunc: method is nil but StatefulSetController.Lister was just called") + } + callInfo := struct { + }{} + lockStatefulSetControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockStatefulSetControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedStatefulSetController.ListerCalls()) +func (mock *StatefulSetControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockStatefulSetControllerMockLister.RLock() + calls = mock.calls.Lister + lockStatefulSetControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *StatefulSetControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("StatefulSetControllerMock.StartFunc: method is nil but StatefulSetController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockStatefulSetControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockStatefulSetControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedStatefulSetController.StartCalls()) +func (mock *StatefulSetControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockStatefulSetControllerMockStart.RLock() + calls = mock.calls.Start + lockStatefulSetControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *StatefulSetControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("StatefulSetControllerMock.SyncFunc: method is nil but StatefulSetController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockStatefulSetControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockStatefulSetControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedStatefulSetController.SyncCalls()) +func (mock *StatefulSetControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockStatefulSetControllerMockSync.RLock() + calls = mock.calls.Sync + lockStatefulSetControllerMockSync.RUnlock() + return calls +} + +var ( + lockStatefulSetInterfaceMockAddClusterScopedHandler sync.RWMutex + lockStatefulSetInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockStatefulSetInterfaceMockAddHandler sync.RWMutex + lockStatefulSetInterfaceMockAddLifecycle sync.RWMutex + lockStatefulSetInterfaceMockController sync.RWMutex + lockStatefulSetInterfaceMockCreate sync.RWMutex + lockStatefulSetInterfaceMockDelete sync.RWMutex + lockStatefulSetInterfaceMockDeleteCollection sync.RWMutex + lockStatefulSetInterfaceMockDeleteNamespaced sync.RWMutex + lockStatefulSetInterfaceMockGet sync.RWMutex + lockStatefulSetInterfaceMockGetNamespaced sync.RWMutex + lockStatefulSetInterfaceMockList sync.RWMutex + lockStatefulSetInterfaceMockObjectClient sync.RWMutex + lockStatefulSetInterfaceMockUpdate sync.RWMutex + lockStatefulSetInterfaceMockWatch sync.RWMutex +) + +// Ensure, that StatefulSetInterfaceMock does implement StatefulSetInterface. +// If this is not the case, regenerate this file with moq. +var _ v1beta2a.StatefulSetInterface = &StatefulSetInterfaceMock{} + +// StatefulSetInterfaceMock is a mock implementation of StatefulSetInterface. +// +// func TestSomethingThatUsesStatefulSetInterface(t *testing.T) { +// +// // make and configure a mocked StatefulSetInterface +// mockedStatefulSetInterface := &StatefulSetInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v1beta2a.StatefulSetHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v1beta2a.StatefulSetLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v1beta2a.StatefulSetHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v1beta2a.StatefulSetLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v1beta2a.StatefulSetController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v1beta2.StatefulSet) (*v1beta2.StatefulSet, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v1beta2.StatefulSet, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v1beta2.StatefulSet, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v1beta2a.StatefulSetList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v1beta2.StatefulSet) (*v1beta2.StatefulSet, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedStatefulSetInterface in code that requires StatefulSetInterface +// // and then make assertions. +// +// } +type StatefulSetInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v1beta2a.StatefulSetHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v1beta2a.StatefulSetLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v1beta2a.StatefulSetHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v1beta2a.StatefulSetLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v1beta2a.StatefulSetController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v1beta2.StatefulSet) (*v1beta2.StatefulSet, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v1beta2.StatefulSet, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v1beta2.StatefulSet, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v1beta2a.StatefulSetList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v1beta2.StatefulSet) (*v1beta2.StatefulSet, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v1beta2a.StatefulSetHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v1beta2a.StatefulSetLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v1beta2a.StatefulSetHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v1beta2a.StatefulSetLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v1beta2.StatefulSet + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v1beta2.StatefulSet + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *StatefulSetInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v1beta2a.StatefulSetHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("StatefulSetInterfaceMock.AddClusterScopedHandlerFunc: method is nil but StatefulSetInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v1beta2a.StatefulSetHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockStatefulSetInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockStatefulSetInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedStatefulSetInterface.AddClusterScopedHandlerCalls()) +func (mock *StatefulSetInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1beta2a.StatefulSetHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1beta2a.StatefulSetHandlerFunc + } + lockStatefulSetInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockStatefulSetInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *StatefulSetInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v1beta2a.StatefulSetLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("StatefulSetInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but StatefulSetInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1beta2a.StatefulSetLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockStatefulSetInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockStatefulSetInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedStatefulSetInterface.AddClusterScopedLifecycleCalls()) +func (mock *StatefulSetInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1beta2a.StatefulSetLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1beta2a.StatefulSetLifecycle + } + lockStatefulSetInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockStatefulSetInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *StatefulSetInterfaceMock) AddHandler(ctx context.Context, name string, sync v1beta2a.StatefulSetHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("StatefulSetInterfaceMock.AddHandlerFunc: method is nil but StatefulSetInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v1beta2a.StatefulSetHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockStatefulSetInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockStatefulSetInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedStatefulSetInterface.AddHandlerCalls()) +func (mock *StatefulSetInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v1beta2a.StatefulSetHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v1beta2a.StatefulSetHandlerFunc + } + lockStatefulSetInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockStatefulSetInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *StatefulSetInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v1beta2a.StatefulSetLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("StatefulSetInterfaceMock.AddLifecycleFunc: method is nil but StatefulSetInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v1beta2a.StatefulSetLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockStatefulSetInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockStatefulSetInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedStatefulSetInterface.AddLifecycleCalls()) +func (mock *StatefulSetInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v1beta2a.StatefulSetLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v1beta2a.StatefulSetLifecycle + } + lockStatefulSetInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockStatefulSetInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *StatefulSetInterfaceMock) Controller() v1beta2a.StatefulSetController { + if mock.ControllerFunc == nil { + panic("StatefulSetInterfaceMock.ControllerFunc: method is nil but StatefulSetInterface.Controller was just called") + } + callInfo := struct { + }{} + lockStatefulSetInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockStatefulSetInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedStatefulSetInterface.ControllerCalls()) +func (mock *StatefulSetInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockStatefulSetInterfaceMockController.RLock() + calls = mock.calls.Controller + lockStatefulSetInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *StatefulSetInterfaceMock) Create(in1 *v1beta2.StatefulSet) (*v1beta2.StatefulSet, error) { + if mock.CreateFunc == nil { + panic("StatefulSetInterfaceMock.CreateFunc: method is nil but StatefulSetInterface.Create was just called") + } + callInfo := struct { + In1 *v1beta2.StatefulSet + }{ + In1: in1, + } + lockStatefulSetInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockStatefulSetInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedStatefulSetInterface.CreateCalls()) +func (mock *StatefulSetInterfaceMock) CreateCalls() []struct { + In1 *v1beta2.StatefulSet +} { + var calls []struct { + In1 *v1beta2.StatefulSet + } + lockStatefulSetInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockStatefulSetInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *StatefulSetInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("StatefulSetInterfaceMock.DeleteFunc: method is nil but StatefulSetInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockStatefulSetInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockStatefulSetInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedStatefulSetInterface.DeleteCalls()) +func (mock *StatefulSetInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockStatefulSetInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockStatefulSetInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *StatefulSetInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("StatefulSetInterfaceMock.DeleteCollectionFunc: method is nil but StatefulSetInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockStatefulSetInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockStatefulSetInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedStatefulSetInterface.DeleteCollectionCalls()) +func (mock *StatefulSetInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockStatefulSetInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockStatefulSetInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *StatefulSetInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("StatefulSetInterfaceMock.DeleteNamespacedFunc: method is nil but StatefulSetInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockStatefulSetInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockStatefulSetInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedStatefulSetInterface.DeleteNamespacedCalls()) +func (mock *StatefulSetInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockStatefulSetInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockStatefulSetInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *StatefulSetInterfaceMock) Get(name string, opts v1.GetOptions) (*v1beta2.StatefulSet, error) { + if mock.GetFunc == nil { + panic("StatefulSetInterfaceMock.GetFunc: method is nil but StatefulSetInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockStatefulSetInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockStatefulSetInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedStatefulSetInterface.GetCalls()) +func (mock *StatefulSetInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockStatefulSetInterfaceMockGet.RLock() + calls = mock.calls.Get + lockStatefulSetInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *StatefulSetInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v1beta2.StatefulSet, error) { + if mock.GetNamespacedFunc == nil { + panic("StatefulSetInterfaceMock.GetNamespacedFunc: method is nil but StatefulSetInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockStatefulSetInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockStatefulSetInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedStatefulSetInterface.GetNamespacedCalls()) +func (mock *StatefulSetInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockStatefulSetInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockStatefulSetInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *StatefulSetInterfaceMock) List(opts v1.ListOptions) (*v1beta2a.StatefulSetList, error) { + if mock.ListFunc == nil { + panic("StatefulSetInterfaceMock.ListFunc: method is nil but StatefulSetInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockStatefulSetInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockStatefulSetInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedStatefulSetInterface.ListCalls()) +func (mock *StatefulSetInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockStatefulSetInterfaceMockList.RLock() + calls = mock.calls.List + lockStatefulSetInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *StatefulSetInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("StatefulSetInterfaceMock.ObjectClientFunc: method is nil but StatefulSetInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockStatefulSetInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockStatefulSetInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedStatefulSetInterface.ObjectClientCalls()) +func (mock *StatefulSetInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockStatefulSetInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockStatefulSetInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *StatefulSetInterfaceMock) Update(in1 *v1beta2.StatefulSet) (*v1beta2.StatefulSet, error) { + if mock.UpdateFunc == nil { + panic("StatefulSetInterfaceMock.UpdateFunc: method is nil but StatefulSetInterface.Update was just called") + } + callInfo := struct { + In1 *v1beta2.StatefulSet + }{ + In1: in1, + } + lockStatefulSetInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockStatefulSetInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedStatefulSetInterface.UpdateCalls()) +func (mock *StatefulSetInterfaceMock) UpdateCalls() []struct { + In1 *v1beta2.StatefulSet +} { + var calls []struct { + In1 *v1beta2.StatefulSet + } + lockStatefulSetInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockStatefulSetInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *StatefulSetInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("StatefulSetInterfaceMock.WatchFunc: method is nil but StatefulSetInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockStatefulSetInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockStatefulSetInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedStatefulSetInterface.WatchCalls()) +func (mock *StatefulSetInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockStatefulSetInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockStatefulSetInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockStatefulSetsGetterMockStatefulSets sync.RWMutex +) + +// Ensure, that StatefulSetsGetterMock does implement StatefulSetsGetter. +// If this is not the case, regenerate this file with moq. +var _ v1beta2a.StatefulSetsGetter = &StatefulSetsGetterMock{} + +// StatefulSetsGetterMock is a mock implementation of StatefulSetsGetter. +// +// func TestSomethingThatUsesStatefulSetsGetter(t *testing.T) { +// +// // make and configure a mocked StatefulSetsGetter +// mockedStatefulSetsGetter := &StatefulSetsGetterMock{ +// StatefulSetsFunc: func(namespace string) v1beta2a.StatefulSetInterface { +// panic("mock out the StatefulSets method") +// }, +// } +// +// // use mockedStatefulSetsGetter in code that requires StatefulSetsGetter +// // and then make assertions. +// +// } +type StatefulSetsGetterMock struct { + // StatefulSetsFunc mocks the StatefulSets method. + StatefulSetsFunc func(namespace string) v1beta2a.StatefulSetInterface + + // calls tracks calls to the methods. + calls struct { + // StatefulSets holds details about calls to the StatefulSets method. + StatefulSets []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// StatefulSets calls StatefulSetsFunc. +func (mock *StatefulSetsGetterMock) StatefulSets(namespace string) v1beta2a.StatefulSetInterface { + if mock.StatefulSetsFunc == nil { + panic("StatefulSetsGetterMock.StatefulSetsFunc: method is nil but StatefulSetsGetter.StatefulSets was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockStatefulSetsGetterMockStatefulSets.Lock() + mock.calls.StatefulSets = append(mock.calls.StatefulSets, callInfo) + lockStatefulSetsGetterMockStatefulSets.Unlock() + return mock.StatefulSetsFunc(namespace) +} + +// StatefulSetsCalls gets all the calls that were made to StatefulSets. +// Check the length with: +// len(mockedStatefulSetsGetter.StatefulSetsCalls()) +func (mock *StatefulSetsGetterMock) StatefulSetsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockStatefulSetsGetterMockStatefulSets.RLock() + calls = mock.calls.StatefulSets + lockStatefulSetsGetterMockStatefulSets.RUnlock() + return calls +} diff --git a/apis/apps/v1beta2/zz_generated_daemon_set_controller.go b/apis/apps/v1beta2/zz_generated_daemon_set_controller.go index 3e5a2502..bbcba7f0 100644 --- a/apis/apps/v1beta2/zz_generated_daemon_set_controller.go +++ b/apis/apps/v1beta2/zz_generated_daemon_set_controller.go @@ -41,7 +41,7 @@ func NewDaemonSet(namespace, name string, obj v1beta2.DaemonSet) *v1beta2.Daemon type DaemonSetList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []v1beta2.DaemonSet + Items []v1beta2.DaemonSet `json:"items"` } type DaemonSetHandlerFunc func(key string, obj *v1beta2.DaemonSet) (runtime.Object, error) diff --git a/apis/apps/v1beta2/zz_generated_deployment_controller.go b/apis/apps/v1beta2/zz_generated_deployment_controller.go index 31728a76..77272e74 100644 --- a/apis/apps/v1beta2/zz_generated_deployment_controller.go +++ b/apis/apps/v1beta2/zz_generated_deployment_controller.go @@ -41,7 +41,7 @@ func NewDeployment(namespace, name string, obj v1beta2.Deployment) *v1beta2.Depl type DeploymentList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []v1beta2.Deployment + Items []v1beta2.Deployment `json:"items"` } type DeploymentHandlerFunc func(key string, obj *v1beta2.Deployment) (runtime.Object, error) diff --git a/apis/apps/v1beta2/zz_generated_replica_set_controller.go b/apis/apps/v1beta2/zz_generated_replica_set_controller.go index 1aefbe68..9efbf010 100644 --- a/apis/apps/v1beta2/zz_generated_replica_set_controller.go +++ b/apis/apps/v1beta2/zz_generated_replica_set_controller.go @@ -41,7 +41,7 @@ func NewReplicaSet(namespace, name string, obj v1beta2.ReplicaSet) *v1beta2.Repl type ReplicaSetList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []v1beta2.ReplicaSet + Items []v1beta2.ReplicaSet `json:"items"` } type ReplicaSetHandlerFunc func(key string, obj *v1beta2.ReplicaSet) (runtime.Object, error) diff --git a/apis/apps/v1beta2/zz_generated_scheme.go b/apis/apps/v1beta2/zz_generated_scheme.go index 530b67ae..f60e1340 100644 --- a/apis/apps/v1beta2/zz_generated_scheme.go +++ b/apis/apps/v1beta2/zz_generated_scheme.go @@ -1,6 +1,7 @@ package v1beta2 import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) @@ -38,5 +39,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &StatefulSetList{}, &ReplicaSetList{}, ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil } diff --git a/apis/apps/v1beta2/zz_generated_stateful_set_controller.go b/apis/apps/v1beta2/zz_generated_stateful_set_controller.go index db5be7e0..924c1ce9 100644 --- a/apis/apps/v1beta2/zz_generated_stateful_set_controller.go +++ b/apis/apps/v1beta2/zz_generated_stateful_set_controller.go @@ -41,7 +41,7 @@ func NewStatefulSet(namespace, name string, obj v1beta2.StatefulSet) *v1beta2.St type StatefulSetList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []v1beta2.StatefulSet + Items []v1beta2.StatefulSet `json:"items"` } type StatefulSetHandlerFunc func(key string, obj *v1beta2.StatefulSet) (runtime.Object, error) diff --git a/apis/batch/v1/fakes/zz_generated_job_mock_test.go b/apis/batch/v1/fakes/zz_generated_job_mock_test.go new file mode 100644 index 00000000..93ce8280 --- /dev/null +++ b/apis/batch/v1/fakes/zz_generated_job_mock_test.go @@ -0,0 +1,1357 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v1a "github.com/rancher/types/apis/batch/v1" + v1 "k8s.io/api/batch/v1" + v1b "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockJobListerMockGet sync.RWMutex + lockJobListerMockList sync.RWMutex +) + +// Ensure, that JobListerMock does implement JobLister. +// If this is not the case, regenerate this file with moq. +var _ v1a.JobLister = &JobListerMock{} + +// JobListerMock is a mock implementation of JobLister. +// +// func TestSomethingThatUsesJobLister(t *testing.T) { +// +// // make and configure a mocked JobLister +// mockedJobLister := &JobListerMock{ +// GetFunc: func(namespace string, name string) (*v1.Job, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v1.Job, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedJobLister in code that requires JobLister +// // and then make assertions. +// +// } +type JobListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v1.Job, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v1.Job, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *JobListerMock) Get(namespace string, name string) (*v1.Job, error) { + if mock.GetFunc == nil { + panic("JobListerMock.GetFunc: method is nil but JobLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockJobListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockJobListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedJobLister.GetCalls()) +func (mock *JobListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockJobListerMockGet.RLock() + calls = mock.calls.Get + lockJobListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *JobListerMock) List(namespace string, selector labels.Selector) ([]*v1.Job, error) { + if mock.ListFunc == nil { + panic("JobListerMock.ListFunc: method is nil but JobLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockJobListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockJobListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedJobLister.ListCalls()) +func (mock *JobListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockJobListerMockList.RLock() + calls = mock.calls.List + lockJobListerMockList.RUnlock() + return calls +} + +var ( + lockJobControllerMockAddClusterScopedHandler sync.RWMutex + lockJobControllerMockAddHandler sync.RWMutex + lockJobControllerMockEnqueue sync.RWMutex + lockJobControllerMockGeneric sync.RWMutex + lockJobControllerMockInformer sync.RWMutex + lockJobControllerMockLister sync.RWMutex + lockJobControllerMockStart sync.RWMutex + lockJobControllerMockSync sync.RWMutex +) + +// Ensure, that JobControllerMock does implement JobController. +// If this is not the case, regenerate this file with moq. +var _ v1a.JobController = &JobControllerMock{} + +// JobControllerMock is a mock implementation of JobController. +// +// func TestSomethingThatUsesJobController(t *testing.T) { +// +// // make and configure a mocked JobController +// mockedJobController := &JobControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v1a.JobHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v1a.JobHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v1a.JobLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedJobController in code that requires JobController +// // and then make assertions. +// +// } +type JobControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v1a.JobHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v1a.JobHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v1a.JobLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v1a.JobHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v1a.JobHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *JobControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v1a.JobHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("JobControllerMock.AddClusterScopedHandlerFunc: method is nil but JobController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.JobHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockJobControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockJobControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedJobController.AddClusterScopedHandlerCalls()) +func (mock *JobControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.JobHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.JobHandlerFunc + } + lockJobControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockJobControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *JobControllerMock) AddHandler(ctx context.Context, name string, handler v1a.JobHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("JobControllerMock.AddHandlerFunc: method is nil but JobController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v1a.JobHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockJobControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockJobControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedJobController.AddHandlerCalls()) +func (mock *JobControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v1a.JobHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v1a.JobHandlerFunc + } + lockJobControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockJobControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *JobControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("JobControllerMock.EnqueueFunc: method is nil but JobController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockJobControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockJobControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedJobController.EnqueueCalls()) +func (mock *JobControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockJobControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockJobControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *JobControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("JobControllerMock.GenericFunc: method is nil but JobController.Generic was just called") + } + callInfo := struct { + }{} + lockJobControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockJobControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedJobController.GenericCalls()) +func (mock *JobControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockJobControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockJobControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *JobControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("JobControllerMock.InformerFunc: method is nil but JobController.Informer was just called") + } + callInfo := struct { + }{} + lockJobControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockJobControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedJobController.InformerCalls()) +func (mock *JobControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockJobControllerMockInformer.RLock() + calls = mock.calls.Informer + lockJobControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *JobControllerMock) Lister() v1a.JobLister { + if mock.ListerFunc == nil { + panic("JobControllerMock.ListerFunc: method is nil but JobController.Lister was just called") + } + callInfo := struct { + }{} + lockJobControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockJobControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedJobController.ListerCalls()) +func (mock *JobControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockJobControllerMockLister.RLock() + calls = mock.calls.Lister + lockJobControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *JobControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("JobControllerMock.StartFunc: method is nil but JobController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockJobControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockJobControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedJobController.StartCalls()) +func (mock *JobControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockJobControllerMockStart.RLock() + calls = mock.calls.Start + lockJobControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *JobControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("JobControllerMock.SyncFunc: method is nil but JobController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockJobControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockJobControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedJobController.SyncCalls()) +func (mock *JobControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockJobControllerMockSync.RLock() + calls = mock.calls.Sync + lockJobControllerMockSync.RUnlock() + return calls +} + +var ( + lockJobInterfaceMockAddClusterScopedHandler sync.RWMutex + lockJobInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockJobInterfaceMockAddHandler sync.RWMutex + lockJobInterfaceMockAddLifecycle sync.RWMutex + lockJobInterfaceMockController sync.RWMutex + lockJobInterfaceMockCreate sync.RWMutex + lockJobInterfaceMockDelete sync.RWMutex + lockJobInterfaceMockDeleteCollection sync.RWMutex + lockJobInterfaceMockDeleteNamespaced sync.RWMutex + lockJobInterfaceMockGet sync.RWMutex + lockJobInterfaceMockGetNamespaced sync.RWMutex + lockJobInterfaceMockList sync.RWMutex + lockJobInterfaceMockObjectClient sync.RWMutex + lockJobInterfaceMockUpdate sync.RWMutex + lockJobInterfaceMockWatch sync.RWMutex +) + +// Ensure, that JobInterfaceMock does implement JobInterface. +// If this is not the case, regenerate this file with moq. +var _ v1a.JobInterface = &JobInterfaceMock{} + +// JobInterfaceMock is a mock implementation of JobInterface. +// +// func TestSomethingThatUsesJobInterface(t *testing.T) { +// +// // make and configure a mocked JobInterface +// mockedJobInterface := &JobInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v1a.JobHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v1a.JobLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v1a.JobHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v1a.JobLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v1a.JobController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v1.Job) (*v1.Job, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1b.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1b.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1b.GetOptions) (*v1.Job, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.Job, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1b.ListOptions) (*v1a.JobList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v1.Job) (*v1.Job, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1b.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedJobInterface in code that requires JobInterface +// // and then make assertions. +// +// } +type JobInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v1a.JobHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v1a.JobLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v1a.JobHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v1a.JobLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v1a.JobController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v1.Job) (*v1.Job, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1b.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1b.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1b.GetOptions) (*v1.Job, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.Job, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1b.ListOptions) (*v1a.JobList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v1.Job) (*v1.Job, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1b.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v1a.JobHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v1a.JobLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v1a.JobHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v1a.JobLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v1.Job + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1b.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1b.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1b.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1b.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1b.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1b.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1b.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v1.Job + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1b.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *JobInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v1a.JobHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("JobInterfaceMock.AddClusterScopedHandlerFunc: method is nil but JobInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.JobHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockJobInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockJobInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedJobInterface.AddClusterScopedHandlerCalls()) +func (mock *JobInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.JobHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.JobHandlerFunc + } + lockJobInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockJobInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *JobInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v1a.JobLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("JobInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but JobInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.JobLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockJobInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockJobInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedJobInterface.AddClusterScopedLifecycleCalls()) +func (mock *JobInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.JobLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.JobLifecycle + } + lockJobInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockJobInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *JobInterfaceMock) AddHandler(ctx context.Context, name string, sync v1a.JobHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("JobInterfaceMock.AddHandlerFunc: method is nil but JobInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v1a.JobHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockJobInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockJobInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedJobInterface.AddHandlerCalls()) +func (mock *JobInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v1a.JobHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v1a.JobHandlerFunc + } + lockJobInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockJobInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *JobInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v1a.JobLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("JobInterfaceMock.AddLifecycleFunc: method is nil but JobInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v1a.JobLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockJobInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockJobInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedJobInterface.AddLifecycleCalls()) +func (mock *JobInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v1a.JobLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v1a.JobLifecycle + } + lockJobInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockJobInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *JobInterfaceMock) Controller() v1a.JobController { + if mock.ControllerFunc == nil { + panic("JobInterfaceMock.ControllerFunc: method is nil but JobInterface.Controller was just called") + } + callInfo := struct { + }{} + lockJobInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockJobInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedJobInterface.ControllerCalls()) +func (mock *JobInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockJobInterfaceMockController.RLock() + calls = mock.calls.Controller + lockJobInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *JobInterfaceMock) Create(in1 *v1.Job) (*v1.Job, error) { + if mock.CreateFunc == nil { + panic("JobInterfaceMock.CreateFunc: method is nil but JobInterface.Create was just called") + } + callInfo := struct { + In1 *v1.Job + }{ + In1: in1, + } + lockJobInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockJobInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedJobInterface.CreateCalls()) +func (mock *JobInterfaceMock) CreateCalls() []struct { + In1 *v1.Job +} { + var calls []struct { + In1 *v1.Job + } + lockJobInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockJobInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *JobInterfaceMock) Delete(name string, options *v1b.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("JobInterfaceMock.DeleteFunc: method is nil but JobInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1b.DeleteOptions + }{ + Name: name, + Options: options, + } + lockJobInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockJobInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedJobInterface.DeleteCalls()) +func (mock *JobInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1b.DeleteOptions +} { + var calls []struct { + Name string + Options *v1b.DeleteOptions + } + lockJobInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockJobInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *JobInterfaceMock) DeleteCollection(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("JobInterfaceMock.DeleteCollectionFunc: method is nil but JobInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockJobInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockJobInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedJobInterface.DeleteCollectionCalls()) +func (mock *JobInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions +} { + var calls []struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions + } + lockJobInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockJobInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *JobInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1b.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("JobInterfaceMock.DeleteNamespacedFunc: method is nil but JobInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1b.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockJobInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockJobInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedJobInterface.DeleteNamespacedCalls()) +func (mock *JobInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1b.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1b.DeleteOptions + } + lockJobInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockJobInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *JobInterfaceMock) Get(name string, opts v1b.GetOptions) (*v1.Job, error) { + if mock.GetFunc == nil { + panic("JobInterfaceMock.GetFunc: method is nil but JobInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1b.GetOptions + }{ + Name: name, + Opts: opts, + } + lockJobInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockJobInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedJobInterface.GetCalls()) +func (mock *JobInterfaceMock) GetCalls() []struct { + Name string + Opts v1b.GetOptions +} { + var calls []struct { + Name string + Opts v1b.GetOptions + } + lockJobInterfaceMockGet.RLock() + calls = mock.calls.Get + lockJobInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *JobInterfaceMock) GetNamespaced(namespace string, name string, opts v1b.GetOptions) (*v1.Job, error) { + if mock.GetNamespacedFunc == nil { + panic("JobInterfaceMock.GetNamespacedFunc: method is nil but JobInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1b.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockJobInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockJobInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedJobInterface.GetNamespacedCalls()) +func (mock *JobInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1b.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1b.GetOptions + } + lockJobInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockJobInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *JobInterfaceMock) List(opts v1b.ListOptions) (*v1a.JobList, error) { + if mock.ListFunc == nil { + panic("JobInterfaceMock.ListFunc: method is nil but JobInterface.List was just called") + } + callInfo := struct { + Opts v1b.ListOptions + }{ + Opts: opts, + } + lockJobInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockJobInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedJobInterface.ListCalls()) +func (mock *JobInterfaceMock) ListCalls() []struct { + Opts v1b.ListOptions +} { + var calls []struct { + Opts v1b.ListOptions + } + lockJobInterfaceMockList.RLock() + calls = mock.calls.List + lockJobInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *JobInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("JobInterfaceMock.ObjectClientFunc: method is nil but JobInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockJobInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockJobInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedJobInterface.ObjectClientCalls()) +func (mock *JobInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockJobInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockJobInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *JobInterfaceMock) Update(in1 *v1.Job) (*v1.Job, error) { + if mock.UpdateFunc == nil { + panic("JobInterfaceMock.UpdateFunc: method is nil but JobInterface.Update was just called") + } + callInfo := struct { + In1 *v1.Job + }{ + In1: in1, + } + lockJobInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockJobInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedJobInterface.UpdateCalls()) +func (mock *JobInterfaceMock) UpdateCalls() []struct { + In1 *v1.Job +} { + var calls []struct { + In1 *v1.Job + } + lockJobInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockJobInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *JobInterfaceMock) Watch(opts v1b.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("JobInterfaceMock.WatchFunc: method is nil but JobInterface.Watch was just called") + } + callInfo := struct { + Opts v1b.ListOptions + }{ + Opts: opts, + } + lockJobInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockJobInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedJobInterface.WatchCalls()) +func (mock *JobInterfaceMock) WatchCalls() []struct { + Opts v1b.ListOptions +} { + var calls []struct { + Opts v1b.ListOptions + } + lockJobInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockJobInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockJobsGetterMockJobs sync.RWMutex +) + +// Ensure, that JobsGetterMock does implement JobsGetter. +// If this is not the case, regenerate this file with moq. +var _ v1a.JobsGetter = &JobsGetterMock{} + +// JobsGetterMock is a mock implementation of JobsGetter. +// +// func TestSomethingThatUsesJobsGetter(t *testing.T) { +// +// // make and configure a mocked JobsGetter +// mockedJobsGetter := &JobsGetterMock{ +// JobsFunc: func(namespace string) v1a.JobInterface { +// panic("mock out the Jobs method") +// }, +// } +// +// // use mockedJobsGetter in code that requires JobsGetter +// // and then make assertions. +// +// } +type JobsGetterMock struct { + // JobsFunc mocks the Jobs method. + JobsFunc func(namespace string) v1a.JobInterface + + // calls tracks calls to the methods. + calls struct { + // Jobs holds details about calls to the Jobs method. + Jobs []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// Jobs calls JobsFunc. +func (mock *JobsGetterMock) Jobs(namespace string) v1a.JobInterface { + if mock.JobsFunc == nil { + panic("JobsGetterMock.JobsFunc: method is nil but JobsGetter.Jobs was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockJobsGetterMockJobs.Lock() + mock.calls.Jobs = append(mock.calls.Jobs, callInfo) + lockJobsGetterMockJobs.Unlock() + return mock.JobsFunc(namespace) +} + +// JobsCalls gets all the calls that were made to Jobs. +// Check the length with: +// len(mockedJobsGetter.JobsCalls()) +func (mock *JobsGetterMock) JobsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockJobsGetterMockJobs.RLock() + calls = mock.calls.Jobs + lockJobsGetterMockJobs.RUnlock() + return calls +} diff --git a/apis/batch/v1/zz_generated_job_controller.go b/apis/batch/v1/zz_generated_job_controller.go index a85e65ec..2bfbff97 100644 --- a/apis/batch/v1/zz_generated_job_controller.go +++ b/apis/batch/v1/zz_generated_job_controller.go @@ -41,7 +41,7 @@ func NewJob(namespace, name string, obj v1.Job) *v1.Job { type JobList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.Job + Items []v1.Job `json:"items"` } type JobHandlerFunc func(key string, obj *v1.Job) (runtime.Object, error) diff --git a/apis/batch/v1/zz_generated_scheme.go b/apis/batch/v1/zz_generated_scheme.go index e740c6d5..4e093514 100644 --- a/apis/batch/v1/zz_generated_scheme.go +++ b/apis/batch/v1/zz_generated_scheme.go @@ -1,6 +1,7 @@ package v1 import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) @@ -35,5 +36,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &JobList{}, ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil } diff --git a/apis/batch/v1beta1/fakes/zz_generated_cron_job_mock_test.go b/apis/batch/v1beta1/fakes/zz_generated_cron_job_mock_test.go new file mode 100644 index 00000000..f481b338 --- /dev/null +++ b/apis/batch/v1beta1/fakes/zz_generated_cron_job_mock_test.go @@ -0,0 +1,1357 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v1beta1a "github.com/rancher/types/apis/batch/v1beta1" + v1beta1 "k8s.io/api/batch/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockCronJobListerMockGet sync.RWMutex + lockCronJobListerMockList sync.RWMutex +) + +// Ensure, that CronJobListerMock does implement CronJobLister. +// If this is not the case, regenerate this file with moq. +var _ v1beta1a.CronJobLister = &CronJobListerMock{} + +// CronJobListerMock is a mock implementation of CronJobLister. +// +// func TestSomethingThatUsesCronJobLister(t *testing.T) { +// +// // make and configure a mocked CronJobLister +// mockedCronJobLister := &CronJobListerMock{ +// GetFunc: func(namespace string, name string) (*v1beta1.CronJob, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v1beta1.CronJob, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedCronJobLister in code that requires CronJobLister +// // and then make assertions. +// +// } +type CronJobListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v1beta1.CronJob, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v1beta1.CronJob, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *CronJobListerMock) Get(namespace string, name string) (*v1beta1.CronJob, error) { + if mock.GetFunc == nil { + panic("CronJobListerMock.GetFunc: method is nil but CronJobLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockCronJobListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockCronJobListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedCronJobLister.GetCalls()) +func (mock *CronJobListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockCronJobListerMockGet.RLock() + calls = mock.calls.Get + lockCronJobListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *CronJobListerMock) List(namespace string, selector labels.Selector) ([]*v1beta1.CronJob, error) { + if mock.ListFunc == nil { + panic("CronJobListerMock.ListFunc: method is nil but CronJobLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockCronJobListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockCronJobListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedCronJobLister.ListCalls()) +func (mock *CronJobListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockCronJobListerMockList.RLock() + calls = mock.calls.List + lockCronJobListerMockList.RUnlock() + return calls +} + +var ( + lockCronJobControllerMockAddClusterScopedHandler sync.RWMutex + lockCronJobControllerMockAddHandler sync.RWMutex + lockCronJobControllerMockEnqueue sync.RWMutex + lockCronJobControllerMockGeneric sync.RWMutex + lockCronJobControllerMockInformer sync.RWMutex + lockCronJobControllerMockLister sync.RWMutex + lockCronJobControllerMockStart sync.RWMutex + lockCronJobControllerMockSync sync.RWMutex +) + +// Ensure, that CronJobControllerMock does implement CronJobController. +// If this is not the case, regenerate this file with moq. +var _ v1beta1a.CronJobController = &CronJobControllerMock{} + +// CronJobControllerMock is a mock implementation of CronJobController. +// +// func TestSomethingThatUsesCronJobController(t *testing.T) { +// +// // make and configure a mocked CronJobController +// mockedCronJobController := &CronJobControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v1beta1a.CronJobHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v1beta1a.CronJobHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v1beta1a.CronJobLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedCronJobController in code that requires CronJobController +// // and then make assertions. +// +// } +type CronJobControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v1beta1a.CronJobHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v1beta1a.CronJobHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v1beta1a.CronJobLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v1beta1a.CronJobHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v1beta1a.CronJobHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *CronJobControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v1beta1a.CronJobHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("CronJobControllerMock.AddClusterScopedHandlerFunc: method is nil but CronJobController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v1beta1a.CronJobHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockCronJobControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockCronJobControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedCronJobController.AddClusterScopedHandlerCalls()) +func (mock *CronJobControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1beta1a.CronJobHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1beta1a.CronJobHandlerFunc + } + lockCronJobControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockCronJobControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *CronJobControllerMock) AddHandler(ctx context.Context, name string, handler v1beta1a.CronJobHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("CronJobControllerMock.AddHandlerFunc: method is nil but CronJobController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v1beta1a.CronJobHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockCronJobControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockCronJobControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedCronJobController.AddHandlerCalls()) +func (mock *CronJobControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v1beta1a.CronJobHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v1beta1a.CronJobHandlerFunc + } + lockCronJobControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockCronJobControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *CronJobControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("CronJobControllerMock.EnqueueFunc: method is nil but CronJobController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockCronJobControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockCronJobControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedCronJobController.EnqueueCalls()) +func (mock *CronJobControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockCronJobControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockCronJobControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *CronJobControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("CronJobControllerMock.GenericFunc: method is nil but CronJobController.Generic was just called") + } + callInfo := struct { + }{} + lockCronJobControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockCronJobControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedCronJobController.GenericCalls()) +func (mock *CronJobControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockCronJobControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockCronJobControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *CronJobControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("CronJobControllerMock.InformerFunc: method is nil but CronJobController.Informer was just called") + } + callInfo := struct { + }{} + lockCronJobControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockCronJobControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedCronJobController.InformerCalls()) +func (mock *CronJobControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockCronJobControllerMockInformer.RLock() + calls = mock.calls.Informer + lockCronJobControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *CronJobControllerMock) Lister() v1beta1a.CronJobLister { + if mock.ListerFunc == nil { + panic("CronJobControllerMock.ListerFunc: method is nil but CronJobController.Lister was just called") + } + callInfo := struct { + }{} + lockCronJobControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockCronJobControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedCronJobController.ListerCalls()) +func (mock *CronJobControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockCronJobControllerMockLister.RLock() + calls = mock.calls.Lister + lockCronJobControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *CronJobControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("CronJobControllerMock.StartFunc: method is nil but CronJobController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockCronJobControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockCronJobControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedCronJobController.StartCalls()) +func (mock *CronJobControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockCronJobControllerMockStart.RLock() + calls = mock.calls.Start + lockCronJobControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *CronJobControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("CronJobControllerMock.SyncFunc: method is nil but CronJobController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockCronJobControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockCronJobControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedCronJobController.SyncCalls()) +func (mock *CronJobControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockCronJobControllerMockSync.RLock() + calls = mock.calls.Sync + lockCronJobControllerMockSync.RUnlock() + return calls +} + +var ( + lockCronJobInterfaceMockAddClusterScopedHandler sync.RWMutex + lockCronJobInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockCronJobInterfaceMockAddHandler sync.RWMutex + lockCronJobInterfaceMockAddLifecycle sync.RWMutex + lockCronJobInterfaceMockController sync.RWMutex + lockCronJobInterfaceMockCreate sync.RWMutex + lockCronJobInterfaceMockDelete sync.RWMutex + lockCronJobInterfaceMockDeleteCollection sync.RWMutex + lockCronJobInterfaceMockDeleteNamespaced sync.RWMutex + lockCronJobInterfaceMockGet sync.RWMutex + lockCronJobInterfaceMockGetNamespaced sync.RWMutex + lockCronJobInterfaceMockList sync.RWMutex + lockCronJobInterfaceMockObjectClient sync.RWMutex + lockCronJobInterfaceMockUpdate sync.RWMutex + lockCronJobInterfaceMockWatch sync.RWMutex +) + +// Ensure, that CronJobInterfaceMock does implement CronJobInterface. +// If this is not the case, regenerate this file with moq. +var _ v1beta1a.CronJobInterface = &CronJobInterfaceMock{} + +// CronJobInterfaceMock is a mock implementation of CronJobInterface. +// +// func TestSomethingThatUsesCronJobInterface(t *testing.T) { +// +// // make and configure a mocked CronJobInterface +// mockedCronJobInterface := &CronJobInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v1beta1a.CronJobHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v1beta1a.CronJobLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v1beta1a.CronJobHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v1beta1a.CronJobLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v1beta1a.CronJobController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v1beta1.CronJob) (*v1beta1.CronJob, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v1beta1.CronJob, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v1beta1.CronJob, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v1beta1a.CronJobList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v1beta1.CronJob) (*v1beta1.CronJob, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedCronJobInterface in code that requires CronJobInterface +// // and then make assertions. +// +// } +type CronJobInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v1beta1a.CronJobHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v1beta1a.CronJobLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v1beta1a.CronJobHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v1beta1a.CronJobLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v1beta1a.CronJobController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v1beta1.CronJob) (*v1beta1.CronJob, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v1beta1.CronJob, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v1beta1.CronJob, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v1beta1a.CronJobList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v1beta1.CronJob) (*v1beta1.CronJob, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v1beta1a.CronJobHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v1beta1a.CronJobLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v1beta1a.CronJobHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v1beta1a.CronJobLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v1beta1.CronJob + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v1beta1.CronJob + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *CronJobInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v1beta1a.CronJobHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("CronJobInterfaceMock.AddClusterScopedHandlerFunc: method is nil but CronJobInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v1beta1a.CronJobHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockCronJobInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockCronJobInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedCronJobInterface.AddClusterScopedHandlerCalls()) +func (mock *CronJobInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1beta1a.CronJobHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1beta1a.CronJobHandlerFunc + } + lockCronJobInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockCronJobInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *CronJobInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v1beta1a.CronJobLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("CronJobInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but CronJobInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1beta1a.CronJobLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockCronJobInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockCronJobInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedCronJobInterface.AddClusterScopedLifecycleCalls()) +func (mock *CronJobInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1beta1a.CronJobLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1beta1a.CronJobLifecycle + } + lockCronJobInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockCronJobInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *CronJobInterfaceMock) AddHandler(ctx context.Context, name string, sync v1beta1a.CronJobHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("CronJobInterfaceMock.AddHandlerFunc: method is nil but CronJobInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v1beta1a.CronJobHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockCronJobInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockCronJobInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedCronJobInterface.AddHandlerCalls()) +func (mock *CronJobInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v1beta1a.CronJobHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v1beta1a.CronJobHandlerFunc + } + lockCronJobInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockCronJobInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *CronJobInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v1beta1a.CronJobLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("CronJobInterfaceMock.AddLifecycleFunc: method is nil but CronJobInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v1beta1a.CronJobLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockCronJobInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockCronJobInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedCronJobInterface.AddLifecycleCalls()) +func (mock *CronJobInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v1beta1a.CronJobLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v1beta1a.CronJobLifecycle + } + lockCronJobInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockCronJobInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *CronJobInterfaceMock) Controller() v1beta1a.CronJobController { + if mock.ControllerFunc == nil { + panic("CronJobInterfaceMock.ControllerFunc: method is nil but CronJobInterface.Controller was just called") + } + callInfo := struct { + }{} + lockCronJobInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockCronJobInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedCronJobInterface.ControllerCalls()) +func (mock *CronJobInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockCronJobInterfaceMockController.RLock() + calls = mock.calls.Controller + lockCronJobInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *CronJobInterfaceMock) Create(in1 *v1beta1.CronJob) (*v1beta1.CronJob, error) { + if mock.CreateFunc == nil { + panic("CronJobInterfaceMock.CreateFunc: method is nil but CronJobInterface.Create was just called") + } + callInfo := struct { + In1 *v1beta1.CronJob + }{ + In1: in1, + } + lockCronJobInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockCronJobInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedCronJobInterface.CreateCalls()) +func (mock *CronJobInterfaceMock) CreateCalls() []struct { + In1 *v1beta1.CronJob +} { + var calls []struct { + In1 *v1beta1.CronJob + } + lockCronJobInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockCronJobInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *CronJobInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("CronJobInterfaceMock.DeleteFunc: method is nil but CronJobInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockCronJobInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockCronJobInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedCronJobInterface.DeleteCalls()) +func (mock *CronJobInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockCronJobInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockCronJobInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *CronJobInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("CronJobInterfaceMock.DeleteCollectionFunc: method is nil but CronJobInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockCronJobInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockCronJobInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedCronJobInterface.DeleteCollectionCalls()) +func (mock *CronJobInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockCronJobInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockCronJobInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *CronJobInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("CronJobInterfaceMock.DeleteNamespacedFunc: method is nil but CronJobInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockCronJobInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockCronJobInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedCronJobInterface.DeleteNamespacedCalls()) +func (mock *CronJobInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockCronJobInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockCronJobInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *CronJobInterfaceMock) Get(name string, opts v1.GetOptions) (*v1beta1.CronJob, error) { + if mock.GetFunc == nil { + panic("CronJobInterfaceMock.GetFunc: method is nil but CronJobInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockCronJobInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockCronJobInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedCronJobInterface.GetCalls()) +func (mock *CronJobInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockCronJobInterfaceMockGet.RLock() + calls = mock.calls.Get + lockCronJobInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *CronJobInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v1beta1.CronJob, error) { + if mock.GetNamespacedFunc == nil { + panic("CronJobInterfaceMock.GetNamespacedFunc: method is nil but CronJobInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockCronJobInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockCronJobInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedCronJobInterface.GetNamespacedCalls()) +func (mock *CronJobInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockCronJobInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockCronJobInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *CronJobInterfaceMock) List(opts v1.ListOptions) (*v1beta1a.CronJobList, error) { + if mock.ListFunc == nil { + panic("CronJobInterfaceMock.ListFunc: method is nil but CronJobInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockCronJobInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockCronJobInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedCronJobInterface.ListCalls()) +func (mock *CronJobInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockCronJobInterfaceMockList.RLock() + calls = mock.calls.List + lockCronJobInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *CronJobInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("CronJobInterfaceMock.ObjectClientFunc: method is nil but CronJobInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockCronJobInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockCronJobInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedCronJobInterface.ObjectClientCalls()) +func (mock *CronJobInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockCronJobInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockCronJobInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *CronJobInterfaceMock) Update(in1 *v1beta1.CronJob) (*v1beta1.CronJob, error) { + if mock.UpdateFunc == nil { + panic("CronJobInterfaceMock.UpdateFunc: method is nil but CronJobInterface.Update was just called") + } + callInfo := struct { + In1 *v1beta1.CronJob + }{ + In1: in1, + } + lockCronJobInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockCronJobInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedCronJobInterface.UpdateCalls()) +func (mock *CronJobInterfaceMock) UpdateCalls() []struct { + In1 *v1beta1.CronJob +} { + var calls []struct { + In1 *v1beta1.CronJob + } + lockCronJobInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockCronJobInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *CronJobInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("CronJobInterfaceMock.WatchFunc: method is nil but CronJobInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockCronJobInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockCronJobInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedCronJobInterface.WatchCalls()) +func (mock *CronJobInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockCronJobInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockCronJobInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockCronJobsGetterMockCronJobs sync.RWMutex +) + +// Ensure, that CronJobsGetterMock does implement CronJobsGetter. +// If this is not the case, regenerate this file with moq. +var _ v1beta1a.CronJobsGetter = &CronJobsGetterMock{} + +// CronJobsGetterMock is a mock implementation of CronJobsGetter. +// +// func TestSomethingThatUsesCronJobsGetter(t *testing.T) { +// +// // make and configure a mocked CronJobsGetter +// mockedCronJobsGetter := &CronJobsGetterMock{ +// CronJobsFunc: func(namespace string) v1beta1a.CronJobInterface { +// panic("mock out the CronJobs method") +// }, +// } +// +// // use mockedCronJobsGetter in code that requires CronJobsGetter +// // and then make assertions. +// +// } +type CronJobsGetterMock struct { + // CronJobsFunc mocks the CronJobs method. + CronJobsFunc func(namespace string) v1beta1a.CronJobInterface + + // calls tracks calls to the methods. + calls struct { + // CronJobs holds details about calls to the CronJobs method. + CronJobs []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// CronJobs calls CronJobsFunc. +func (mock *CronJobsGetterMock) CronJobs(namespace string) v1beta1a.CronJobInterface { + if mock.CronJobsFunc == nil { + panic("CronJobsGetterMock.CronJobsFunc: method is nil but CronJobsGetter.CronJobs was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockCronJobsGetterMockCronJobs.Lock() + mock.calls.CronJobs = append(mock.calls.CronJobs, callInfo) + lockCronJobsGetterMockCronJobs.Unlock() + return mock.CronJobsFunc(namespace) +} + +// CronJobsCalls gets all the calls that were made to CronJobs. +// Check the length with: +// len(mockedCronJobsGetter.CronJobsCalls()) +func (mock *CronJobsGetterMock) CronJobsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockCronJobsGetterMockCronJobs.RLock() + calls = mock.calls.CronJobs + lockCronJobsGetterMockCronJobs.RUnlock() + return calls +} diff --git a/apis/batch/v1beta1/zz_generated_cron_job_controller.go b/apis/batch/v1beta1/zz_generated_cron_job_controller.go index bd9e7c0c..625f0be4 100644 --- a/apis/batch/v1beta1/zz_generated_cron_job_controller.go +++ b/apis/batch/v1beta1/zz_generated_cron_job_controller.go @@ -41,7 +41,7 @@ func NewCronJob(namespace, name string, obj v1beta1.CronJob) *v1beta1.CronJob { type CronJobList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []v1beta1.CronJob + Items []v1beta1.CronJob `json:"items"` } type CronJobHandlerFunc func(key string, obj *v1beta1.CronJob) (runtime.Object, error) diff --git a/apis/batch/v1beta1/zz_generated_scheme.go b/apis/batch/v1beta1/zz_generated_scheme.go index fc195822..a6b33bb3 100644 --- a/apis/batch/v1beta1/zz_generated_scheme.go +++ b/apis/batch/v1beta1/zz_generated_scheme.go @@ -1,6 +1,7 @@ package v1beta1 import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) @@ -35,5 +36,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &CronJobList{}, ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil } diff --git a/apis/cluster.cattle.io/v3/fakes/zz_generated_cluster_auth_token_mock_test.go b/apis/cluster.cattle.io/v3/fakes/zz_generated_cluster_auth_token_mock_test.go new file mode 100644 index 00000000..4bb90029 --- /dev/null +++ b/apis/cluster.cattle.io/v3/fakes/zz_generated_cluster_auth_token_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/cluster.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockClusterAuthTokenListerMockGet sync.RWMutex + lockClusterAuthTokenListerMockList sync.RWMutex +) + +// Ensure, that ClusterAuthTokenListerMock does implement ClusterAuthTokenLister. +// If this is not the case, regenerate this file with moq. +var _ v3.ClusterAuthTokenLister = &ClusterAuthTokenListerMock{} + +// ClusterAuthTokenListerMock is a mock implementation of ClusterAuthTokenLister. +// +// func TestSomethingThatUsesClusterAuthTokenLister(t *testing.T) { +// +// // make and configure a mocked ClusterAuthTokenLister +// mockedClusterAuthTokenLister := &ClusterAuthTokenListerMock{ +// GetFunc: func(namespace string, name string) (*v3.ClusterAuthToken, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.ClusterAuthToken, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedClusterAuthTokenLister in code that requires ClusterAuthTokenLister +// // and then make assertions. +// +// } +type ClusterAuthTokenListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.ClusterAuthToken, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.ClusterAuthToken, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *ClusterAuthTokenListerMock) Get(namespace string, name string) (*v3.ClusterAuthToken, error) { + if mock.GetFunc == nil { + panic("ClusterAuthTokenListerMock.GetFunc: method is nil but ClusterAuthTokenLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockClusterAuthTokenListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockClusterAuthTokenListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedClusterAuthTokenLister.GetCalls()) +func (mock *ClusterAuthTokenListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockClusterAuthTokenListerMockGet.RLock() + calls = mock.calls.Get + lockClusterAuthTokenListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ClusterAuthTokenListerMock) List(namespace string, selector labels.Selector) ([]*v3.ClusterAuthToken, error) { + if mock.ListFunc == nil { + panic("ClusterAuthTokenListerMock.ListFunc: method is nil but ClusterAuthTokenLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockClusterAuthTokenListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockClusterAuthTokenListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedClusterAuthTokenLister.ListCalls()) +func (mock *ClusterAuthTokenListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockClusterAuthTokenListerMockList.RLock() + calls = mock.calls.List + lockClusterAuthTokenListerMockList.RUnlock() + return calls +} + +var ( + lockClusterAuthTokenControllerMockAddClusterScopedHandler sync.RWMutex + lockClusterAuthTokenControllerMockAddHandler sync.RWMutex + lockClusterAuthTokenControllerMockEnqueue sync.RWMutex + lockClusterAuthTokenControllerMockGeneric sync.RWMutex + lockClusterAuthTokenControllerMockInformer sync.RWMutex + lockClusterAuthTokenControllerMockLister sync.RWMutex + lockClusterAuthTokenControllerMockStart sync.RWMutex + lockClusterAuthTokenControllerMockSync sync.RWMutex +) + +// Ensure, that ClusterAuthTokenControllerMock does implement ClusterAuthTokenController. +// If this is not the case, regenerate this file with moq. +var _ v3.ClusterAuthTokenController = &ClusterAuthTokenControllerMock{} + +// ClusterAuthTokenControllerMock is a mock implementation of ClusterAuthTokenController. +// +// func TestSomethingThatUsesClusterAuthTokenController(t *testing.T) { +// +// // make and configure a mocked ClusterAuthTokenController +// mockedClusterAuthTokenController := &ClusterAuthTokenControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.ClusterAuthTokenHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.ClusterAuthTokenHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.ClusterAuthTokenLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedClusterAuthTokenController in code that requires ClusterAuthTokenController +// // and then make assertions. +// +// } +type ClusterAuthTokenControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.ClusterAuthTokenHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.ClusterAuthTokenHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.ClusterAuthTokenLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.ClusterAuthTokenHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.ClusterAuthTokenHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ClusterAuthTokenControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.ClusterAuthTokenHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ClusterAuthTokenControllerMock.AddClusterScopedHandlerFunc: method is nil but ClusterAuthTokenController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ClusterAuthTokenHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockClusterAuthTokenControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockClusterAuthTokenControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedClusterAuthTokenController.AddClusterScopedHandlerCalls()) +func (mock *ClusterAuthTokenControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ClusterAuthTokenHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ClusterAuthTokenHandlerFunc + } + lockClusterAuthTokenControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockClusterAuthTokenControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ClusterAuthTokenControllerMock) AddHandler(ctx context.Context, name string, handler v3.ClusterAuthTokenHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ClusterAuthTokenControllerMock.AddHandlerFunc: method is nil but ClusterAuthTokenController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.ClusterAuthTokenHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockClusterAuthTokenControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockClusterAuthTokenControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedClusterAuthTokenController.AddHandlerCalls()) +func (mock *ClusterAuthTokenControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.ClusterAuthTokenHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.ClusterAuthTokenHandlerFunc + } + lockClusterAuthTokenControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockClusterAuthTokenControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *ClusterAuthTokenControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("ClusterAuthTokenControllerMock.EnqueueFunc: method is nil but ClusterAuthTokenController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockClusterAuthTokenControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockClusterAuthTokenControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedClusterAuthTokenController.EnqueueCalls()) +func (mock *ClusterAuthTokenControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockClusterAuthTokenControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockClusterAuthTokenControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *ClusterAuthTokenControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("ClusterAuthTokenControllerMock.GenericFunc: method is nil but ClusterAuthTokenController.Generic was just called") + } + callInfo := struct { + }{} + lockClusterAuthTokenControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockClusterAuthTokenControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedClusterAuthTokenController.GenericCalls()) +func (mock *ClusterAuthTokenControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockClusterAuthTokenControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockClusterAuthTokenControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *ClusterAuthTokenControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("ClusterAuthTokenControllerMock.InformerFunc: method is nil but ClusterAuthTokenController.Informer was just called") + } + callInfo := struct { + }{} + lockClusterAuthTokenControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockClusterAuthTokenControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedClusterAuthTokenController.InformerCalls()) +func (mock *ClusterAuthTokenControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockClusterAuthTokenControllerMockInformer.RLock() + calls = mock.calls.Informer + lockClusterAuthTokenControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *ClusterAuthTokenControllerMock) Lister() v3.ClusterAuthTokenLister { + if mock.ListerFunc == nil { + panic("ClusterAuthTokenControllerMock.ListerFunc: method is nil but ClusterAuthTokenController.Lister was just called") + } + callInfo := struct { + }{} + lockClusterAuthTokenControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockClusterAuthTokenControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedClusterAuthTokenController.ListerCalls()) +func (mock *ClusterAuthTokenControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockClusterAuthTokenControllerMockLister.RLock() + calls = mock.calls.Lister + lockClusterAuthTokenControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *ClusterAuthTokenControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("ClusterAuthTokenControllerMock.StartFunc: method is nil but ClusterAuthTokenController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockClusterAuthTokenControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockClusterAuthTokenControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedClusterAuthTokenController.StartCalls()) +func (mock *ClusterAuthTokenControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockClusterAuthTokenControllerMockStart.RLock() + calls = mock.calls.Start + lockClusterAuthTokenControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *ClusterAuthTokenControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("ClusterAuthTokenControllerMock.SyncFunc: method is nil but ClusterAuthTokenController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockClusterAuthTokenControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockClusterAuthTokenControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedClusterAuthTokenController.SyncCalls()) +func (mock *ClusterAuthTokenControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockClusterAuthTokenControllerMockSync.RLock() + calls = mock.calls.Sync + lockClusterAuthTokenControllerMockSync.RUnlock() + return calls +} + +var ( + lockClusterAuthTokenInterfaceMockAddClusterScopedHandler sync.RWMutex + lockClusterAuthTokenInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockClusterAuthTokenInterfaceMockAddHandler sync.RWMutex + lockClusterAuthTokenInterfaceMockAddLifecycle sync.RWMutex + lockClusterAuthTokenInterfaceMockController sync.RWMutex + lockClusterAuthTokenInterfaceMockCreate sync.RWMutex + lockClusterAuthTokenInterfaceMockDelete sync.RWMutex + lockClusterAuthTokenInterfaceMockDeleteCollection sync.RWMutex + lockClusterAuthTokenInterfaceMockDeleteNamespaced sync.RWMutex + lockClusterAuthTokenInterfaceMockGet sync.RWMutex + lockClusterAuthTokenInterfaceMockGetNamespaced sync.RWMutex + lockClusterAuthTokenInterfaceMockList sync.RWMutex + lockClusterAuthTokenInterfaceMockObjectClient sync.RWMutex + lockClusterAuthTokenInterfaceMockUpdate sync.RWMutex + lockClusterAuthTokenInterfaceMockWatch sync.RWMutex +) + +// Ensure, that ClusterAuthTokenInterfaceMock does implement ClusterAuthTokenInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.ClusterAuthTokenInterface = &ClusterAuthTokenInterfaceMock{} + +// ClusterAuthTokenInterfaceMock is a mock implementation of ClusterAuthTokenInterface. +// +// func TestSomethingThatUsesClusterAuthTokenInterface(t *testing.T) { +// +// // make and configure a mocked ClusterAuthTokenInterface +// mockedClusterAuthTokenInterface := &ClusterAuthTokenInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.ClusterAuthTokenHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.ClusterAuthTokenLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.ClusterAuthTokenHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.ClusterAuthTokenLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.ClusterAuthTokenController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.ClusterAuthToken) (*v3.ClusterAuthToken, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.ClusterAuthToken, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.ClusterAuthToken, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.ClusterAuthTokenList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.ClusterAuthToken) (*v3.ClusterAuthToken, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedClusterAuthTokenInterface in code that requires ClusterAuthTokenInterface +// // and then make assertions. +// +// } +type ClusterAuthTokenInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.ClusterAuthTokenHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.ClusterAuthTokenLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.ClusterAuthTokenHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.ClusterAuthTokenLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.ClusterAuthTokenController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.ClusterAuthToken) (*v3.ClusterAuthToken, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.ClusterAuthToken, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.ClusterAuthToken, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.ClusterAuthTokenList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.ClusterAuthToken) (*v3.ClusterAuthToken, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.ClusterAuthTokenHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.ClusterAuthTokenLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.ClusterAuthTokenHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.ClusterAuthTokenLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.ClusterAuthToken + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.ClusterAuthToken + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ClusterAuthTokenInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.ClusterAuthTokenHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ClusterAuthTokenInterfaceMock.AddClusterScopedHandlerFunc: method is nil but ClusterAuthTokenInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ClusterAuthTokenHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockClusterAuthTokenInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockClusterAuthTokenInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedClusterAuthTokenInterface.AddClusterScopedHandlerCalls()) +func (mock *ClusterAuthTokenInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ClusterAuthTokenHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ClusterAuthTokenHandlerFunc + } + lockClusterAuthTokenInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockClusterAuthTokenInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *ClusterAuthTokenInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.ClusterAuthTokenLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("ClusterAuthTokenInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but ClusterAuthTokenInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ClusterAuthTokenLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockClusterAuthTokenInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockClusterAuthTokenInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedClusterAuthTokenInterface.AddClusterScopedLifecycleCalls()) +func (mock *ClusterAuthTokenInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ClusterAuthTokenLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ClusterAuthTokenLifecycle + } + lockClusterAuthTokenInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockClusterAuthTokenInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ClusterAuthTokenInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.ClusterAuthTokenHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ClusterAuthTokenInterfaceMock.AddHandlerFunc: method is nil but ClusterAuthTokenInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.ClusterAuthTokenHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockClusterAuthTokenInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockClusterAuthTokenInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedClusterAuthTokenInterface.AddHandlerCalls()) +func (mock *ClusterAuthTokenInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.ClusterAuthTokenHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.ClusterAuthTokenHandlerFunc + } + lockClusterAuthTokenInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockClusterAuthTokenInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *ClusterAuthTokenInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.ClusterAuthTokenLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("ClusterAuthTokenInterfaceMock.AddLifecycleFunc: method is nil but ClusterAuthTokenInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.ClusterAuthTokenLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockClusterAuthTokenInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockClusterAuthTokenInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedClusterAuthTokenInterface.AddLifecycleCalls()) +func (mock *ClusterAuthTokenInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.ClusterAuthTokenLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.ClusterAuthTokenLifecycle + } + lockClusterAuthTokenInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockClusterAuthTokenInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *ClusterAuthTokenInterfaceMock) Controller() v3.ClusterAuthTokenController { + if mock.ControllerFunc == nil { + panic("ClusterAuthTokenInterfaceMock.ControllerFunc: method is nil but ClusterAuthTokenInterface.Controller was just called") + } + callInfo := struct { + }{} + lockClusterAuthTokenInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockClusterAuthTokenInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedClusterAuthTokenInterface.ControllerCalls()) +func (mock *ClusterAuthTokenInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockClusterAuthTokenInterfaceMockController.RLock() + calls = mock.calls.Controller + lockClusterAuthTokenInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *ClusterAuthTokenInterfaceMock) Create(in1 *v3.ClusterAuthToken) (*v3.ClusterAuthToken, error) { + if mock.CreateFunc == nil { + panic("ClusterAuthTokenInterfaceMock.CreateFunc: method is nil but ClusterAuthTokenInterface.Create was just called") + } + callInfo := struct { + In1 *v3.ClusterAuthToken + }{ + In1: in1, + } + lockClusterAuthTokenInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockClusterAuthTokenInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedClusterAuthTokenInterface.CreateCalls()) +func (mock *ClusterAuthTokenInterfaceMock) CreateCalls() []struct { + In1 *v3.ClusterAuthToken +} { + var calls []struct { + In1 *v3.ClusterAuthToken + } + lockClusterAuthTokenInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockClusterAuthTokenInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *ClusterAuthTokenInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("ClusterAuthTokenInterfaceMock.DeleteFunc: method is nil but ClusterAuthTokenInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockClusterAuthTokenInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockClusterAuthTokenInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedClusterAuthTokenInterface.DeleteCalls()) +func (mock *ClusterAuthTokenInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockClusterAuthTokenInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockClusterAuthTokenInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *ClusterAuthTokenInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("ClusterAuthTokenInterfaceMock.DeleteCollectionFunc: method is nil but ClusterAuthTokenInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockClusterAuthTokenInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockClusterAuthTokenInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedClusterAuthTokenInterface.DeleteCollectionCalls()) +func (mock *ClusterAuthTokenInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockClusterAuthTokenInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockClusterAuthTokenInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *ClusterAuthTokenInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("ClusterAuthTokenInterfaceMock.DeleteNamespacedFunc: method is nil but ClusterAuthTokenInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockClusterAuthTokenInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockClusterAuthTokenInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedClusterAuthTokenInterface.DeleteNamespacedCalls()) +func (mock *ClusterAuthTokenInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockClusterAuthTokenInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockClusterAuthTokenInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *ClusterAuthTokenInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.ClusterAuthToken, error) { + if mock.GetFunc == nil { + panic("ClusterAuthTokenInterfaceMock.GetFunc: method is nil but ClusterAuthTokenInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockClusterAuthTokenInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockClusterAuthTokenInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedClusterAuthTokenInterface.GetCalls()) +func (mock *ClusterAuthTokenInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockClusterAuthTokenInterfaceMockGet.RLock() + calls = mock.calls.Get + lockClusterAuthTokenInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *ClusterAuthTokenInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.ClusterAuthToken, error) { + if mock.GetNamespacedFunc == nil { + panic("ClusterAuthTokenInterfaceMock.GetNamespacedFunc: method is nil but ClusterAuthTokenInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockClusterAuthTokenInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockClusterAuthTokenInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedClusterAuthTokenInterface.GetNamespacedCalls()) +func (mock *ClusterAuthTokenInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockClusterAuthTokenInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockClusterAuthTokenInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ClusterAuthTokenInterfaceMock) List(opts v1.ListOptions) (*v3.ClusterAuthTokenList, error) { + if mock.ListFunc == nil { + panic("ClusterAuthTokenInterfaceMock.ListFunc: method is nil but ClusterAuthTokenInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockClusterAuthTokenInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockClusterAuthTokenInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedClusterAuthTokenInterface.ListCalls()) +func (mock *ClusterAuthTokenInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockClusterAuthTokenInterfaceMockList.RLock() + calls = mock.calls.List + lockClusterAuthTokenInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *ClusterAuthTokenInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("ClusterAuthTokenInterfaceMock.ObjectClientFunc: method is nil but ClusterAuthTokenInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockClusterAuthTokenInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockClusterAuthTokenInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedClusterAuthTokenInterface.ObjectClientCalls()) +func (mock *ClusterAuthTokenInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockClusterAuthTokenInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockClusterAuthTokenInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *ClusterAuthTokenInterfaceMock) Update(in1 *v3.ClusterAuthToken) (*v3.ClusterAuthToken, error) { + if mock.UpdateFunc == nil { + panic("ClusterAuthTokenInterfaceMock.UpdateFunc: method is nil but ClusterAuthTokenInterface.Update was just called") + } + callInfo := struct { + In1 *v3.ClusterAuthToken + }{ + In1: in1, + } + lockClusterAuthTokenInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockClusterAuthTokenInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedClusterAuthTokenInterface.UpdateCalls()) +func (mock *ClusterAuthTokenInterfaceMock) UpdateCalls() []struct { + In1 *v3.ClusterAuthToken +} { + var calls []struct { + In1 *v3.ClusterAuthToken + } + lockClusterAuthTokenInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockClusterAuthTokenInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *ClusterAuthTokenInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("ClusterAuthTokenInterfaceMock.WatchFunc: method is nil but ClusterAuthTokenInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockClusterAuthTokenInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockClusterAuthTokenInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedClusterAuthTokenInterface.WatchCalls()) +func (mock *ClusterAuthTokenInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockClusterAuthTokenInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockClusterAuthTokenInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockClusterAuthTokensGetterMockClusterAuthTokens sync.RWMutex +) + +// Ensure, that ClusterAuthTokensGetterMock does implement ClusterAuthTokensGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.ClusterAuthTokensGetter = &ClusterAuthTokensGetterMock{} + +// ClusterAuthTokensGetterMock is a mock implementation of ClusterAuthTokensGetter. +// +// func TestSomethingThatUsesClusterAuthTokensGetter(t *testing.T) { +// +// // make and configure a mocked ClusterAuthTokensGetter +// mockedClusterAuthTokensGetter := &ClusterAuthTokensGetterMock{ +// ClusterAuthTokensFunc: func(namespace string) v3.ClusterAuthTokenInterface { +// panic("mock out the ClusterAuthTokens method") +// }, +// } +// +// // use mockedClusterAuthTokensGetter in code that requires ClusterAuthTokensGetter +// // and then make assertions. +// +// } +type ClusterAuthTokensGetterMock struct { + // ClusterAuthTokensFunc mocks the ClusterAuthTokens method. + ClusterAuthTokensFunc func(namespace string) v3.ClusterAuthTokenInterface + + // calls tracks calls to the methods. + calls struct { + // ClusterAuthTokens holds details about calls to the ClusterAuthTokens method. + ClusterAuthTokens []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// ClusterAuthTokens calls ClusterAuthTokensFunc. +func (mock *ClusterAuthTokensGetterMock) ClusterAuthTokens(namespace string) v3.ClusterAuthTokenInterface { + if mock.ClusterAuthTokensFunc == nil { + panic("ClusterAuthTokensGetterMock.ClusterAuthTokensFunc: method is nil but ClusterAuthTokensGetter.ClusterAuthTokens was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockClusterAuthTokensGetterMockClusterAuthTokens.Lock() + mock.calls.ClusterAuthTokens = append(mock.calls.ClusterAuthTokens, callInfo) + lockClusterAuthTokensGetterMockClusterAuthTokens.Unlock() + return mock.ClusterAuthTokensFunc(namespace) +} + +// ClusterAuthTokensCalls gets all the calls that were made to ClusterAuthTokens. +// Check the length with: +// len(mockedClusterAuthTokensGetter.ClusterAuthTokensCalls()) +func (mock *ClusterAuthTokensGetterMock) ClusterAuthTokensCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockClusterAuthTokensGetterMockClusterAuthTokens.RLock() + calls = mock.calls.ClusterAuthTokens + lockClusterAuthTokensGetterMockClusterAuthTokens.RUnlock() + return calls +} diff --git a/apis/cluster.cattle.io/v3/fakes/zz_generated_cluster_user_attribute_mock_test.go b/apis/cluster.cattle.io/v3/fakes/zz_generated_cluster_user_attribute_mock_test.go new file mode 100644 index 00000000..5e2b4b7f --- /dev/null +++ b/apis/cluster.cattle.io/v3/fakes/zz_generated_cluster_user_attribute_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/cluster.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockClusterUserAttributeListerMockGet sync.RWMutex + lockClusterUserAttributeListerMockList sync.RWMutex +) + +// Ensure, that ClusterUserAttributeListerMock does implement ClusterUserAttributeLister. +// If this is not the case, regenerate this file with moq. +var _ v3.ClusterUserAttributeLister = &ClusterUserAttributeListerMock{} + +// ClusterUserAttributeListerMock is a mock implementation of ClusterUserAttributeLister. +// +// func TestSomethingThatUsesClusterUserAttributeLister(t *testing.T) { +// +// // make and configure a mocked ClusterUserAttributeLister +// mockedClusterUserAttributeLister := &ClusterUserAttributeListerMock{ +// GetFunc: func(namespace string, name string) (*v3.ClusterUserAttribute, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.ClusterUserAttribute, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedClusterUserAttributeLister in code that requires ClusterUserAttributeLister +// // and then make assertions. +// +// } +type ClusterUserAttributeListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.ClusterUserAttribute, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.ClusterUserAttribute, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *ClusterUserAttributeListerMock) Get(namespace string, name string) (*v3.ClusterUserAttribute, error) { + if mock.GetFunc == nil { + panic("ClusterUserAttributeListerMock.GetFunc: method is nil but ClusterUserAttributeLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockClusterUserAttributeListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockClusterUserAttributeListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedClusterUserAttributeLister.GetCalls()) +func (mock *ClusterUserAttributeListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockClusterUserAttributeListerMockGet.RLock() + calls = mock.calls.Get + lockClusterUserAttributeListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ClusterUserAttributeListerMock) List(namespace string, selector labels.Selector) ([]*v3.ClusterUserAttribute, error) { + if mock.ListFunc == nil { + panic("ClusterUserAttributeListerMock.ListFunc: method is nil but ClusterUserAttributeLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockClusterUserAttributeListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockClusterUserAttributeListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedClusterUserAttributeLister.ListCalls()) +func (mock *ClusterUserAttributeListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockClusterUserAttributeListerMockList.RLock() + calls = mock.calls.List + lockClusterUserAttributeListerMockList.RUnlock() + return calls +} + +var ( + lockClusterUserAttributeControllerMockAddClusterScopedHandler sync.RWMutex + lockClusterUserAttributeControllerMockAddHandler sync.RWMutex + lockClusterUserAttributeControllerMockEnqueue sync.RWMutex + lockClusterUserAttributeControllerMockGeneric sync.RWMutex + lockClusterUserAttributeControllerMockInformer sync.RWMutex + lockClusterUserAttributeControllerMockLister sync.RWMutex + lockClusterUserAttributeControllerMockStart sync.RWMutex + lockClusterUserAttributeControllerMockSync sync.RWMutex +) + +// Ensure, that ClusterUserAttributeControllerMock does implement ClusterUserAttributeController. +// If this is not the case, regenerate this file with moq. +var _ v3.ClusterUserAttributeController = &ClusterUserAttributeControllerMock{} + +// ClusterUserAttributeControllerMock is a mock implementation of ClusterUserAttributeController. +// +// func TestSomethingThatUsesClusterUserAttributeController(t *testing.T) { +// +// // make and configure a mocked ClusterUserAttributeController +// mockedClusterUserAttributeController := &ClusterUserAttributeControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.ClusterUserAttributeHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.ClusterUserAttributeHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.ClusterUserAttributeLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedClusterUserAttributeController in code that requires ClusterUserAttributeController +// // and then make assertions. +// +// } +type ClusterUserAttributeControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.ClusterUserAttributeHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.ClusterUserAttributeHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.ClusterUserAttributeLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.ClusterUserAttributeHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.ClusterUserAttributeHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ClusterUserAttributeControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.ClusterUserAttributeHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ClusterUserAttributeControllerMock.AddClusterScopedHandlerFunc: method is nil but ClusterUserAttributeController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ClusterUserAttributeHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockClusterUserAttributeControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockClusterUserAttributeControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedClusterUserAttributeController.AddClusterScopedHandlerCalls()) +func (mock *ClusterUserAttributeControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ClusterUserAttributeHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ClusterUserAttributeHandlerFunc + } + lockClusterUserAttributeControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockClusterUserAttributeControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ClusterUserAttributeControllerMock) AddHandler(ctx context.Context, name string, handler v3.ClusterUserAttributeHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ClusterUserAttributeControllerMock.AddHandlerFunc: method is nil but ClusterUserAttributeController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.ClusterUserAttributeHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockClusterUserAttributeControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockClusterUserAttributeControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedClusterUserAttributeController.AddHandlerCalls()) +func (mock *ClusterUserAttributeControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.ClusterUserAttributeHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.ClusterUserAttributeHandlerFunc + } + lockClusterUserAttributeControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockClusterUserAttributeControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *ClusterUserAttributeControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("ClusterUserAttributeControllerMock.EnqueueFunc: method is nil but ClusterUserAttributeController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockClusterUserAttributeControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockClusterUserAttributeControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedClusterUserAttributeController.EnqueueCalls()) +func (mock *ClusterUserAttributeControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockClusterUserAttributeControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockClusterUserAttributeControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *ClusterUserAttributeControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("ClusterUserAttributeControllerMock.GenericFunc: method is nil but ClusterUserAttributeController.Generic was just called") + } + callInfo := struct { + }{} + lockClusterUserAttributeControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockClusterUserAttributeControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedClusterUserAttributeController.GenericCalls()) +func (mock *ClusterUserAttributeControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockClusterUserAttributeControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockClusterUserAttributeControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *ClusterUserAttributeControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("ClusterUserAttributeControllerMock.InformerFunc: method is nil but ClusterUserAttributeController.Informer was just called") + } + callInfo := struct { + }{} + lockClusterUserAttributeControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockClusterUserAttributeControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedClusterUserAttributeController.InformerCalls()) +func (mock *ClusterUserAttributeControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockClusterUserAttributeControllerMockInformer.RLock() + calls = mock.calls.Informer + lockClusterUserAttributeControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *ClusterUserAttributeControllerMock) Lister() v3.ClusterUserAttributeLister { + if mock.ListerFunc == nil { + panic("ClusterUserAttributeControllerMock.ListerFunc: method is nil but ClusterUserAttributeController.Lister was just called") + } + callInfo := struct { + }{} + lockClusterUserAttributeControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockClusterUserAttributeControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedClusterUserAttributeController.ListerCalls()) +func (mock *ClusterUserAttributeControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockClusterUserAttributeControllerMockLister.RLock() + calls = mock.calls.Lister + lockClusterUserAttributeControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *ClusterUserAttributeControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("ClusterUserAttributeControllerMock.StartFunc: method is nil but ClusterUserAttributeController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockClusterUserAttributeControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockClusterUserAttributeControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedClusterUserAttributeController.StartCalls()) +func (mock *ClusterUserAttributeControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockClusterUserAttributeControllerMockStart.RLock() + calls = mock.calls.Start + lockClusterUserAttributeControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *ClusterUserAttributeControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("ClusterUserAttributeControllerMock.SyncFunc: method is nil but ClusterUserAttributeController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockClusterUserAttributeControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockClusterUserAttributeControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedClusterUserAttributeController.SyncCalls()) +func (mock *ClusterUserAttributeControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockClusterUserAttributeControllerMockSync.RLock() + calls = mock.calls.Sync + lockClusterUserAttributeControllerMockSync.RUnlock() + return calls +} + +var ( + lockClusterUserAttributeInterfaceMockAddClusterScopedHandler sync.RWMutex + lockClusterUserAttributeInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockClusterUserAttributeInterfaceMockAddHandler sync.RWMutex + lockClusterUserAttributeInterfaceMockAddLifecycle sync.RWMutex + lockClusterUserAttributeInterfaceMockController sync.RWMutex + lockClusterUserAttributeInterfaceMockCreate sync.RWMutex + lockClusterUserAttributeInterfaceMockDelete sync.RWMutex + lockClusterUserAttributeInterfaceMockDeleteCollection sync.RWMutex + lockClusterUserAttributeInterfaceMockDeleteNamespaced sync.RWMutex + lockClusterUserAttributeInterfaceMockGet sync.RWMutex + lockClusterUserAttributeInterfaceMockGetNamespaced sync.RWMutex + lockClusterUserAttributeInterfaceMockList sync.RWMutex + lockClusterUserAttributeInterfaceMockObjectClient sync.RWMutex + lockClusterUserAttributeInterfaceMockUpdate sync.RWMutex + lockClusterUserAttributeInterfaceMockWatch sync.RWMutex +) + +// Ensure, that ClusterUserAttributeInterfaceMock does implement ClusterUserAttributeInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.ClusterUserAttributeInterface = &ClusterUserAttributeInterfaceMock{} + +// ClusterUserAttributeInterfaceMock is a mock implementation of ClusterUserAttributeInterface. +// +// func TestSomethingThatUsesClusterUserAttributeInterface(t *testing.T) { +// +// // make and configure a mocked ClusterUserAttributeInterface +// mockedClusterUserAttributeInterface := &ClusterUserAttributeInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.ClusterUserAttributeHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.ClusterUserAttributeLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.ClusterUserAttributeHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.ClusterUserAttributeLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.ClusterUserAttributeController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.ClusterUserAttribute) (*v3.ClusterUserAttribute, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.ClusterUserAttribute, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.ClusterUserAttribute, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.ClusterUserAttributeList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.ClusterUserAttribute) (*v3.ClusterUserAttribute, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedClusterUserAttributeInterface in code that requires ClusterUserAttributeInterface +// // and then make assertions. +// +// } +type ClusterUserAttributeInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.ClusterUserAttributeHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.ClusterUserAttributeLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.ClusterUserAttributeHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.ClusterUserAttributeLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.ClusterUserAttributeController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.ClusterUserAttribute) (*v3.ClusterUserAttribute, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.ClusterUserAttribute, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.ClusterUserAttribute, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.ClusterUserAttributeList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.ClusterUserAttribute) (*v3.ClusterUserAttribute, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.ClusterUserAttributeHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.ClusterUserAttributeLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.ClusterUserAttributeHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.ClusterUserAttributeLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.ClusterUserAttribute + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.ClusterUserAttribute + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ClusterUserAttributeInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.ClusterUserAttributeHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ClusterUserAttributeInterfaceMock.AddClusterScopedHandlerFunc: method is nil but ClusterUserAttributeInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ClusterUserAttributeHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockClusterUserAttributeInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockClusterUserAttributeInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedClusterUserAttributeInterface.AddClusterScopedHandlerCalls()) +func (mock *ClusterUserAttributeInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ClusterUserAttributeHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ClusterUserAttributeHandlerFunc + } + lockClusterUserAttributeInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockClusterUserAttributeInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *ClusterUserAttributeInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.ClusterUserAttributeLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("ClusterUserAttributeInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but ClusterUserAttributeInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ClusterUserAttributeLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockClusterUserAttributeInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockClusterUserAttributeInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedClusterUserAttributeInterface.AddClusterScopedLifecycleCalls()) +func (mock *ClusterUserAttributeInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ClusterUserAttributeLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ClusterUserAttributeLifecycle + } + lockClusterUserAttributeInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockClusterUserAttributeInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ClusterUserAttributeInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.ClusterUserAttributeHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ClusterUserAttributeInterfaceMock.AddHandlerFunc: method is nil but ClusterUserAttributeInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.ClusterUserAttributeHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockClusterUserAttributeInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockClusterUserAttributeInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedClusterUserAttributeInterface.AddHandlerCalls()) +func (mock *ClusterUserAttributeInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.ClusterUserAttributeHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.ClusterUserAttributeHandlerFunc + } + lockClusterUserAttributeInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockClusterUserAttributeInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *ClusterUserAttributeInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.ClusterUserAttributeLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("ClusterUserAttributeInterfaceMock.AddLifecycleFunc: method is nil but ClusterUserAttributeInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.ClusterUserAttributeLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockClusterUserAttributeInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockClusterUserAttributeInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedClusterUserAttributeInterface.AddLifecycleCalls()) +func (mock *ClusterUserAttributeInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.ClusterUserAttributeLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.ClusterUserAttributeLifecycle + } + lockClusterUserAttributeInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockClusterUserAttributeInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *ClusterUserAttributeInterfaceMock) Controller() v3.ClusterUserAttributeController { + if mock.ControllerFunc == nil { + panic("ClusterUserAttributeInterfaceMock.ControllerFunc: method is nil but ClusterUserAttributeInterface.Controller was just called") + } + callInfo := struct { + }{} + lockClusterUserAttributeInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockClusterUserAttributeInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedClusterUserAttributeInterface.ControllerCalls()) +func (mock *ClusterUserAttributeInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockClusterUserAttributeInterfaceMockController.RLock() + calls = mock.calls.Controller + lockClusterUserAttributeInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *ClusterUserAttributeInterfaceMock) Create(in1 *v3.ClusterUserAttribute) (*v3.ClusterUserAttribute, error) { + if mock.CreateFunc == nil { + panic("ClusterUserAttributeInterfaceMock.CreateFunc: method is nil but ClusterUserAttributeInterface.Create was just called") + } + callInfo := struct { + In1 *v3.ClusterUserAttribute + }{ + In1: in1, + } + lockClusterUserAttributeInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockClusterUserAttributeInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedClusterUserAttributeInterface.CreateCalls()) +func (mock *ClusterUserAttributeInterfaceMock) CreateCalls() []struct { + In1 *v3.ClusterUserAttribute +} { + var calls []struct { + In1 *v3.ClusterUserAttribute + } + lockClusterUserAttributeInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockClusterUserAttributeInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *ClusterUserAttributeInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("ClusterUserAttributeInterfaceMock.DeleteFunc: method is nil but ClusterUserAttributeInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockClusterUserAttributeInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockClusterUserAttributeInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedClusterUserAttributeInterface.DeleteCalls()) +func (mock *ClusterUserAttributeInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockClusterUserAttributeInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockClusterUserAttributeInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *ClusterUserAttributeInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("ClusterUserAttributeInterfaceMock.DeleteCollectionFunc: method is nil but ClusterUserAttributeInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockClusterUserAttributeInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockClusterUserAttributeInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedClusterUserAttributeInterface.DeleteCollectionCalls()) +func (mock *ClusterUserAttributeInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockClusterUserAttributeInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockClusterUserAttributeInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *ClusterUserAttributeInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("ClusterUserAttributeInterfaceMock.DeleteNamespacedFunc: method is nil but ClusterUserAttributeInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockClusterUserAttributeInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockClusterUserAttributeInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedClusterUserAttributeInterface.DeleteNamespacedCalls()) +func (mock *ClusterUserAttributeInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockClusterUserAttributeInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockClusterUserAttributeInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *ClusterUserAttributeInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.ClusterUserAttribute, error) { + if mock.GetFunc == nil { + panic("ClusterUserAttributeInterfaceMock.GetFunc: method is nil but ClusterUserAttributeInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockClusterUserAttributeInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockClusterUserAttributeInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedClusterUserAttributeInterface.GetCalls()) +func (mock *ClusterUserAttributeInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockClusterUserAttributeInterfaceMockGet.RLock() + calls = mock.calls.Get + lockClusterUserAttributeInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *ClusterUserAttributeInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.ClusterUserAttribute, error) { + if mock.GetNamespacedFunc == nil { + panic("ClusterUserAttributeInterfaceMock.GetNamespacedFunc: method is nil but ClusterUserAttributeInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockClusterUserAttributeInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockClusterUserAttributeInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedClusterUserAttributeInterface.GetNamespacedCalls()) +func (mock *ClusterUserAttributeInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockClusterUserAttributeInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockClusterUserAttributeInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ClusterUserAttributeInterfaceMock) List(opts v1.ListOptions) (*v3.ClusterUserAttributeList, error) { + if mock.ListFunc == nil { + panic("ClusterUserAttributeInterfaceMock.ListFunc: method is nil but ClusterUserAttributeInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockClusterUserAttributeInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockClusterUserAttributeInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedClusterUserAttributeInterface.ListCalls()) +func (mock *ClusterUserAttributeInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockClusterUserAttributeInterfaceMockList.RLock() + calls = mock.calls.List + lockClusterUserAttributeInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *ClusterUserAttributeInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("ClusterUserAttributeInterfaceMock.ObjectClientFunc: method is nil but ClusterUserAttributeInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockClusterUserAttributeInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockClusterUserAttributeInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedClusterUserAttributeInterface.ObjectClientCalls()) +func (mock *ClusterUserAttributeInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockClusterUserAttributeInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockClusterUserAttributeInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *ClusterUserAttributeInterfaceMock) Update(in1 *v3.ClusterUserAttribute) (*v3.ClusterUserAttribute, error) { + if mock.UpdateFunc == nil { + panic("ClusterUserAttributeInterfaceMock.UpdateFunc: method is nil but ClusterUserAttributeInterface.Update was just called") + } + callInfo := struct { + In1 *v3.ClusterUserAttribute + }{ + In1: in1, + } + lockClusterUserAttributeInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockClusterUserAttributeInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedClusterUserAttributeInterface.UpdateCalls()) +func (mock *ClusterUserAttributeInterfaceMock) UpdateCalls() []struct { + In1 *v3.ClusterUserAttribute +} { + var calls []struct { + In1 *v3.ClusterUserAttribute + } + lockClusterUserAttributeInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockClusterUserAttributeInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *ClusterUserAttributeInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("ClusterUserAttributeInterfaceMock.WatchFunc: method is nil but ClusterUserAttributeInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockClusterUserAttributeInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockClusterUserAttributeInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedClusterUserAttributeInterface.WatchCalls()) +func (mock *ClusterUserAttributeInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockClusterUserAttributeInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockClusterUserAttributeInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockClusterUserAttributesGetterMockClusterUserAttributes sync.RWMutex +) + +// Ensure, that ClusterUserAttributesGetterMock does implement ClusterUserAttributesGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.ClusterUserAttributesGetter = &ClusterUserAttributesGetterMock{} + +// ClusterUserAttributesGetterMock is a mock implementation of ClusterUserAttributesGetter. +// +// func TestSomethingThatUsesClusterUserAttributesGetter(t *testing.T) { +// +// // make and configure a mocked ClusterUserAttributesGetter +// mockedClusterUserAttributesGetter := &ClusterUserAttributesGetterMock{ +// ClusterUserAttributesFunc: func(namespace string) v3.ClusterUserAttributeInterface { +// panic("mock out the ClusterUserAttributes method") +// }, +// } +// +// // use mockedClusterUserAttributesGetter in code that requires ClusterUserAttributesGetter +// // and then make assertions. +// +// } +type ClusterUserAttributesGetterMock struct { + // ClusterUserAttributesFunc mocks the ClusterUserAttributes method. + ClusterUserAttributesFunc func(namespace string) v3.ClusterUserAttributeInterface + + // calls tracks calls to the methods. + calls struct { + // ClusterUserAttributes holds details about calls to the ClusterUserAttributes method. + ClusterUserAttributes []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// ClusterUserAttributes calls ClusterUserAttributesFunc. +func (mock *ClusterUserAttributesGetterMock) ClusterUserAttributes(namespace string) v3.ClusterUserAttributeInterface { + if mock.ClusterUserAttributesFunc == nil { + panic("ClusterUserAttributesGetterMock.ClusterUserAttributesFunc: method is nil but ClusterUserAttributesGetter.ClusterUserAttributes was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockClusterUserAttributesGetterMockClusterUserAttributes.Lock() + mock.calls.ClusterUserAttributes = append(mock.calls.ClusterUserAttributes, callInfo) + lockClusterUserAttributesGetterMockClusterUserAttributes.Unlock() + return mock.ClusterUserAttributesFunc(namespace) +} + +// ClusterUserAttributesCalls gets all the calls that were made to ClusterUserAttributes. +// Check the length with: +// len(mockedClusterUserAttributesGetter.ClusterUserAttributesCalls()) +func (mock *ClusterUserAttributesGetterMock) ClusterUserAttributesCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockClusterUserAttributesGetterMockClusterUserAttributes.RLock() + calls = mock.calls.ClusterUserAttributes + lockClusterUserAttributesGetterMockClusterUserAttributes.RUnlock() + return calls +} diff --git a/apis/cluster.cattle.io/v3/zz_generated_cluster_auth_token_controller.go b/apis/cluster.cattle.io/v3/zz_generated_cluster_auth_token_controller.go index 8c409da6..3fdb1e6f 100644 --- a/apis/cluster.cattle.io/v3/zz_generated_cluster_auth_token_controller.go +++ b/apis/cluster.cattle.io/v3/zz_generated_cluster_auth_token_controller.go @@ -40,7 +40,7 @@ func NewClusterAuthToken(namespace, name string, obj ClusterAuthToken) *ClusterA type ClusterAuthTokenList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []ClusterAuthToken + Items []ClusterAuthToken `json:"items"` } type ClusterAuthTokenHandlerFunc func(key string, obj *ClusterAuthToken) (runtime.Object, error) diff --git a/apis/cluster.cattle.io/v3/zz_generated_cluster_user_attribute_controller.go b/apis/cluster.cattle.io/v3/zz_generated_cluster_user_attribute_controller.go index ea512596..833a56a6 100644 --- a/apis/cluster.cattle.io/v3/zz_generated_cluster_user_attribute_controller.go +++ b/apis/cluster.cattle.io/v3/zz_generated_cluster_user_attribute_controller.go @@ -40,7 +40,7 @@ func NewClusterUserAttribute(namespace, name string, obj ClusterUserAttribute) * type ClusterUserAttributeList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []ClusterUserAttribute + Items []ClusterUserAttribute `json:"items"` } type ClusterUserAttributeHandlerFunc func(key string, obj *ClusterUserAttribute) (runtime.Object, error) diff --git a/apis/cluster.cattle.io/v3/zz_generated_scheme.go b/apis/cluster.cattle.io/v3/zz_generated_scheme.go index c7abd7af..86720fd9 100644 --- a/apis/cluster.cattle.io/v3/zz_generated_scheme.go +++ b/apis/cluster.cattle.io/v3/zz_generated_scheme.go @@ -1,6 +1,7 @@ package v3 import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) @@ -36,5 +37,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &ClusterAuthToken{}, &ClusterUserAttribute{}, ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil } diff --git a/apis/core/v1/fakes/zz_generated_component_status_mock_test.go b/apis/core/v1/fakes/zz_generated_component_status_mock_test.go new file mode 100644 index 00000000..a236592a --- /dev/null +++ b/apis/core/v1/fakes/zz_generated_component_status_mock_test.go @@ -0,0 +1,1357 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v1a "github.com/rancher/types/apis/core/v1" + v1 "k8s.io/api/core/v1" + v1b "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockComponentStatusListerMockGet sync.RWMutex + lockComponentStatusListerMockList sync.RWMutex +) + +// Ensure, that ComponentStatusListerMock does implement ComponentStatusLister. +// If this is not the case, regenerate this file with moq. +var _ v1a.ComponentStatusLister = &ComponentStatusListerMock{} + +// ComponentStatusListerMock is a mock implementation of ComponentStatusLister. +// +// func TestSomethingThatUsesComponentStatusLister(t *testing.T) { +// +// // make and configure a mocked ComponentStatusLister +// mockedComponentStatusLister := &ComponentStatusListerMock{ +// GetFunc: func(namespace string, name string) (*v1.ComponentStatus, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v1.ComponentStatus, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedComponentStatusLister in code that requires ComponentStatusLister +// // and then make assertions. +// +// } +type ComponentStatusListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v1.ComponentStatus, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v1.ComponentStatus, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *ComponentStatusListerMock) Get(namespace string, name string) (*v1.ComponentStatus, error) { + if mock.GetFunc == nil { + panic("ComponentStatusListerMock.GetFunc: method is nil but ComponentStatusLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockComponentStatusListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockComponentStatusListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedComponentStatusLister.GetCalls()) +func (mock *ComponentStatusListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockComponentStatusListerMockGet.RLock() + calls = mock.calls.Get + lockComponentStatusListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ComponentStatusListerMock) List(namespace string, selector labels.Selector) ([]*v1.ComponentStatus, error) { + if mock.ListFunc == nil { + panic("ComponentStatusListerMock.ListFunc: method is nil but ComponentStatusLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockComponentStatusListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockComponentStatusListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedComponentStatusLister.ListCalls()) +func (mock *ComponentStatusListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockComponentStatusListerMockList.RLock() + calls = mock.calls.List + lockComponentStatusListerMockList.RUnlock() + return calls +} + +var ( + lockComponentStatusControllerMockAddClusterScopedHandler sync.RWMutex + lockComponentStatusControllerMockAddHandler sync.RWMutex + lockComponentStatusControllerMockEnqueue sync.RWMutex + lockComponentStatusControllerMockGeneric sync.RWMutex + lockComponentStatusControllerMockInformer sync.RWMutex + lockComponentStatusControllerMockLister sync.RWMutex + lockComponentStatusControllerMockStart sync.RWMutex + lockComponentStatusControllerMockSync sync.RWMutex +) + +// Ensure, that ComponentStatusControllerMock does implement ComponentStatusController. +// If this is not the case, regenerate this file with moq. +var _ v1a.ComponentStatusController = &ComponentStatusControllerMock{} + +// ComponentStatusControllerMock is a mock implementation of ComponentStatusController. +// +// func TestSomethingThatUsesComponentStatusController(t *testing.T) { +// +// // make and configure a mocked ComponentStatusController +// mockedComponentStatusController := &ComponentStatusControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v1a.ComponentStatusHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v1a.ComponentStatusHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v1a.ComponentStatusLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedComponentStatusController in code that requires ComponentStatusController +// // and then make assertions. +// +// } +type ComponentStatusControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v1a.ComponentStatusHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v1a.ComponentStatusHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v1a.ComponentStatusLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v1a.ComponentStatusHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v1a.ComponentStatusHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ComponentStatusControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v1a.ComponentStatusHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ComponentStatusControllerMock.AddClusterScopedHandlerFunc: method is nil but ComponentStatusController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.ComponentStatusHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockComponentStatusControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockComponentStatusControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedComponentStatusController.AddClusterScopedHandlerCalls()) +func (mock *ComponentStatusControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.ComponentStatusHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.ComponentStatusHandlerFunc + } + lockComponentStatusControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockComponentStatusControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ComponentStatusControllerMock) AddHandler(ctx context.Context, name string, handler v1a.ComponentStatusHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ComponentStatusControllerMock.AddHandlerFunc: method is nil but ComponentStatusController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v1a.ComponentStatusHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockComponentStatusControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockComponentStatusControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedComponentStatusController.AddHandlerCalls()) +func (mock *ComponentStatusControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v1a.ComponentStatusHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v1a.ComponentStatusHandlerFunc + } + lockComponentStatusControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockComponentStatusControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *ComponentStatusControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("ComponentStatusControllerMock.EnqueueFunc: method is nil but ComponentStatusController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockComponentStatusControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockComponentStatusControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedComponentStatusController.EnqueueCalls()) +func (mock *ComponentStatusControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockComponentStatusControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockComponentStatusControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *ComponentStatusControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("ComponentStatusControllerMock.GenericFunc: method is nil but ComponentStatusController.Generic was just called") + } + callInfo := struct { + }{} + lockComponentStatusControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockComponentStatusControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedComponentStatusController.GenericCalls()) +func (mock *ComponentStatusControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockComponentStatusControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockComponentStatusControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *ComponentStatusControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("ComponentStatusControllerMock.InformerFunc: method is nil but ComponentStatusController.Informer was just called") + } + callInfo := struct { + }{} + lockComponentStatusControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockComponentStatusControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedComponentStatusController.InformerCalls()) +func (mock *ComponentStatusControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockComponentStatusControllerMockInformer.RLock() + calls = mock.calls.Informer + lockComponentStatusControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *ComponentStatusControllerMock) Lister() v1a.ComponentStatusLister { + if mock.ListerFunc == nil { + panic("ComponentStatusControllerMock.ListerFunc: method is nil but ComponentStatusController.Lister was just called") + } + callInfo := struct { + }{} + lockComponentStatusControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockComponentStatusControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedComponentStatusController.ListerCalls()) +func (mock *ComponentStatusControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockComponentStatusControllerMockLister.RLock() + calls = mock.calls.Lister + lockComponentStatusControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *ComponentStatusControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("ComponentStatusControllerMock.StartFunc: method is nil but ComponentStatusController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockComponentStatusControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockComponentStatusControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedComponentStatusController.StartCalls()) +func (mock *ComponentStatusControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockComponentStatusControllerMockStart.RLock() + calls = mock.calls.Start + lockComponentStatusControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *ComponentStatusControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("ComponentStatusControllerMock.SyncFunc: method is nil but ComponentStatusController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockComponentStatusControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockComponentStatusControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedComponentStatusController.SyncCalls()) +func (mock *ComponentStatusControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockComponentStatusControllerMockSync.RLock() + calls = mock.calls.Sync + lockComponentStatusControllerMockSync.RUnlock() + return calls +} + +var ( + lockComponentStatusInterfaceMockAddClusterScopedHandler sync.RWMutex + lockComponentStatusInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockComponentStatusInterfaceMockAddHandler sync.RWMutex + lockComponentStatusInterfaceMockAddLifecycle sync.RWMutex + lockComponentStatusInterfaceMockController sync.RWMutex + lockComponentStatusInterfaceMockCreate sync.RWMutex + lockComponentStatusInterfaceMockDelete sync.RWMutex + lockComponentStatusInterfaceMockDeleteCollection sync.RWMutex + lockComponentStatusInterfaceMockDeleteNamespaced sync.RWMutex + lockComponentStatusInterfaceMockGet sync.RWMutex + lockComponentStatusInterfaceMockGetNamespaced sync.RWMutex + lockComponentStatusInterfaceMockList sync.RWMutex + lockComponentStatusInterfaceMockObjectClient sync.RWMutex + lockComponentStatusInterfaceMockUpdate sync.RWMutex + lockComponentStatusInterfaceMockWatch sync.RWMutex +) + +// Ensure, that ComponentStatusInterfaceMock does implement ComponentStatusInterface. +// If this is not the case, regenerate this file with moq. +var _ v1a.ComponentStatusInterface = &ComponentStatusInterfaceMock{} + +// ComponentStatusInterfaceMock is a mock implementation of ComponentStatusInterface. +// +// func TestSomethingThatUsesComponentStatusInterface(t *testing.T) { +// +// // make and configure a mocked ComponentStatusInterface +// mockedComponentStatusInterface := &ComponentStatusInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v1a.ComponentStatusHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v1a.ComponentStatusLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v1a.ComponentStatusHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v1a.ComponentStatusLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v1a.ComponentStatusController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v1.ComponentStatus) (*v1.ComponentStatus, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1b.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1b.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1b.GetOptions) (*v1.ComponentStatus, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.ComponentStatus, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1b.ListOptions) (*v1a.ComponentStatusList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v1.ComponentStatus) (*v1.ComponentStatus, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1b.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedComponentStatusInterface in code that requires ComponentStatusInterface +// // and then make assertions. +// +// } +type ComponentStatusInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v1a.ComponentStatusHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v1a.ComponentStatusLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v1a.ComponentStatusHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v1a.ComponentStatusLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v1a.ComponentStatusController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v1.ComponentStatus) (*v1.ComponentStatus, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1b.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1b.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1b.GetOptions) (*v1.ComponentStatus, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.ComponentStatus, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1b.ListOptions) (*v1a.ComponentStatusList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v1.ComponentStatus) (*v1.ComponentStatus, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1b.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v1a.ComponentStatusHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v1a.ComponentStatusLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v1a.ComponentStatusHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v1a.ComponentStatusLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v1.ComponentStatus + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1b.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1b.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1b.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1b.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1b.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1b.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1b.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v1.ComponentStatus + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1b.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ComponentStatusInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v1a.ComponentStatusHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ComponentStatusInterfaceMock.AddClusterScopedHandlerFunc: method is nil but ComponentStatusInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.ComponentStatusHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockComponentStatusInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockComponentStatusInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedComponentStatusInterface.AddClusterScopedHandlerCalls()) +func (mock *ComponentStatusInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.ComponentStatusHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.ComponentStatusHandlerFunc + } + lockComponentStatusInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockComponentStatusInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *ComponentStatusInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v1a.ComponentStatusLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("ComponentStatusInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but ComponentStatusInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.ComponentStatusLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockComponentStatusInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockComponentStatusInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedComponentStatusInterface.AddClusterScopedLifecycleCalls()) +func (mock *ComponentStatusInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.ComponentStatusLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.ComponentStatusLifecycle + } + lockComponentStatusInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockComponentStatusInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ComponentStatusInterfaceMock) AddHandler(ctx context.Context, name string, sync v1a.ComponentStatusHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ComponentStatusInterfaceMock.AddHandlerFunc: method is nil but ComponentStatusInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v1a.ComponentStatusHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockComponentStatusInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockComponentStatusInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedComponentStatusInterface.AddHandlerCalls()) +func (mock *ComponentStatusInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v1a.ComponentStatusHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v1a.ComponentStatusHandlerFunc + } + lockComponentStatusInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockComponentStatusInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *ComponentStatusInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v1a.ComponentStatusLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("ComponentStatusInterfaceMock.AddLifecycleFunc: method is nil but ComponentStatusInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v1a.ComponentStatusLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockComponentStatusInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockComponentStatusInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedComponentStatusInterface.AddLifecycleCalls()) +func (mock *ComponentStatusInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v1a.ComponentStatusLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v1a.ComponentStatusLifecycle + } + lockComponentStatusInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockComponentStatusInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *ComponentStatusInterfaceMock) Controller() v1a.ComponentStatusController { + if mock.ControllerFunc == nil { + panic("ComponentStatusInterfaceMock.ControllerFunc: method is nil but ComponentStatusInterface.Controller was just called") + } + callInfo := struct { + }{} + lockComponentStatusInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockComponentStatusInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedComponentStatusInterface.ControllerCalls()) +func (mock *ComponentStatusInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockComponentStatusInterfaceMockController.RLock() + calls = mock.calls.Controller + lockComponentStatusInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *ComponentStatusInterfaceMock) Create(in1 *v1.ComponentStatus) (*v1.ComponentStatus, error) { + if mock.CreateFunc == nil { + panic("ComponentStatusInterfaceMock.CreateFunc: method is nil but ComponentStatusInterface.Create was just called") + } + callInfo := struct { + In1 *v1.ComponentStatus + }{ + In1: in1, + } + lockComponentStatusInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockComponentStatusInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedComponentStatusInterface.CreateCalls()) +func (mock *ComponentStatusInterfaceMock) CreateCalls() []struct { + In1 *v1.ComponentStatus +} { + var calls []struct { + In1 *v1.ComponentStatus + } + lockComponentStatusInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockComponentStatusInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *ComponentStatusInterfaceMock) Delete(name string, options *v1b.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("ComponentStatusInterfaceMock.DeleteFunc: method is nil but ComponentStatusInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1b.DeleteOptions + }{ + Name: name, + Options: options, + } + lockComponentStatusInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockComponentStatusInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedComponentStatusInterface.DeleteCalls()) +func (mock *ComponentStatusInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1b.DeleteOptions +} { + var calls []struct { + Name string + Options *v1b.DeleteOptions + } + lockComponentStatusInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockComponentStatusInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *ComponentStatusInterfaceMock) DeleteCollection(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("ComponentStatusInterfaceMock.DeleteCollectionFunc: method is nil but ComponentStatusInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockComponentStatusInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockComponentStatusInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedComponentStatusInterface.DeleteCollectionCalls()) +func (mock *ComponentStatusInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions +} { + var calls []struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions + } + lockComponentStatusInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockComponentStatusInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *ComponentStatusInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1b.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("ComponentStatusInterfaceMock.DeleteNamespacedFunc: method is nil but ComponentStatusInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1b.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockComponentStatusInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockComponentStatusInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedComponentStatusInterface.DeleteNamespacedCalls()) +func (mock *ComponentStatusInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1b.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1b.DeleteOptions + } + lockComponentStatusInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockComponentStatusInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *ComponentStatusInterfaceMock) Get(name string, opts v1b.GetOptions) (*v1.ComponentStatus, error) { + if mock.GetFunc == nil { + panic("ComponentStatusInterfaceMock.GetFunc: method is nil but ComponentStatusInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1b.GetOptions + }{ + Name: name, + Opts: opts, + } + lockComponentStatusInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockComponentStatusInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedComponentStatusInterface.GetCalls()) +func (mock *ComponentStatusInterfaceMock) GetCalls() []struct { + Name string + Opts v1b.GetOptions +} { + var calls []struct { + Name string + Opts v1b.GetOptions + } + lockComponentStatusInterfaceMockGet.RLock() + calls = mock.calls.Get + lockComponentStatusInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *ComponentStatusInterfaceMock) GetNamespaced(namespace string, name string, opts v1b.GetOptions) (*v1.ComponentStatus, error) { + if mock.GetNamespacedFunc == nil { + panic("ComponentStatusInterfaceMock.GetNamespacedFunc: method is nil but ComponentStatusInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1b.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockComponentStatusInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockComponentStatusInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedComponentStatusInterface.GetNamespacedCalls()) +func (mock *ComponentStatusInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1b.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1b.GetOptions + } + lockComponentStatusInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockComponentStatusInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ComponentStatusInterfaceMock) List(opts v1b.ListOptions) (*v1a.ComponentStatusList, error) { + if mock.ListFunc == nil { + panic("ComponentStatusInterfaceMock.ListFunc: method is nil but ComponentStatusInterface.List was just called") + } + callInfo := struct { + Opts v1b.ListOptions + }{ + Opts: opts, + } + lockComponentStatusInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockComponentStatusInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedComponentStatusInterface.ListCalls()) +func (mock *ComponentStatusInterfaceMock) ListCalls() []struct { + Opts v1b.ListOptions +} { + var calls []struct { + Opts v1b.ListOptions + } + lockComponentStatusInterfaceMockList.RLock() + calls = mock.calls.List + lockComponentStatusInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *ComponentStatusInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("ComponentStatusInterfaceMock.ObjectClientFunc: method is nil but ComponentStatusInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockComponentStatusInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockComponentStatusInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedComponentStatusInterface.ObjectClientCalls()) +func (mock *ComponentStatusInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockComponentStatusInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockComponentStatusInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *ComponentStatusInterfaceMock) Update(in1 *v1.ComponentStatus) (*v1.ComponentStatus, error) { + if mock.UpdateFunc == nil { + panic("ComponentStatusInterfaceMock.UpdateFunc: method is nil but ComponentStatusInterface.Update was just called") + } + callInfo := struct { + In1 *v1.ComponentStatus + }{ + In1: in1, + } + lockComponentStatusInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockComponentStatusInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedComponentStatusInterface.UpdateCalls()) +func (mock *ComponentStatusInterfaceMock) UpdateCalls() []struct { + In1 *v1.ComponentStatus +} { + var calls []struct { + In1 *v1.ComponentStatus + } + lockComponentStatusInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockComponentStatusInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *ComponentStatusInterfaceMock) Watch(opts v1b.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("ComponentStatusInterfaceMock.WatchFunc: method is nil but ComponentStatusInterface.Watch was just called") + } + callInfo := struct { + Opts v1b.ListOptions + }{ + Opts: opts, + } + lockComponentStatusInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockComponentStatusInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedComponentStatusInterface.WatchCalls()) +func (mock *ComponentStatusInterfaceMock) WatchCalls() []struct { + Opts v1b.ListOptions +} { + var calls []struct { + Opts v1b.ListOptions + } + lockComponentStatusInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockComponentStatusInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockComponentStatusesGetterMockComponentStatuses sync.RWMutex +) + +// Ensure, that ComponentStatusesGetterMock does implement ComponentStatusesGetter. +// If this is not the case, regenerate this file with moq. +var _ v1a.ComponentStatusesGetter = &ComponentStatusesGetterMock{} + +// ComponentStatusesGetterMock is a mock implementation of ComponentStatusesGetter. +// +// func TestSomethingThatUsesComponentStatusesGetter(t *testing.T) { +// +// // make and configure a mocked ComponentStatusesGetter +// mockedComponentStatusesGetter := &ComponentStatusesGetterMock{ +// ComponentStatusesFunc: func(namespace string) v1a.ComponentStatusInterface { +// panic("mock out the ComponentStatuses method") +// }, +// } +// +// // use mockedComponentStatusesGetter in code that requires ComponentStatusesGetter +// // and then make assertions. +// +// } +type ComponentStatusesGetterMock struct { + // ComponentStatusesFunc mocks the ComponentStatuses method. + ComponentStatusesFunc func(namespace string) v1a.ComponentStatusInterface + + // calls tracks calls to the methods. + calls struct { + // ComponentStatuses holds details about calls to the ComponentStatuses method. + ComponentStatuses []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// ComponentStatuses calls ComponentStatusesFunc. +func (mock *ComponentStatusesGetterMock) ComponentStatuses(namespace string) v1a.ComponentStatusInterface { + if mock.ComponentStatusesFunc == nil { + panic("ComponentStatusesGetterMock.ComponentStatusesFunc: method is nil but ComponentStatusesGetter.ComponentStatuses was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockComponentStatusesGetterMockComponentStatuses.Lock() + mock.calls.ComponentStatuses = append(mock.calls.ComponentStatuses, callInfo) + lockComponentStatusesGetterMockComponentStatuses.Unlock() + return mock.ComponentStatusesFunc(namespace) +} + +// ComponentStatusesCalls gets all the calls that were made to ComponentStatuses. +// Check the length with: +// len(mockedComponentStatusesGetter.ComponentStatusesCalls()) +func (mock *ComponentStatusesGetterMock) ComponentStatusesCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockComponentStatusesGetterMockComponentStatuses.RLock() + calls = mock.calls.ComponentStatuses + lockComponentStatusesGetterMockComponentStatuses.RUnlock() + return calls +} diff --git a/apis/core/v1/fakes/zz_generated_config_map_mock_test.go b/apis/core/v1/fakes/zz_generated_config_map_mock_test.go new file mode 100644 index 00000000..d0a5aaa8 --- /dev/null +++ b/apis/core/v1/fakes/zz_generated_config_map_mock_test.go @@ -0,0 +1,1357 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v1a "github.com/rancher/types/apis/core/v1" + v1 "k8s.io/api/core/v1" + v1b "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockConfigMapListerMockGet sync.RWMutex + lockConfigMapListerMockList sync.RWMutex +) + +// Ensure, that ConfigMapListerMock does implement ConfigMapLister. +// If this is not the case, regenerate this file with moq. +var _ v1a.ConfigMapLister = &ConfigMapListerMock{} + +// ConfigMapListerMock is a mock implementation of ConfigMapLister. +// +// func TestSomethingThatUsesConfigMapLister(t *testing.T) { +// +// // make and configure a mocked ConfigMapLister +// mockedConfigMapLister := &ConfigMapListerMock{ +// GetFunc: func(namespace string, name string) (*v1.ConfigMap, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v1.ConfigMap, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedConfigMapLister in code that requires ConfigMapLister +// // and then make assertions. +// +// } +type ConfigMapListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v1.ConfigMap, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v1.ConfigMap, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *ConfigMapListerMock) Get(namespace string, name string) (*v1.ConfigMap, error) { + if mock.GetFunc == nil { + panic("ConfigMapListerMock.GetFunc: method is nil but ConfigMapLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockConfigMapListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockConfigMapListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedConfigMapLister.GetCalls()) +func (mock *ConfigMapListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockConfigMapListerMockGet.RLock() + calls = mock.calls.Get + lockConfigMapListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ConfigMapListerMock) List(namespace string, selector labels.Selector) ([]*v1.ConfigMap, error) { + if mock.ListFunc == nil { + panic("ConfigMapListerMock.ListFunc: method is nil but ConfigMapLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockConfigMapListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockConfigMapListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedConfigMapLister.ListCalls()) +func (mock *ConfigMapListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockConfigMapListerMockList.RLock() + calls = mock.calls.List + lockConfigMapListerMockList.RUnlock() + return calls +} + +var ( + lockConfigMapControllerMockAddClusterScopedHandler sync.RWMutex + lockConfigMapControllerMockAddHandler sync.RWMutex + lockConfigMapControllerMockEnqueue sync.RWMutex + lockConfigMapControllerMockGeneric sync.RWMutex + lockConfigMapControllerMockInformer sync.RWMutex + lockConfigMapControllerMockLister sync.RWMutex + lockConfigMapControllerMockStart sync.RWMutex + lockConfigMapControllerMockSync sync.RWMutex +) + +// Ensure, that ConfigMapControllerMock does implement ConfigMapController. +// If this is not the case, regenerate this file with moq. +var _ v1a.ConfigMapController = &ConfigMapControllerMock{} + +// ConfigMapControllerMock is a mock implementation of ConfigMapController. +// +// func TestSomethingThatUsesConfigMapController(t *testing.T) { +// +// // make and configure a mocked ConfigMapController +// mockedConfigMapController := &ConfigMapControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v1a.ConfigMapHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v1a.ConfigMapHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v1a.ConfigMapLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedConfigMapController in code that requires ConfigMapController +// // and then make assertions. +// +// } +type ConfigMapControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v1a.ConfigMapHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v1a.ConfigMapHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v1a.ConfigMapLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v1a.ConfigMapHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v1a.ConfigMapHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ConfigMapControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v1a.ConfigMapHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ConfigMapControllerMock.AddClusterScopedHandlerFunc: method is nil but ConfigMapController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.ConfigMapHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockConfigMapControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockConfigMapControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedConfigMapController.AddClusterScopedHandlerCalls()) +func (mock *ConfigMapControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.ConfigMapHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.ConfigMapHandlerFunc + } + lockConfigMapControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockConfigMapControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ConfigMapControllerMock) AddHandler(ctx context.Context, name string, handler v1a.ConfigMapHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ConfigMapControllerMock.AddHandlerFunc: method is nil but ConfigMapController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v1a.ConfigMapHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockConfigMapControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockConfigMapControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedConfigMapController.AddHandlerCalls()) +func (mock *ConfigMapControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v1a.ConfigMapHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v1a.ConfigMapHandlerFunc + } + lockConfigMapControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockConfigMapControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *ConfigMapControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("ConfigMapControllerMock.EnqueueFunc: method is nil but ConfigMapController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockConfigMapControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockConfigMapControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedConfigMapController.EnqueueCalls()) +func (mock *ConfigMapControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockConfigMapControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockConfigMapControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *ConfigMapControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("ConfigMapControllerMock.GenericFunc: method is nil but ConfigMapController.Generic was just called") + } + callInfo := struct { + }{} + lockConfigMapControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockConfigMapControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedConfigMapController.GenericCalls()) +func (mock *ConfigMapControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockConfigMapControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockConfigMapControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *ConfigMapControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("ConfigMapControllerMock.InformerFunc: method is nil but ConfigMapController.Informer was just called") + } + callInfo := struct { + }{} + lockConfigMapControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockConfigMapControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedConfigMapController.InformerCalls()) +func (mock *ConfigMapControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockConfigMapControllerMockInformer.RLock() + calls = mock.calls.Informer + lockConfigMapControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *ConfigMapControllerMock) Lister() v1a.ConfigMapLister { + if mock.ListerFunc == nil { + panic("ConfigMapControllerMock.ListerFunc: method is nil but ConfigMapController.Lister was just called") + } + callInfo := struct { + }{} + lockConfigMapControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockConfigMapControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedConfigMapController.ListerCalls()) +func (mock *ConfigMapControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockConfigMapControllerMockLister.RLock() + calls = mock.calls.Lister + lockConfigMapControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *ConfigMapControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("ConfigMapControllerMock.StartFunc: method is nil but ConfigMapController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockConfigMapControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockConfigMapControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedConfigMapController.StartCalls()) +func (mock *ConfigMapControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockConfigMapControllerMockStart.RLock() + calls = mock.calls.Start + lockConfigMapControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *ConfigMapControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("ConfigMapControllerMock.SyncFunc: method is nil but ConfigMapController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockConfigMapControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockConfigMapControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedConfigMapController.SyncCalls()) +func (mock *ConfigMapControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockConfigMapControllerMockSync.RLock() + calls = mock.calls.Sync + lockConfigMapControllerMockSync.RUnlock() + return calls +} + +var ( + lockConfigMapInterfaceMockAddClusterScopedHandler sync.RWMutex + lockConfigMapInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockConfigMapInterfaceMockAddHandler sync.RWMutex + lockConfigMapInterfaceMockAddLifecycle sync.RWMutex + lockConfigMapInterfaceMockController sync.RWMutex + lockConfigMapInterfaceMockCreate sync.RWMutex + lockConfigMapInterfaceMockDelete sync.RWMutex + lockConfigMapInterfaceMockDeleteCollection sync.RWMutex + lockConfigMapInterfaceMockDeleteNamespaced sync.RWMutex + lockConfigMapInterfaceMockGet sync.RWMutex + lockConfigMapInterfaceMockGetNamespaced sync.RWMutex + lockConfigMapInterfaceMockList sync.RWMutex + lockConfigMapInterfaceMockObjectClient sync.RWMutex + lockConfigMapInterfaceMockUpdate sync.RWMutex + lockConfigMapInterfaceMockWatch sync.RWMutex +) + +// Ensure, that ConfigMapInterfaceMock does implement ConfigMapInterface. +// If this is not the case, regenerate this file with moq. +var _ v1a.ConfigMapInterface = &ConfigMapInterfaceMock{} + +// ConfigMapInterfaceMock is a mock implementation of ConfigMapInterface. +// +// func TestSomethingThatUsesConfigMapInterface(t *testing.T) { +// +// // make and configure a mocked ConfigMapInterface +// mockedConfigMapInterface := &ConfigMapInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v1a.ConfigMapHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v1a.ConfigMapLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v1a.ConfigMapHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v1a.ConfigMapLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v1a.ConfigMapController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v1.ConfigMap) (*v1.ConfigMap, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1b.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1b.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1b.GetOptions) (*v1.ConfigMap, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.ConfigMap, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1b.ListOptions) (*v1a.ConfigMapList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v1.ConfigMap) (*v1.ConfigMap, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1b.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedConfigMapInterface in code that requires ConfigMapInterface +// // and then make assertions. +// +// } +type ConfigMapInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v1a.ConfigMapHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v1a.ConfigMapLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v1a.ConfigMapHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v1a.ConfigMapLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v1a.ConfigMapController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v1.ConfigMap) (*v1.ConfigMap, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1b.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1b.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1b.GetOptions) (*v1.ConfigMap, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.ConfigMap, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1b.ListOptions) (*v1a.ConfigMapList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v1.ConfigMap) (*v1.ConfigMap, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1b.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v1a.ConfigMapHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v1a.ConfigMapLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v1a.ConfigMapHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v1a.ConfigMapLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v1.ConfigMap + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1b.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1b.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1b.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1b.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1b.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1b.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1b.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v1.ConfigMap + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1b.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ConfigMapInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v1a.ConfigMapHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ConfigMapInterfaceMock.AddClusterScopedHandlerFunc: method is nil but ConfigMapInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.ConfigMapHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockConfigMapInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockConfigMapInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedConfigMapInterface.AddClusterScopedHandlerCalls()) +func (mock *ConfigMapInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.ConfigMapHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.ConfigMapHandlerFunc + } + lockConfigMapInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockConfigMapInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *ConfigMapInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v1a.ConfigMapLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("ConfigMapInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but ConfigMapInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.ConfigMapLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockConfigMapInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockConfigMapInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedConfigMapInterface.AddClusterScopedLifecycleCalls()) +func (mock *ConfigMapInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.ConfigMapLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.ConfigMapLifecycle + } + lockConfigMapInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockConfigMapInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ConfigMapInterfaceMock) AddHandler(ctx context.Context, name string, sync v1a.ConfigMapHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ConfigMapInterfaceMock.AddHandlerFunc: method is nil but ConfigMapInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v1a.ConfigMapHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockConfigMapInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockConfigMapInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedConfigMapInterface.AddHandlerCalls()) +func (mock *ConfigMapInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v1a.ConfigMapHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v1a.ConfigMapHandlerFunc + } + lockConfigMapInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockConfigMapInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *ConfigMapInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v1a.ConfigMapLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("ConfigMapInterfaceMock.AddLifecycleFunc: method is nil but ConfigMapInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v1a.ConfigMapLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockConfigMapInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockConfigMapInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedConfigMapInterface.AddLifecycleCalls()) +func (mock *ConfigMapInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v1a.ConfigMapLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v1a.ConfigMapLifecycle + } + lockConfigMapInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockConfigMapInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *ConfigMapInterfaceMock) Controller() v1a.ConfigMapController { + if mock.ControllerFunc == nil { + panic("ConfigMapInterfaceMock.ControllerFunc: method is nil but ConfigMapInterface.Controller was just called") + } + callInfo := struct { + }{} + lockConfigMapInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockConfigMapInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedConfigMapInterface.ControllerCalls()) +func (mock *ConfigMapInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockConfigMapInterfaceMockController.RLock() + calls = mock.calls.Controller + lockConfigMapInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *ConfigMapInterfaceMock) Create(in1 *v1.ConfigMap) (*v1.ConfigMap, error) { + if mock.CreateFunc == nil { + panic("ConfigMapInterfaceMock.CreateFunc: method is nil but ConfigMapInterface.Create was just called") + } + callInfo := struct { + In1 *v1.ConfigMap + }{ + In1: in1, + } + lockConfigMapInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockConfigMapInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedConfigMapInterface.CreateCalls()) +func (mock *ConfigMapInterfaceMock) CreateCalls() []struct { + In1 *v1.ConfigMap +} { + var calls []struct { + In1 *v1.ConfigMap + } + lockConfigMapInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockConfigMapInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *ConfigMapInterfaceMock) Delete(name string, options *v1b.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("ConfigMapInterfaceMock.DeleteFunc: method is nil but ConfigMapInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1b.DeleteOptions + }{ + Name: name, + Options: options, + } + lockConfigMapInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockConfigMapInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedConfigMapInterface.DeleteCalls()) +func (mock *ConfigMapInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1b.DeleteOptions +} { + var calls []struct { + Name string + Options *v1b.DeleteOptions + } + lockConfigMapInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockConfigMapInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *ConfigMapInterfaceMock) DeleteCollection(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("ConfigMapInterfaceMock.DeleteCollectionFunc: method is nil but ConfigMapInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockConfigMapInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockConfigMapInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedConfigMapInterface.DeleteCollectionCalls()) +func (mock *ConfigMapInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions +} { + var calls []struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions + } + lockConfigMapInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockConfigMapInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *ConfigMapInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1b.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("ConfigMapInterfaceMock.DeleteNamespacedFunc: method is nil but ConfigMapInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1b.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockConfigMapInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockConfigMapInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedConfigMapInterface.DeleteNamespacedCalls()) +func (mock *ConfigMapInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1b.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1b.DeleteOptions + } + lockConfigMapInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockConfigMapInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *ConfigMapInterfaceMock) Get(name string, opts v1b.GetOptions) (*v1.ConfigMap, error) { + if mock.GetFunc == nil { + panic("ConfigMapInterfaceMock.GetFunc: method is nil but ConfigMapInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1b.GetOptions + }{ + Name: name, + Opts: opts, + } + lockConfigMapInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockConfigMapInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedConfigMapInterface.GetCalls()) +func (mock *ConfigMapInterfaceMock) GetCalls() []struct { + Name string + Opts v1b.GetOptions +} { + var calls []struct { + Name string + Opts v1b.GetOptions + } + lockConfigMapInterfaceMockGet.RLock() + calls = mock.calls.Get + lockConfigMapInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *ConfigMapInterfaceMock) GetNamespaced(namespace string, name string, opts v1b.GetOptions) (*v1.ConfigMap, error) { + if mock.GetNamespacedFunc == nil { + panic("ConfigMapInterfaceMock.GetNamespacedFunc: method is nil but ConfigMapInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1b.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockConfigMapInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockConfigMapInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedConfigMapInterface.GetNamespacedCalls()) +func (mock *ConfigMapInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1b.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1b.GetOptions + } + lockConfigMapInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockConfigMapInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ConfigMapInterfaceMock) List(opts v1b.ListOptions) (*v1a.ConfigMapList, error) { + if mock.ListFunc == nil { + panic("ConfigMapInterfaceMock.ListFunc: method is nil but ConfigMapInterface.List was just called") + } + callInfo := struct { + Opts v1b.ListOptions + }{ + Opts: opts, + } + lockConfigMapInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockConfigMapInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedConfigMapInterface.ListCalls()) +func (mock *ConfigMapInterfaceMock) ListCalls() []struct { + Opts v1b.ListOptions +} { + var calls []struct { + Opts v1b.ListOptions + } + lockConfigMapInterfaceMockList.RLock() + calls = mock.calls.List + lockConfigMapInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *ConfigMapInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("ConfigMapInterfaceMock.ObjectClientFunc: method is nil but ConfigMapInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockConfigMapInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockConfigMapInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedConfigMapInterface.ObjectClientCalls()) +func (mock *ConfigMapInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockConfigMapInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockConfigMapInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *ConfigMapInterfaceMock) Update(in1 *v1.ConfigMap) (*v1.ConfigMap, error) { + if mock.UpdateFunc == nil { + panic("ConfigMapInterfaceMock.UpdateFunc: method is nil but ConfigMapInterface.Update was just called") + } + callInfo := struct { + In1 *v1.ConfigMap + }{ + In1: in1, + } + lockConfigMapInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockConfigMapInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedConfigMapInterface.UpdateCalls()) +func (mock *ConfigMapInterfaceMock) UpdateCalls() []struct { + In1 *v1.ConfigMap +} { + var calls []struct { + In1 *v1.ConfigMap + } + lockConfigMapInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockConfigMapInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *ConfigMapInterfaceMock) Watch(opts v1b.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("ConfigMapInterfaceMock.WatchFunc: method is nil but ConfigMapInterface.Watch was just called") + } + callInfo := struct { + Opts v1b.ListOptions + }{ + Opts: opts, + } + lockConfigMapInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockConfigMapInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedConfigMapInterface.WatchCalls()) +func (mock *ConfigMapInterfaceMock) WatchCalls() []struct { + Opts v1b.ListOptions +} { + var calls []struct { + Opts v1b.ListOptions + } + lockConfigMapInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockConfigMapInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockConfigMapsGetterMockConfigMaps sync.RWMutex +) + +// Ensure, that ConfigMapsGetterMock does implement ConfigMapsGetter. +// If this is not the case, regenerate this file with moq. +var _ v1a.ConfigMapsGetter = &ConfigMapsGetterMock{} + +// ConfigMapsGetterMock is a mock implementation of ConfigMapsGetter. +// +// func TestSomethingThatUsesConfigMapsGetter(t *testing.T) { +// +// // make and configure a mocked ConfigMapsGetter +// mockedConfigMapsGetter := &ConfigMapsGetterMock{ +// ConfigMapsFunc: func(namespace string) v1a.ConfigMapInterface { +// panic("mock out the ConfigMaps method") +// }, +// } +// +// // use mockedConfigMapsGetter in code that requires ConfigMapsGetter +// // and then make assertions. +// +// } +type ConfigMapsGetterMock struct { + // ConfigMapsFunc mocks the ConfigMaps method. + ConfigMapsFunc func(namespace string) v1a.ConfigMapInterface + + // calls tracks calls to the methods. + calls struct { + // ConfigMaps holds details about calls to the ConfigMaps method. + ConfigMaps []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// ConfigMaps calls ConfigMapsFunc. +func (mock *ConfigMapsGetterMock) ConfigMaps(namespace string) v1a.ConfigMapInterface { + if mock.ConfigMapsFunc == nil { + panic("ConfigMapsGetterMock.ConfigMapsFunc: method is nil but ConfigMapsGetter.ConfigMaps was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockConfigMapsGetterMockConfigMaps.Lock() + mock.calls.ConfigMaps = append(mock.calls.ConfigMaps, callInfo) + lockConfigMapsGetterMockConfigMaps.Unlock() + return mock.ConfigMapsFunc(namespace) +} + +// ConfigMapsCalls gets all the calls that were made to ConfigMaps. +// Check the length with: +// len(mockedConfigMapsGetter.ConfigMapsCalls()) +func (mock *ConfigMapsGetterMock) ConfigMapsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockConfigMapsGetterMockConfigMaps.RLock() + calls = mock.calls.ConfigMaps + lockConfigMapsGetterMockConfigMaps.RUnlock() + return calls +} diff --git a/apis/core/v1/fakes/zz_generated_endpoints_mock_test.go b/apis/core/v1/fakes/zz_generated_endpoints_mock_test.go new file mode 100644 index 00000000..5bcd5436 --- /dev/null +++ b/apis/core/v1/fakes/zz_generated_endpoints_mock_test.go @@ -0,0 +1,1357 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v1a "github.com/rancher/types/apis/core/v1" + v1 "k8s.io/api/core/v1" + v1b "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockEndpointsListerMockGet sync.RWMutex + lockEndpointsListerMockList sync.RWMutex +) + +// Ensure, that EndpointsListerMock does implement EndpointsLister. +// If this is not the case, regenerate this file with moq. +var _ v1a.EndpointsLister = &EndpointsListerMock{} + +// EndpointsListerMock is a mock implementation of EndpointsLister. +// +// func TestSomethingThatUsesEndpointsLister(t *testing.T) { +// +// // make and configure a mocked EndpointsLister +// mockedEndpointsLister := &EndpointsListerMock{ +// GetFunc: func(namespace string, name string) (*v1.Endpoints, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v1.Endpoints, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedEndpointsLister in code that requires EndpointsLister +// // and then make assertions. +// +// } +type EndpointsListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v1.Endpoints, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v1.Endpoints, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *EndpointsListerMock) Get(namespace string, name string) (*v1.Endpoints, error) { + if mock.GetFunc == nil { + panic("EndpointsListerMock.GetFunc: method is nil but EndpointsLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockEndpointsListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockEndpointsListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedEndpointsLister.GetCalls()) +func (mock *EndpointsListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockEndpointsListerMockGet.RLock() + calls = mock.calls.Get + lockEndpointsListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *EndpointsListerMock) List(namespace string, selector labels.Selector) ([]*v1.Endpoints, error) { + if mock.ListFunc == nil { + panic("EndpointsListerMock.ListFunc: method is nil but EndpointsLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockEndpointsListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockEndpointsListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedEndpointsLister.ListCalls()) +func (mock *EndpointsListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockEndpointsListerMockList.RLock() + calls = mock.calls.List + lockEndpointsListerMockList.RUnlock() + return calls +} + +var ( + lockEndpointsControllerMockAddClusterScopedHandler sync.RWMutex + lockEndpointsControllerMockAddHandler sync.RWMutex + lockEndpointsControllerMockEnqueue sync.RWMutex + lockEndpointsControllerMockGeneric sync.RWMutex + lockEndpointsControllerMockInformer sync.RWMutex + lockEndpointsControllerMockLister sync.RWMutex + lockEndpointsControllerMockStart sync.RWMutex + lockEndpointsControllerMockSync sync.RWMutex +) + +// Ensure, that EndpointsControllerMock does implement EndpointsController. +// If this is not the case, regenerate this file with moq. +var _ v1a.EndpointsController = &EndpointsControllerMock{} + +// EndpointsControllerMock is a mock implementation of EndpointsController. +// +// func TestSomethingThatUsesEndpointsController(t *testing.T) { +// +// // make and configure a mocked EndpointsController +// mockedEndpointsController := &EndpointsControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v1a.EndpointsHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v1a.EndpointsHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v1a.EndpointsLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedEndpointsController in code that requires EndpointsController +// // and then make assertions. +// +// } +type EndpointsControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v1a.EndpointsHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v1a.EndpointsHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v1a.EndpointsLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v1a.EndpointsHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v1a.EndpointsHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *EndpointsControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v1a.EndpointsHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("EndpointsControllerMock.AddClusterScopedHandlerFunc: method is nil but EndpointsController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.EndpointsHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockEndpointsControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockEndpointsControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedEndpointsController.AddClusterScopedHandlerCalls()) +func (mock *EndpointsControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.EndpointsHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.EndpointsHandlerFunc + } + lockEndpointsControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockEndpointsControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *EndpointsControllerMock) AddHandler(ctx context.Context, name string, handler v1a.EndpointsHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("EndpointsControllerMock.AddHandlerFunc: method is nil but EndpointsController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v1a.EndpointsHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockEndpointsControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockEndpointsControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedEndpointsController.AddHandlerCalls()) +func (mock *EndpointsControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v1a.EndpointsHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v1a.EndpointsHandlerFunc + } + lockEndpointsControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockEndpointsControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *EndpointsControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("EndpointsControllerMock.EnqueueFunc: method is nil but EndpointsController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockEndpointsControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockEndpointsControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedEndpointsController.EnqueueCalls()) +func (mock *EndpointsControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockEndpointsControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockEndpointsControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *EndpointsControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("EndpointsControllerMock.GenericFunc: method is nil but EndpointsController.Generic was just called") + } + callInfo := struct { + }{} + lockEndpointsControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockEndpointsControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedEndpointsController.GenericCalls()) +func (mock *EndpointsControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockEndpointsControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockEndpointsControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *EndpointsControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("EndpointsControllerMock.InformerFunc: method is nil but EndpointsController.Informer was just called") + } + callInfo := struct { + }{} + lockEndpointsControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockEndpointsControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedEndpointsController.InformerCalls()) +func (mock *EndpointsControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockEndpointsControllerMockInformer.RLock() + calls = mock.calls.Informer + lockEndpointsControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *EndpointsControllerMock) Lister() v1a.EndpointsLister { + if mock.ListerFunc == nil { + panic("EndpointsControllerMock.ListerFunc: method is nil but EndpointsController.Lister was just called") + } + callInfo := struct { + }{} + lockEndpointsControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockEndpointsControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedEndpointsController.ListerCalls()) +func (mock *EndpointsControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockEndpointsControllerMockLister.RLock() + calls = mock.calls.Lister + lockEndpointsControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *EndpointsControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("EndpointsControllerMock.StartFunc: method is nil but EndpointsController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockEndpointsControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockEndpointsControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedEndpointsController.StartCalls()) +func (mock *EndpointsControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockEndpointsControllerMockStart.RLock() + calls = mock.calls.Start + lockEndpointsControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *EndpointsControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("EndpointsControllerMock.SyncFunc: method is nil but EndpointsController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockEndpointsControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockEndpointsControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedEndpointsController.SyncCalls()) +func (mock *EndpointsControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockEndpointsControllerMockSync.RLock() + calls = mock.calls.Sync + lockEndpointsControllerMockSync.RUnlock() + return calls +} + +var ( + lockEndpointsInterfaceMockAddClusterScopedHandler sync.RWMutex + lockEndpointsInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockEndpointsInterfaceMockAddHandler sync.RWMutex + lockEndpointsInterfaceMockAddLifecycle sync.RWMutex + lockEndpointsInterfaceMockController sync.RWMutex + lockEndpointsInterfaceMockCreate sync.RWMutex + lockEndpointsInterfaceMockDelete sync.RWMutex + lockEndpointsInterfaceMockDeleteCollection sync.RWMutex + lockEndpointsInterfaceMockDeleteNamespaced sync.RWMutex + lockEndpointsInterfaceMockGet sync.RWMutex + lockEndpointsInterfaceMockGetNamespaced sync.RWMutex + lockEndpointsInterfaceMockList sync.RWMutex + lockEndpointsInterfaceMockObjectClient sync.RWMutex + lockEndpointsInterfaceMockUpdate sync.RWMutex + lockEndpointsInterfaceMockWatch sync.RWMutex +) + +// Ensure, that EndpointsInterfaceMock does implement EndpointsInterface. +// If this is not the case, regenerate this file with moq. +var _ v1a.EndpointsInterface = &EndpointsInterfaceMock{} + +// EndpointsInterfaceMock is a mock implementation of EndpointsInterface. +// +// func TestSomethingThatUsesEndpointsInterface(t *testing.T) { +// +// // make and configure a mocked EndpointsInterface +// mockedEndpointsInterface := &EndpointsInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v1a.EndpointsHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v1a.EndpointsLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v1a.EndpointsHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v1a.EndpointsLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v1a.EndpointsController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v1.Endpoints) (*v1.Endpoints, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1b.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1b.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1b.GetOptions) (*v1.Endpoints, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.Endpoints, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1b.ListOptions) (*v1a.EndpointsList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v1.Endpoints) (*v1.Endpoints, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1b.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedEndpointsInterface in code that requires EndpointsInterface +// // and then make assertions. +// +// } +type EndpointsInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v1a.EndpointsHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v1a.EndpointsLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v1a.EndpointsHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v1a.EndpointsLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v1a.EndpointsController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v1.Endpoints) (*v1.Endpoints, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1b.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1b.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1b.GetOptions) (*v1.Endpoints, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.Endpoints, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1b.ListOptions) (*v1a.EndpointsList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v1.Endpoints) (*v1.Endpoints, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1b.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v1a.EndpointsHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v1a.EndpointsLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v1a.EndpointsHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v1a.EndpointsLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v1.Endpoints + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1b.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1b.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1b.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1b.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1b.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1b.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1b.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v1.Endpoints + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1b.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *EndpointsInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v1a.EndpointsHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("EndpointsInterfaceMock.AddClusterScopedHandlerFunc: method is nil but EndpointsInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.EndpointsHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockEndpointsInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockEndpointsInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedEndpointsInterface.AddClusterScopedHandlerCalls()) +func (mock *EndpointsInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.EndpointsHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.EndpointsHandlerFunc + } + lockEndpointsInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockEndpointsInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *EndpointsInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v1a.EndpointsLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("EndpointsInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but EndpointsInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.EndpointsLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockEndpointsInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockEndpointsInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedEndpointsInterface.AddClusterScopedLifecycleCalls()) +func (mock *EndpointsInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.EndpointsLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.EndpointsLifecycle + } + lockEndpointsInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockEndpointsInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *EndpointsInterfaceMock) AddHandler(ctx context.Context, name string, sync v1a.EndpointsHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("EndpointsInterfaceMock.AddHandlerFunc: method is nil but EndpointsInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v1a.EndpointsHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockEndpointsInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockEndpointsInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedEndpointsInterface.AddHandlerCalls()) +func (mock *EndpointsInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v1a.EndpointsHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v1a.EndpointsHandlerFunc + } + lockEndpointsInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockEndpointsInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *EndpointsInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v1a.EndpointsLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("EndpointsInterfaceMock.AddLifecycleFunc: method is nil but EndpointsInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v1a.EndpointsLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockEndpointsInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockEndpointsInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedEndpointsInterface.AddLifecycleCalls()) +func (mock *EndpointsInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v1a.EndpointsLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v1a.EndpointsLifecycle + } + lockEndpointsInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockEndpointsInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *EndpointsInterfaceMock) Controller() v1a.EndpointsController { + if mock.ControllerFunc == nil { + panic("EndpointsInterfaceMock.ControllerFunc: method is nil but EndpointsInterface.Controller was just called") + } + callInfo := struct { + }{} + lockEndpointsInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockEndpointsInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedEndpointsInterface.ControllerCalls()) +func (mock *EndpointsInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockEndpointsInterfaceMockController.RLock() + calls = mock.calls.Controller + lockEndpointsInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *EndpointsInterfaceMock) Create(in1 *v1.Endpoints) (*v1.Endpoints, error) { + if mock.CreateFunc == nil { + panic("EndpointsInterfaceMock.CreateFunc: method is nil but EndpointsInterface.Create was just called") + } + callInfo := struct { + In1 *v1.Endpoints + }{ + In1: in1, + } + lockEndpointsInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockEndpointsInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedEndpointsInterface.CreateCalls()) +func (mock *EndpointsInterfaceMock) CreateCalls() []struct { + In1 *v1.Endpoints +} { + var calls []struct { + In1 *v1.Endpoints + } + lockEndpointsInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockEndpointsInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *EndpointsInterfaceMock) Delete(name string, options *v1b.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("EndpointsInterfaceMock.DeleteFunc: method is nil but EndpointsInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1b.DeleteOptions + }{ + Name: name, + Options: options, + } + lockEndpointsInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockEndpointsInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedEndpointsInterface.DeleteCalls()) +func (mock *EndpointsInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1b.DeleteOptions +} { + var calls []struct { + Name string + Options *v1b.DeleteOptions + } + lockEndpointsInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockEndpointsInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *EndpointsInterfaceMock) DeleteCollection(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("EndpointsInterfaceMock.DeleteCollectionFunc: method is nil but EndpointsInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockEndpointsInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockEndpointsInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedEndpointsInterface.DeleteCollectionCalls()) +func (mock *EndpointsInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions +} { + var calls []struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions + } + lockEndpointsInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockEndpointsInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *EndpointsInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1b.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("EndpointsInterfaceMock.DeleteNamespacedFunc: method is nil but EndpointsInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1b.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockEndpointsInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockEndpointsInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedEndpointsInterface.DeleteNamespacedCalls()) +func (mock *EndpointsInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1b.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1b.DeleteOptions + } + lockEndpointsInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockEndpointsInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *EndpointsInterfaceMock) Get(name string, opts v1b.GetOptions) (*v1.Endpoints, error) { + if mock.GetFunc == nil { + panic("EndpointsInterfaceMock.GetFunc: method is nil but EndpointsInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1b.GetOptions + }{ + Name: name, + Opts: opts, + } + lockEndpointsInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockEndpointsInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedEndpointsInterface.GetCalls()) +func (mock *EndpointsInterfaceMock) GetCalls() []struct { + Name string + Opts v1b.GetOptions +} { + var calls []struct { + Name string + Opts v1b.GetOptions + } + lockEndpointsInterfaceMockGet.RLock() + calls = mock.calls.Get + lockEndpointsInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *EndpointsInterfaceMock) GetNamespaced(namespace string, name string, opts v1b.GetOptions) (*v1.Endpoints, error) { + if mock.GetNamespacedFunc == nil { + panic("EndpointsInterfaceMock.GetNamespacedFunc: method is nil but EndpointsInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1b.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockEndpointsInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockEndpointsInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedEndpointsInterface.GetNamespacedCalls()) +func (mock *EndpointsInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1b.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1b.GetOptions + } + lockEndpointsInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockEndpointsInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *EndpointsInterfaceMock) List(opts v1b.ListOptions) (*v1a.EndpointsList, error) { + if mock.ListFunc == nil { + panic("EndpointsInterfaceMock.ListFunc: method is nil but EndpointsInterface.List was just called") + } + callInfo := struct { + Opts v1b.ListOptions + }{ + Opts: opts, + } + lockEndpointsInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockEndpointsInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedEndpointsInterface.ListCalls()) +func (mock *EndpointsInterfaceMock) ListCalls() []struct { + Opts v1b.ListOptions +} { + var calls []struct { + Opts v1b.ListOptions + } + lockEndpointsInterfaceMockList.RLock() + calls = mock.calls.List + lockEndpointsInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *EndpointsInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("EndpointsInterfaceMock.ObjectClientFunc: method is nil but EndpointsInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockEndpointsInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockEndpointsInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedEndpointsInterface.ObjectClientCalls()) +func (mock *EndpointsInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockEndpointsInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockEndpointsInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *EndpointsInterfaceMock) Update(in1 *v1.Endpoints) (*v1.Endpoints, error) { + if mock.UpdateFunc == nil { + panic("EndpointsInterfaceMock.UpdateFunc: method is nil but EndpointsInterface.Update was just called") + } + callInfo := struct { + In1 *v1.Endpoints + }{ + In1: in1, + } + lockEndpointsInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockEndpointsInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedEndpointsInterface.UpdateCalls()) +func (mock *EndpointsInterfaceMock) UpdateCalls() []struct { + In1 *v1.Endpoints +} { + var calls []struct { + In1 *v1.Endpoints + } + lockEndpointsInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockEndpointsInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *EndpointsInterfaceMock) Watch(opts v1b.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("EndpointsInterfaceMock.WatchFunc: method is nil but EndpointsInterface.Watch was just called") + } + callInfo := struct { + Opts v1b.ListOptions + }{ + Opts: opts, + } + lockEndpointsInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockEndpointsInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedEndpointsInterface.WatchCalls()) +func (mock *EndpointsInterfaceMock) WatchCalls() []struct { + Opts v1b.ListOptions +} { + var calls []struct { + Opts v1b.ListOptions + } + lockEndpointsInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockEndpointsInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockEndpointsGetterMockEndpoints sync.RWMutex +) + +// Ensure, that EndpointsGetterMock does implement EndpointsGetter. +// If this is not the case, regenerate this file with moq. +var _ v1a.EndpointsGetter = &EndpointsGetterMock{} + +// EndpointsGetterMock is a mock implementation of EndpointsGetter. +// +// func TestSomethingThatUsesEndpointsGetter(t *testing.T) { +// +// // make and configure a mocked EndpointsGetter +// mockedEndpointsGetter := &EndpointsGetterMock{ +// EndpointsFunc: func(namespace string) v1a.EndpointsInterface { +// panic("mock out the Endpoints method") +// }, +// } +// +// // use mockedEndpointsGetter in code that requires EndpointsGetter +// // and then make assertions. +// +// } +type EndpointsGetterMock struct { + // EndpointsFunc mocks the Endpoints method. + EndpointsFunc func(namespace string) v1a.EndpointsInterface + + // calls tracks calls to the methods. + calls struct { + // Endpoints holds details about calls to the Endpoints method. + Endpoints []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// Endpoints calls EndpointsFunc. +func (mock *EndpointsGetterMock) Endpoints(namespace string) v1a.EndpointsInterface { + if mock.EndpointsFunc == nil { + panic("EndpointsGetterMock.EndpointsFunc: method is nil but EndpointsGetter.Endpoints was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockEndpointsGetterMockEndpoints.Lock() + mock.calls.Endpoints = append(mock.calls.Endpoints, callInfo) + lockEndpointsGetterMockEndpoints.Unlock() + return mock.EndpointsFunc(namespace) +} + +// EndpointsCalls gets all the calls that were made to Endpoints. +// Check the length with: +// len(mockedEndpointsGetter.EndpointsCalls()) +func (mock *EndpointsGetterMock) EndpointsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockEndpointsGetterMockEndpoints.RLock() + calls = mock.calls.Endpoints + lockEndpointsGetterMockEndpoints.RUnlock() + return calls +} diff --git a/apis/core/v1/fakes/zz_generated_event_mock_test.go b/apis/core/v1/fakes/zz_generated_event_mock_test.go new file mode 100644 index 00000000..b481d068 --- /dev/null +++ b/apis/core/v1/fakes/zz_generated_event_mock_test.go @@ -0,0 +1,1357 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v1a "github.com/rancher/types/apis/core/v1" + v1 "k8s.io/api/core/v1" + v1b "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockEventListerMockGet sync.RWMutex + lockEventListerMockList sync.RWMutex +) + +// Ensure, that EventListerMock does implement EventLister. +// If this is not the case, regenerate this file with moq. +var _ v1a.EventLister = &EventListerMock{} + +// EventListerMock is a mock implementation of EventLister. +// +// func TestSomethingThatUsesEventLister(t *testing.T) { +// +// // make and configure a mocked EventLister +// mockedEventLister := &EventListerMock{ +// GetFunc: func(namespace string, name string) (*v1.Event, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v1.Event, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedEventLister in code that requires EventLister +// // and then make assertions. +// +// } +type EventListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v1.Event, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v1.Event, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *EventListerMock) Get(namespace string, name string) (*v1.Event, error) { + if mock.GetFunc == nil { + panic("EventListerMock.GetFunc: method is nil but EventLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockEventListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockEventListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedEventLister.GetCalls()) +func (mock *EventListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockEventListerMockGet.RLock() + calls = mock.calls.Get + lockEventListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *EventListerMock) List(namespace string, selector labels.Selector) ([]*v1.Event, error) { + if mock.ListFunc == nil { + panic("EventListerMock.ListFunc: method is nil but EventLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockEventListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockEventListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedEventLister.ListCalls()) +func (mock *EventListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockEventListerMockList.RLock() + calls = mock.calls.List + lockEventListerMockList.RUnlock() + return calls +} + +var ( + lockEventControllerMockAddClusterScopedHandler sync.RWMutex + lockEventControllerMockAddHandler sync.RWMutex + lockEventControllerMockEnqueue sync.RWMutex + lockEventControllerMockGeneric sync.RWMutex + lockEventControllerMockInformer sync.RWMutex + lockEventControllerMockLister sync.RWMutex + lockEventControllerMockStart sync.RWMutex + lockEventControllerMockSync sync.RWMutex +) + +// Ensure, that EventControllerMock does implement EventController. +// If this is not the case, regenerate this file with moq. +var _ v1a.EventController = &EventControllerMock{} + +// EventControllerMock is a mock implementation of EventController. +// +// func TestSomethingThatUsesEventController(t *testing.T) { +// +// // make and configure a mocked EventController +// mockedEventController := &EventControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v1a.EventHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v1a.EventHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v1a.EventLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedEventController in code that requires EventController +// // and then make assertions. +// +// } +type EventControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v1a.EventHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v1a.EventHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v1a.EventLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v1a.EventHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v1a.EventHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *EventControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v1a.EventHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("EventControllerMock.AddClusterScopedHandlerFunc: method is nil but EventController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.EventHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockEventControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockEventControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedEventController.AddClusterScopedHandlerCalls()) +func (mock *EventControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.EventHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.EventHandlerFunc + } + lockEventControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockEventControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *EventControllerMock) AddHandler(ctx context.Context, name string, handler v1a.EventHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("EventControllerMock.AddHandlerFunc: method is nil but EventController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v1a.EventHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockEventControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockEventControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedEventController.AddHandlerCalls()) +func (mock *EventControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v1a.EventHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v1a.EventHandlerFunc + } + lockEventControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockEventControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *EventControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("EventControllerMock.EnqueueFunc: method is nil but EventController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockEventControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockEventControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedEventController.EnqueueCalls()) +func (mock *EventControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockEventControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockEventControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *EventControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("EventControllerMock.GenericFunc: method is nil but EventController.Generic was just called") + } + callInfo := struct { + }{} + lockEventControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockEventControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedEventController.GenericCalls()) +func (mock *EventControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockEventControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockEventControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *EventControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("EventControllerMock.InformerFunc: method is nil but EventController.Informer was just called") + } + callInfo := struct { + }{} + lockEventControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockEventControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedEventController.InformerCalls()) +func (mock *EventControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockEventControllerMockInformer.RLock() + calls = mock.calls.Informer + lockEventControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *EventControllerMock) Lister() v1a.EventLister { + if mock.ListerFunc == nil { + panic("EventControllerMock.ListerFunc: method is nil but EventController.Lister was just called") + } + callInfo := struct { + }{} + lockEventControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockEventControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedEventController.ListerCalls()) +func (mock *EventControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockEventControllerMockLister.RLock() + calls = mock.calls.Lister + lockEventControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *EventControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("EventControllerMock.StartFunc: method is nil but EventController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockEventControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockEventControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedEventController.StartCalls()) +func (mock *EventControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockEventControllerMockStart.RLock() + calls = mock.calls.Start + lockEventControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *EventControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("EventControllerMock.SyncFunc: method is nil but EventController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockEventControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockEventControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedEventController.SyncCalls()) +func (mock *EventControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockEventControllerMockSync.RLock() + calls = mock.calls.Sync + lockEventControllerMockSync.RUnlock() + return calls +} + +var ( + lockEventInterfaceMockAddClusterScopedHandler sync.RWMutex + lockEventInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockEventInterfaceMockAddHandler sync.RWMutex + lockEventInterfaceMockAddLifecycle sync.RWMutex + lockEventInterfaceMockController sync.RWMutex + lockEventInterfaceMockCreate sync.RWMutex + lockEventInterfaceMockDelete sync.RWMutex + lockEventInterfaceMockDeleteCollection sync.RWMutex + lockEventInterfaceMockDeleteNamespaced sync.RWMutex + lockEventInterfaceMockGet sync.RWMutex + lockEventInterfaceMockGetNamespaced sync.RWMutex + lockEventInterfaceMockList sync.RWMutex + lockEventInterfaceMockObjectClient sync.RWMutex + lockEventInterfaceMockUpdate sync.RWMutex + lockEventInterfaceMockWatch sync.RWMutex +) + +// Ensure, that EventInterfaceMock does implement EventInterface. +// If this is not the case, regenerate this file with moq. +var _ v1a.EventInterface = &EventInterfaceMock{} + +// EventInterfaceMock is a mock implementation of EventInterface. +// +// func TestSomethingThatUsesEventInterface(t *testing.T) { +// +// // make and configure a mocked EventInterface +// mockedEventInterface := &EventInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v1a.EventHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v1a.EventLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v1a.EventHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v1a.EventLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v1a.EventController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v1.Event) (*v1.Event, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1b.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1b.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1b.GetOptions) (*v1.Event, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.Event, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1b.ListOptions) (*v1a.EventList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v1.Event) (*v1.Event, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1b.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedEventInterface in code that requires EventInterface +// // and then make assertions. +// +// } +type EventInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v1a.EventHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v1a.EventLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v1a.EventHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v1a.EventLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v1a.EventController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v1.Event) (*v1.Event, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1b.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1b.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1b.GetOptions) (*v1.Event, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.Event, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1b.ListOptions) (*v1a.EventList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v1.Event) (*v1.Event, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1b.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v1a.EventHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v1a.EventLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v1a.EventHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v1a.EventLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v1.Event + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1b.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1b.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1b.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1b.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1b.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1b.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1b.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v1.Event + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1b.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *EventInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v1a.EventHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("EventInterfaceMock.AddClusterScopedHandlerFunc: method is nil but EventInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.EventHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockEventInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockEventInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedEventInterface.AddClusterScopedHandlerCalls()) +func (mock *EventInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.EventHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.EventHandlerFunc + } + lockEventInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockEventInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *EventInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v1a.EventLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("EventInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but EventInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.EventLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockEventInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockEventInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedEventInterface.AddClusterScopedLifecycleCalls()) +func (mock *EventInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.EventLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.EventLifecycle + } + lockEventInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockEventInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *EventInterfaceMock) AddHandler(ctx context.Context, name string, sync v1a.EventHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("EventInterfaceMock.AddHandlerFunc: method is nil but EventInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v1a.EventHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockEventInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockEventInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedEventInterface.AddHandlerCalls()) +func (mock *EventInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v1a.EventHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v1a.EventHandlerFunc + } + lockEventInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockEventInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *EventInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v1a.EventLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("EventInterfaceMock.AddLifecycleFunc: method is nil but EventInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v1a.EventLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockEventInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockEventInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedEventInterface.AddLifecycleCalls()) +func (mock *EventInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v1a.EventLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v1a.EventLifecycle + } + lockEventInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockEventInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *EventInterfaceMock) Controller() v1a.EventController { + if mock.ControllerFunc == nil { + panic("EventInterfaceMock.ControllerFunc: method is nil but EventInterface.Controller was just called") + } + callInfo := struct { + }{} + lockEventInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockEventInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedEventInterface.ControllerCalls()) +func (mock *EventInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockEventInterfaceMockController.RLock() + calls = mock.calls.Controller + lockEventInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *EventInterfaceMock) Create(in1 *v1.Event) (*v1.Event, error) { + if mock.CreateFunc == nil { + panic("EventInterfaceMock.CreateFunc: method is nil but EventInterface.Create was just called") + } + callInfo := struct { + In1 *v1.Event + }{ + In1: in1, + } + lockEventInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockEventInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedEventInterface.CreateCalls()) +func (mock *EventInterfaceMock) CreateCalls() []struct { + In1 *v1.Event +} { + var calls []struct { + In1 *v1.Event + } + lockEventInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockEventInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *EventInterfaceMock) Delete(name string, options *v1b.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("EventInterfaceMock.DeleteFunc: method is nil but EventInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1b.DeleteOptions + }{ + Name: name, + Options: options, + } + lockEventInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockEventInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedEventInterface.DeleteCalls()) +func (mock *EventInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1b.DeleteOptions +} { + var calls []struct { + Name string + Options *v1b.DeleteOptions + } + lockEventInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockEventInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *EventInterfaceMock) DeleteCollection(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("EventInterfaceMock.DeleteCollectionFunc: method is nil but EventInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockEventInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockEventInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedEventInterface.DeleteCollectionCalls()) +func (mock *EventInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions +} { + var calls []struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions + } + lockEventInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockEventInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *EventInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1b.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("EventInterfaceMock.DeleteNamespacedFunc: method is nil but EventInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1b.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockEventInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockEventInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedEventInterface.DeleteNamespacedCalls()) +func (mock *EventInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1b.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1b.DeleteOptions + } + lockEventInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockEventInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *EventInterfaceMock) Get(name string, opts v1b.GetOptions) (*v1.Event, error) { + if mock.GetFunc == nil { + panic("EventInterfaceMock.GetFunc: method is nil but EventInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1b.GetOptions + }{ + Name: name, + Opts: opts, + } + lockEventInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockEventInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedEventInterface.GetCalls()) +func (mock *EventInterfaceMock) GetCalls() []struct { + Name string + Opts v1b.GetOptions +} { + var calls []struct { + Name string + Opts v1b.GetOptions + } + lockEventInterfaceMockGet.RLock() + calls = mock.calls.Get + lockEventInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *EventInterfaceMock) GetNamespaced(namespace string, name string, opts v1b.GetOptions) (*v1.Event, error) { + if mock.GetNamespacedFunc == nil { + panic("EventInterfaceMock.GetNamespacedFunc: method is nil but EventInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1b.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockEventInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockEventInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedEventInterface.GetNamespacedCalls()) +func (mock *EventInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1b.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1b.GetOptions + } + lockEventInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockEventInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *EventInterfaceMock) List(opts v1b.ListOptions) (*v1a.EventList, error) { + if mock.ListFunc == nil { + panic("EventInterfaceMock.ListFunc: method is nil but EventInterface.List was just called") + } + callInfo := struct { + Opts v1b.ListOptions + }{ + Opts: opts, + } + lockEventInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockEventInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedEventInterface.ListCalls()) +func (mock *EventInterfaceMock) ListCalls() []struct { + Opts v1b.ListOptions +} { + var calls []struct { + Opts v1b.ListOptions + } + lockEventInterfaceMockList.RLock() + calls = mock.calls.List + lockEventInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *EventInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("EventInterfaceMock.ObjectClientFunc: method is nil but EventInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockEventInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockEventInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedEventInterface.ObjectClientCalls()) +func (mock *EventInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockEventInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockEventInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *EventInterfaceMock) Update(in1 *v1.Event) (*v1.Event, error) { + if mock.UpdateFunc == nil { + panic("EventInterfaceMock.UpdateFunc: method is nil but EventInterface.Update was just called") + } + callInfo := struct { + In1 *v1.Event + }{ + In1: in1, + } + lockEventInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockEventInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedEventInterface.UpdateCalls()) +func (mock *EventInterfaceMock) UpdateCalls() []struct { + In1 *v1.Event +} { + var calls []struct { + In1 *v1.Event + } + lockEventInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockEventInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *EventInterfaceMock) Watch(opts v1b.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("EventInterfaceMock.WatchFunc: method is nil but EventInterface.Watch was just called") + } + callInfo := struct { + Opts v1b.ListOptions + }{ + Opts: opts, + } + lockEventInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockEventInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedEventInterface.WatchCalls()) +func (mock *EventInterfaceMock) WatchCalls() []struct { + Opts v1b.ListOptions +} { + var calls []struct { + Opts v1b.ListOptions + } + lockEventInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockEventInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockEventsGetterMockEvents sync.RWMutex +) + +// Ensure, that EventsGetterMock does implement EventsGetter. +// If this is not the case, regenerate this file with moq. +var _ v1a.EventsGetter = &EventsGetterMock{} + +// EventsGetterMock is a mock implementation of EventsGetter. +// +// func TestSomethingThatUsesEventsGetter(t *testing.T) { +// +// // make and configure a mocked EventsGetter +// mockedEventsGetter := &EventsGetterMock{ +// EventsFunc: func(namespace string) v1a.EventInterface { +// panic("mock out the Events method") +// }, +// } +// +// // use mockedEventsGetter in code that requires EventsGetter +// // and then make assertions. +// +// } +type EventsGetterMock struct { + // EventsFunc mocks the Events method. + EventsFunc func(namespace string) v1a.EventInterface + + // calls tracks calls to the methods. + calls struct { + // Events holds details about calls to the Events method. + Events []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// Events calls EventsFunc. +func (mock *EventsGetterMock) Events(namespace string) v1a.EventInterface { + if mock.EventsFunc == nil { + panic("EventsGetterMock.EventsFunc: method is nil but EventsGetter.Events was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockEventsGetterMockEvents.Lock() + mock.calls.Events = append(mock.calls.Events, callInfo) + lockEventsGetterMockEvents.Unlock() + return mock.EventsFunc(namespace) +} + +// EventsCalls gets all the calls that were made to Events. +// Check the length with: +// len(mockedEventsGetter.EventsCalls()) +func (mock *EventsGetterMock) EventsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockEventsGetterMockEvents.RLock() + calls = mock.calls.Events + lockEventsGetterMockEvents.RUnlock() + return calls +} diff --git a/apis/core/v1/fakes/zz_generated_limit_range_mock_test.go b/apis/core/v1/fakes/zz_generated_limit_range_mock_test.go new file mode 100644 index 00000000..e81dd482 --- /dev/null +++ b/apis/core/v1/fakes/zz_generated_limit_range_mock_test.go @@ -0,0 +1,1357 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v1a "github.com/rancher/types/apis/core/v1" + v1 "k8s.io/api/core/v1" + v1b "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockLimitRangeListerMockGet sync.RWMutex + lockLimitRangeListerMockList sync.RWMutex +) + +// Ensure, that LimitRangeListerMock does implement LimitRangeLister. +// If this is not the case, regenerate this file with moq. +var _ v1a.LimitRangeLister = &LimitRangeListerMock{} + +// LimitRangeListerMock is a mock implementation of LimitRangeLister. +// +// func TestSomethingThatUsesLimitRangeLister(t *testing.T) { +// +// // make and configure a mocked LimitRangeLister +// mockedLimitRangeLister := &LimitRangeListerMock{ +// GetFunc: func(namespace string, name string) (*v1.LimitRange, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v1.LimitRange, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedLimitRangeLister in code that requires LimitRangeLister +// // and then make assertions. +// +// } +type LimitRangeListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v1.LimitRange, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v1.LimitRange, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *LimitRangeListerMock) Get(namespace string, name string) (*v1.LimitRange, error) { + if mock.GetFunc == nil { + panic("LimitRangeListerMock.GetFunc: method is nil but LimitRangeLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockLimitRangeListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockLimitRangeListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedLimitRangeLister.GetCalls()) +func (mock *LimitRangeListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockLimitRangeListerMockGet.RLock() + calls = mock.calls.Get + lockLimitRangeListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *LimitRangeListerMock) List(namespace string, selector labels.Selector) ([]*v1.LimitRange, error) { + if mock.ListFunc == nil { + panic("LimitRangeListerMock.ListFunc: method is nil but LimitRangeLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockLimitRangeListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockLimitRangeListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedLimitRangeLister.ListCalls()) +func (mock *LimitRangeListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockLimitRangeListerMockList.RLock() + calls = mock.calls.List + lockLimitRangeListerMockList.RUnlock() + return calls +} + +var ( + lockLimitRangeControllerMockAddClusterScopedHandler sync.RWMutex + lockLimitRangeControllerMockAddHandler sync.RWMutex + lockLimitRangeControllerMockEnqueue sync.RWMutex + lockLimitRangeControllerMockGeneric sync.RWMutex + lockLimitRangeControllerMockInformer sync.RWMutex + lockLimitRangeControllerMockLister sync.RWMutex + lockLimitRangeControllerMockStart sync.RWMutex + lockLimitRangeControllerMockSync sync.RWMutex +) + +// Ensure, that LimitRangeControllerMock does implement LimitRangeController. +// If this is not the case, regenerate this file with moq. +var _ v1a.LimitRangeController = &LimitRangeControllerMock{} + +// LimitRangeControllerMock is a mock implementation of LimitRangeController. +// +// func TestSomethingThatUsesLimitRangeController(t *testing.T) { +// +// // make and configure a mocked LimitRangeController +// mockedLimitRangeController := &LimitRangeControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v1a.LimitRangeHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v1a.LimitRangeHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v1a.LimitRangeLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedLimitRangeController in code that requires LimitRangeController +// // and then make assertions. +// +// } +type LimitRangeControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v1a.LimitRangeHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v1a.LimitRangeHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v1a.LimitRangeLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v1a.LimitRangeHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v1a.LimitRangeHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *LimitRangeControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v1a.LimitRangeHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("LimitRangeControllerMock.AddClusterScopedHandlerFunc: method is nil but LimitRangeController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.LimitRangeHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockLimitRangeControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockLimitRangeControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedLimitRangeController.AddClusterScopedHandlerCalls()) +func (mock *LimitRangeControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.LimitRangeHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.LimitRangeHandlerFunc + } + lockLimitRangeControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockLimitRangeControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *LimitRangeControllerMock) AddHandler(ctx context.Context, name string, handler v1a.LimitRangeHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("LimitRangeControllerMock.AddHandlerFunc: method is nil but LimitRangeController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v1a.LimitRangeHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockLimitRangeControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockLimitRangeControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedLimitRangeController.AddHandlerCalls()) +func (mock *LimitRangeControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v1a.LimitRangeHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v1a.LimitRangeHandlerFunc + } + lockLimitRangeControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockLimitRangeControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *LimitRangeControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("LimitRangeControllerMock.EnqueueFunc: method is nil but LimitRangeController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockLimitRangeControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockLimitRangeControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedLimitRangeController.EnqueueCalls()) +func (mock *LimitRangeControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockLimitRangeControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockLimitRangeControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *LimitRangeControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("LimitRangeControllerMock.GenericFunc: method is nil but LimitRangeController.Generic was just called") + } + callInfo := struct { + }{} + lockLimitRangeControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockLimitRangeControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedLimitRangeController.GenericCalls()) +func (mock *LimitRangeControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockLimitRangeControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockLimitRangeControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *LimitRangeControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("LimitRangeControllerMock.InformerFunc: method is nil but LimitRangeController.Informer was just called") + } + callInfo := struct { + }{} + lockLimitRangeControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockLimitRangeControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedLimitRangeController.InformerCalls()) +func (mock *LimitRangeControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockLimitRangeControllerMockInformer.RLock() + calls = mock.calls.Informer + lockLimitRangeControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *LimitRangeControllerMock) Lister() v1a.LimitRangeLister { + if mock.ListerFunc == nil { + panic("LimitRangeControllerMock.ListerFunc: method is nil but LimitRangeController.Lister was just called") + } + callInfo := struct { + }{} + lockLimitRangeControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockLimitRangeControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedLimitRangeController.ListerCalls()) +func (mock *LimitRangeControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockLimitRangeControllerMockLister.RLock() + calls = mock.calls.Lister + lockLimitRangeControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *LimitRangeControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("LimitRangeControllerMock.StartFunc: method is nil but LimitRangeController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockLimitRangeControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockLimitRangeControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedLimitRangeController.StartCalls()) +func (mock *LimitRangeControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockLimitRangeControllerMockStart.RLock() + calls = mock.calls.Start + lockLimitRangeControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *LimitRangeControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("LimitRangeControllerMock.SyncFunc: method is nil but LimitRangeController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockLimitRangeControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockLimitRangeControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedLimitRangeController.SyncCalls()) +func (mock *LimitRangeControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockLimitRangeControllerMockSync.RLock() + calls = mock.calls.Sync + lockLimitRangeControllerMockSync.RUnlock() + return calls +} + +var ( + lockLimitRangeInterfaceMockAddClusterScopedHandler sync.RWMutex + lockLimitRangeInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockLimitRangeInterfaceMockAddHandler sync.RWMutex + lockLimitRangeInterfaceMockAddLifecycle sync.RWMutex + lockLimitRangeInterfaceMockController sync.RWMutex + lockLimitRangeInterfaceMockCreate sync.RWMutex + lockLimitRangeInterfaceMockDelete sync.RWMutex + lockLimitRangeInterfaceMockDeleteCollection sync.RWMutex + lockLimitRangeInterfaceMockDeleteNamespaced sync.RWMutex + lockLimitRangeInterfaceMockGet sync.RWMutex + lockLimitRangeInterfaceMockGetNamespaced sync.RWMutex + lockLimitRangeInterfaceMockList sync.RWMutex + lockLimitRangeInterfaceMockObjectClient sync.RWMutex + lockLimitRangeInterfaceMockUpdate sync.RWMutex + lockLimitRangeInterfaceMockWatch sync.RWMutex +) + +// Ensure, that LimitRangeInterfaceMock does implement LimitRangeInterface. +// If this is not the case, regenerate this file with moq. +var _ v1a.LimitRangeInterface = &LimitRangeInterfaceMock{} + +// LimitRangeInterfaceMock is a mock implementation of LimitRangeInterface. +// +// func TestSomethingThatUsesLimitRangeInterface(t *testing.T) { +// +// // make and configure a mocked LimitRangeInterface +// mockedLimitRangeInterface := &LimitRangeInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v1a.LimitRangeHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v1a.LimitRangeLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v1a.LimitRangeHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v1a.LimitRangeLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v1a.LimitRangeController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v1.LimitRange) (*v1.LimitRange, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1b.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1b.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1b.GetOptions) (*v1.LimitRange, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.LimitRange, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1b.ListOptions) (*v1a.LimitRangeList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v1.LimitRange) (*v1.LimitRange, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1b.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedLimitRangeInterface in code that requires LimitRangeInterface +// // and then make assertions. +// +// } +type LimitRangeInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v1a.LimitRangeHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v1a.LimitRangeLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v1a.LimitRangeHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v1a.LimitRangeLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v1a.LimitRangeController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v1.LimitRange) (*v1.LimitRange, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1b.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1b.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1b.GetOptions) (*v1.LimitRange, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.LimitRange, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1b.ListOptions) (*v1a.LimitRangeList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v1.LimitRange) (*v1.LimitRange, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1b.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v1a.LimitRangeHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v1a.LimitRangeLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v1a.LimitRangeHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v1a.LimitRangeLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v1.LimitRange + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1b.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1b.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1b.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1b.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1b.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1b.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1b.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v1.LimitRange + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1b.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *LimitRangeInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v1a.LimitRangeHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("LimitRangeInterfaceMock.AddClusterScopedHandlerFunc: method is nil but LimitRangeInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.LimitRangeHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockLimitRangeInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockLimitRangeInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedLimitRangeInterface.AddClusterScopedHandlerCalls()) +func (mock *LimitRangeInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.LimitRangeHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.LimitRangeHandlerFunc + } + lockLimitRangeInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockLimitRangeInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *LimitRangeInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v1a.LimitRangeLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("LimitRangeInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but LimitRangeInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.LimitRangeLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockLimitRangeInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockLimitRangeInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedLimitRangeInterface.AddClusterScopedLifecycleCalls()) +func (mock *LimitRangeInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.LimitRangeLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.LimitRangeLifecycle + } + lockLimitRangeInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockLimitRangeInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *LimitRangeInterfaceMock) AddHandler(ctx context.Context, name string, sync v1a.LimitRangeHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("LimitRangeInterfaceMock.AddHandlerFunc: method is nil but LimitRangeInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v1a.LimitRangeHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockLimitRangeInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockLimitRangeInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedLimitRangeInterface.AddHandlerCalls()) +func (mock *LimitRangeInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v1a.LimitRangeHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v1a.LimitRangeHandlerFunc + } + lockLimitRangeInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockLimitRangeInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *LimitRangeInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v1a.LimitRangeLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("LimitRangeInterfaceMock.AddLifecycleFunc: method is nil but LimitRangeInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v1a.LimitRangeLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockLimitRangeInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockLimitRangeInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedLimitRangeInterface.AddLifecycleCalls()) +func (mock *LimitRangeInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v1a.LimitRangeLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v1a.LimitRangeLifecycle + } + lockLimitRangeInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockLimitRangeInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *LimitRangeInterfaceMock) Controller() v1a.LimitRangeController { + if mock.ControllerFunc == nil { + panic("LimitRangeInterfaceMock.ControllerFunc: method is nil but LimitRangeInterface.Controller was just called") + } + callInfo := struct { + }{} + lockLimitRangeInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockLimitRangeInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedLimitRangeInterface.ControllerCalls()) +func (mock *LimitRangeInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockLimitRangeInterfaceMockController.RLock() + calls = mock.calls.Controller + lockLimitRangeInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *LimitRangeInterfaceMock) Create(in1 *v1.LimitRange) (*v1.LimitRange, error) { + if mock.CreateFunc == nil { + panic("LimitRangeInterfaceMock.CreateFunc: method is nil but LimitRangeInterface.Create was just called") + } + callInfo := struct { + In1 *v1.LimitRange + }{ + In1: in1, + } + lockLimitRangeInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockLimitRangeInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedLimitRangeInterface.CreateCalls()) +func (mock *LimitRangeInterfaceMock) CreateCalls() []struct { + In1 *v1.LimitRange +} { + var calls []struct { + In1 *v1.LimitRange + } + lockLimitRangeInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockLimitRangeInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *LimitRangeInterfaceMock) Delete(name string, options *v1b.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("LimitRangeInterfaceMock.DeleteFunc: method is nil but LimitRangeInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1b.DeleteOptions + }{ + Name: name, + Options: options, + } + lockLimitRangeInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockLimitRangeInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedLimitRangeInterface.DeleteCalls()) +func (mock *LimitRangeInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1b.DeleteOptions +} { + var calls []struct { + Name string + Options *v1b.DeleteOptions + } + lockLimitRangeInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockLimitRangeInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *LimitRangeInterfaceMock) DeleteCollection(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("LimitRangeInterfaceMock.DeleteCollectionFunc: method is nil but LimitRangeInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockLimitRangeInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockLimitRangeInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedLimitRangeInterface.DeleteCollectionCalls()) +func (mock *LimitRangeInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions +} { + var calls []struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions + } + lockLimitRangeInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockLimitRangeInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *LimitRangeInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1b.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("LimitRangeInterfaceMock.DeleteNamespacedFunc: method is nil but LimitRangeInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1b.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockLimitRangeInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockLimitRangeInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedLimitRangeInterface.DeleteNamespacedCalls()) +func (mock *LimitRangeInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1b.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1b.DeleteOptions + } + lockLimitRangeInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockLimitRangeInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *LimitRangeInterfaceMock) Get(name string, opts v1b.GetOptions) (*v1.LimitRange, error) { + if mock.GetFunc == nil { + panic("LimitRangeInterfaceMock.GetFunc: method is nil but LimitRangeInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1b.GetOptions + }{ + Name: name, + Opts: opts, + } + lockLimitRangeInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockLimitRangeInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedLimitRangeInterface.GetCalls()) +func (mock *LimitRangeInterfaceMock) GetCalls() []struct { + Name string + Opts v1b.GetOptions +} { + var calls []struct { + Name string + Opts v1b.GetOptions + } + lockLimitRangeInterfaceMockGet.RLock() + calls = mock.calls.Get + lockLimitRangeInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *LimitRangeInterfaceMock) GetNamespaced(namespace string, name string, opts v1b.GetOptions) (*v1.LimitRange, error) { + if mock.GetNamespacedFunc == nil { + panic("LimitRangeInterfaceMock.GetNamespacedFunc: method is nil but LimitRangeInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1b.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockLimitRangeInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockLimitRangeInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedLimitRangeInterface.GetNamespacedCalls()) +func (mock *LimitRangeInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1b.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1b.GetOptions + } + lockLimitRangeInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockLimitRangeInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *LimitRangeInterfaceMock) List(opts v1b.ListOptions) (*v1a.LimitRangeList, error) { + if mock.ListFunc == nil { + panic("LimitRangeInterfaceMock.ListFunc: method is nil but LimitRangeInterface.List was just called") + } + callInfo := struct { + Opts v1b.ListOptions + }{ + Opts: opts, + } + lockLimitRangeInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockLimitRangeInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedLimitRangeInterface.ListCalls()) +func (mock *LimitRangeInterfaceMock) ListCalls() []struct { + Opts v1b.ListOptions +} { + var calls []struct { + Opts v1b.ListOptions + } + lockLimitRangeInterfaceMockList.RLock() + calls = mock.calls.List + lockLimitRangeInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *LimitRangeInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("LimitRangeInterfaceMock.ObjectClientFunc: method is nil but LimitRangeInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockLimitRangeInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockLimitRangeInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedLimitRangeInterface.ObjectClientCalls()) +func (mock *LimitRangeInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockLimitRangeInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockLimitRangeInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *LimitRangeInterfaceMock) Update(in1 *v1.LimitRange) (*v1.LimitRange, error) { + if mock.UpdateFunc == nil { + panic("LimitRangeInterfaceMock.UpdateFunc: method is nil but LimitRangeInterface.Update was just called") + } + callInfo := struct { + In1 *v1.LimitRange + }{ + In1: in1, + } + lockLimitRangeInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockLimitRangeInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedLimitRangeInterface.UpdateCalls()) +func (mock *LimitRangeInterfaceMock) UpdateCalls() []struct { + In1 *v1.LimitRange +} { + var calls []struct { + In1 *v1.LimitRange + } + lockLimitRangeInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockLimitRangeInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *LimitRangeInterfaceMock) Watch(opts v1b.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("LimitRangeInterfaceMock.WatchFunc: method is nil but LimitRangeInterface.Watch was just called") + } + callInfo := struct { + Opts v1b.ListOptions + }{ + Opts: opts, + } + lockLimitRangeInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockLimitRangeInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedLimitRangeInterface.WatchCalls()) +func (mock *LimitRangeInterfaceMock) WatchCalls() []struct { + Opts v1b.ListOptions +} { + var calls []struct { + Opts v1b.ListOptions + } + lockLimitRangeInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockLimitRangeInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockLimitRangesGetterMockLimitRanges sync.RWMutex +) + +// Ensure, that LimitRangesGetterMock does implement LimitRangesGetter. +// If this is not the case, regenerate this file with moq. +var _ v1a.LimitRangesGetter = &LimitRangesGetterMock{} + +// LimitRangesGetterMock is a mock implementation of LimitRangesGetter. +// +// func TestSomethingThatUsesLimitRangesGetter(t *testing.T) { +// +// // make and configure a mocked LimitRangesGetter +// mockedLimitRangesGetter := &LimitRangesGetterMock{ +// LimitRangesFunc: func(namespace string) v1a.LimitRangeInterface { +// panic("mock out the LimitRanges method") +// }, +// } +// +// // use mockedLimitRangesGetter in code that requires LimitRangesGetter +// // and then make assertions. +// +// } +type LimitRangesGetterMock struct { + // LimitRangesFunc mocks the LimitRanges method. + LimitRangesFunc func(namespace string) v1a.LimitRangeInterface + + // calls tracks calls to the methods. + calls struct { + // LimitRanges holds details about calls to the LimitRanges method. + LimitRanges []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// LimitRanges calls LimitRangesFunc. +func (mock *LimitRangesGetterMock) LimitRanges(namespace string) v1a.LimitRangeInterface { + if mock.LimitRangesFunc == nil { + panic("LimitRangesGetterMock.LimitRangesFunc: method is nil but LimitRangesGetter.LimitRanges was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockLimitRangesGetterMockLimitRanges.Lock() + mock.calls.LimitRanges = append(mock.calls.LimitRanges, callInfo) + lockLimitRangesGetterMockLimitRanges.Unlock() + return mock.LimitRangesFunc(namespace) +} + +// LimitRangesCalls gets all the calls that were made to LimitRanges. +// Check the length with: +// len(mockedLimitRangesGetter.LimitRangesCalls()) +func (mock *LimitRangesGetterMock) LimitRangesCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockLimitRangesGetterMockLimitRanges.RLock() + calls = mock.calls.LimitRanges + lockLimitRangesGetterMockLimitRanges.RUnlock() + return calls +} diff --git a/apis/core/v1/fakes/zz_generated_namespace_mock_test.go b/apis/core/v1/fakes/zz_generated_namespace_mock_test.go new file mode 100644 index 00000000..79df3e99 --- /dev/null +++ b/apis/core/v1/fakes/zz_generated_namespace_mock_test.go @@ -0,0 +1,1357 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v1a "github.com/rancher/types/apis/core/v1" + v1 "k8s.io/api/core/v1" + v1b "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockNamespaceListerMockGet sync.RWMutex + lockNamespaceListerMockList sync.RWMutex +) + +// Ensure, that NamespaceListerMock does implement NamespaceLister. +// If this is not the case, regenerate this file with moq. +var _ v1a.NamespaceLister = &NamespaceListerMock{} + +// NamespaceListerMock is a mock implementation of NamespaceLister. +// +// func TestSomethingThatUsesNamespaceLister(t *testing.T) { +// +// // make and configure a mocked NamespaceLister +// mockedNamespaceLister := &NamespaceListerMock{ +// GetFunc: func(namespace string, name string) (*v1.Namespace, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v1.Namespace, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedNamespaceLister in code that requires NamespaceLister +// // and then make assertions. +// +// } +type NamespaceListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v1.Namespace, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v1.Namespace, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *NamespaceListerMock) Get(namespace string, name string) (*v1.Namespace, error) { + if mock.GetFunc == nil { + panic("NamespaceListerMock.GetFunc: method is nil but NamespaceLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockNamespaceListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockNamespaceListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedNamespaceLister.GetCalls()) +func (mock *NamespaceListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockNamespaceListerMockGet.RLock() + calls = mock.calls.Get + lockNamespaceListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *NamespaceListerMock) List(namespace string, selector labels.Selector) ([]*v1.Namespace, error) { + if mock.ListFunc == nil { + panic("NamespaceListerMock.ListFunc: method is nil but NamespaceLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockNamespaceListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockNamespaceListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedNamespaceLister.ListCalls()) +func (mock *NamespaceListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockNamespaceListerMockList.RLock() + calls = mock.calls.List + lockNamespaceListerMockList.RUnlock() + return calls +} + +var ( + lockNamespaceControllerMockAddClusterScopedHandler sync.RWMutex + lockNamespaceControllerMockAddHandler sync.RWMutex + lockNamespaceControllerMockEnqueue sync.RWMutex + lockNamespaceControllerMockGeneric sync.RWMutex + lockNamespaceControllerMockInformer sync.RWMutex + lockNamespaceControllerMockLister sync.RWMutex + lockNamespaceControllerMockStart sync.RWMutex + lockNamespaceControllerMockSync sync.RWMutex +) + +// Ensure, that NamespaceControllerMock does implement NamespaceController. +// If this is not the case, regenerate this file with moq. +var _ v1a.NamespaceController = &NamespaceControllerMock{} + +// NamespaceControllerMock is a mock implementation of NamespaceController. +// +// func TestSomethingThatUsesNamespaceController(t *testing.T) { +// +// // make and configure a mocked NamespaceController +// mockedNamespaceController := &NamespaceControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v1a.NamespaceHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v1a.NamespaceHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v1a.NamespaceLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedNamespaceController in code that requires NamespaceController +// // and then make assertions. +// +// } +type NamespaceControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v1a.NamespaceHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v1a.NamespaceHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v1a.NamespaceLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v1a.NamespaceHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v1a.NamespaceHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *NamespaceControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v1a.NamespaceHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("NamespaceControllerMock.AddClusterScopedHandlerFunc: method is nil but NamespaceController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.NamespaceHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockNamespaceControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockNamespaceControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedNamespaceController.AddClusterScopedHandlerCalls()) +func (mock *NamespaceControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.NamespaceHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.NamespaceHandlerFunc + } + lockNamespaceControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockNamespaceControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *NamespaceControllerMock) AddHandler(ctx context.Context, name string, handler v1a.NamespaceHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("NamespaceControllerMock.AddHandlerFunc: method is nil but NamespaceController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v1a.NamespaceHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockNamespaceControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockNamespaceControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedNamespaceController.AddHandlerCalls()) +func (mock *NamespaceControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v1a.NamespaceHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v1a.NamespaceHandlerFunc + } + lockNamespaceControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockNamespaceControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *NamespaceControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("NamespaceControllerMock.EnqueueFunc: method is nil but NamespaceController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockNamespaceControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockNamespaceControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedNamespaceController.EnqueueCalls()) +func (mock *NamespaceControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockNamespaceControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockNamespaceControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *NamespaceControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("NamespaceControllerMock.GenericFunc: method is nil but NamespaceController.Generic was just called") + } + callInfo := struct { + }{} + lockNamespaceControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockNamespaceControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedNamespaceController.GenericCalls()) +func (mock *NamespaceControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockNamespaceControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockNamespaceControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *NamespaceControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("NamespaceControllerMock.InformerFunc: method is nil but NamespaceController.Informer was just called") + } + callInfo := struct { + }{} + lockNamespaceControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockNamespaceControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedNamespaceController.InformerCalls()) +func (mock *NamespaceControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockNamespaceControllerMockInformer.RLock() + calls = mock.calls.Informer + lockNamespaceControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *NamespaceControllerMock) Lister() v1a.NamespaceLister { + if mock.ListerFunc == nil { + panic("NamespaceControllerMock.ListerFunc: method is nil but NamespaceController.Lister was just called") + } + callInfo := struct { + }{} + lockNamespaceControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockNamespaceControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedNamespaceController.ListerCalls()) +func (mock *NamespaceControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockNamespaceControllerMockLister.RLock() + calls = mock.calls.Lister + lockNamespaceControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *NamespaceControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("NamespaceControllerMock.StartFunc: method is nil but NamespaceController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockNamespaceControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockNamespaceControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedNamespaceController.StartCalls()) +func (mock *NamespaceControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockNamespaceControllerMockStart.RLock() + calls = mock.calls.Start + lockNamespaceControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *NamespaceControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("NamespaceControllerMock.SyncFunc: method is nil but NamespaceController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockNamespaceControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockNamespaceControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedNamespaceController.SyncCalls()) +func (mock *NamespaceControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockNamespaceControllerMockSync.RLock() + calls = mock.calls.Sync + lockNamespaceControllerMockSync.RUnlock() + return calls +} + +var ( + lockNamespaceInterfaceMockAddClusterScopedHandler sync.RWMutex + lockNamespaceInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockNamespaceInterfaceMockAddHandler sync.RWMutex + lockNamespaceInterfaceMockAddLifecycle sync.RWMutex + lockNamespaceInterfaceMockController sync.RWMutex + lockNamespaceInterfaceMockCreate sync.RWMutex + lockNamespaceInterfaceMockDelete sync.RWMutex + lockNamespaceInterfaceMockDeleteCollection sync.RWMutex + lockNamespaceInterfaceMockDeleteNamespaced sync.RWMutex + lockNamespaceInterfaceMockGet sync.RWMutex + lockNamespaceInterfaceMockGetNamespaced sync.RWMutex + lockNamespaceInterfaceMockList sync.RWMutex + lockNamespaceInterfaceMockObjectClient sync.RWMutex + lockNamespaceInterfaceMockUpdate sync.RWMutex + lockNamespaceInterfaceMockWatch sync.RWMutex +) + +// Ensure, that NamespaceInterfaceMock does implement NamespaceInterface. +// If this is not the case, regenerate this file with moq. +var _ v1a.NamespaceInterface = &NamespaceInterfaceMock{} + +// NamespaceInterfaceMock is a mock implementation of NamespaceInterface. +// +// func TestSomethingThatUsesNamespaceInterface(t *testing.T) { +// +// // make and configure a mocked NamespaceInterface +// mockedNamespaceInterface := &NamespaceInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v1a.NamespaceHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v1a.NamespaceLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v1a.NamespaceHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v1a.NamespaceLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v1a.NamespaceController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v1.Namespace) (*v1.Namespace, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1b.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1b.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1b.GetOptions) (*v1.Namespace, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.Namespace, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1b.ListOptions) (*v1a.NamespaceList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v1.Namespace) (*v1.Namespace, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1b.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedNamespaceInterface in code that requires NamespaceInterface +// // and then make assertions. +// +// } +type NamespaceInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v1a.NamespaceHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v1a.NamespaceLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v1a.NamespaceHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v1a.NamespaceLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v1a.NamespaceController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v1.Namespace) (*v1.Namespace, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1b.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1b.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1b.GetOptions) (*v1.Namespace, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.Namespace, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1b.ListOptions) (*v1a.NamespaceList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v1.Namespace) (*v1.Namespace, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1b.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v1a.NamespaceHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v1a.NamespaceLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v1a.NamespaceHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v1a.NamespaceLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v1.Namespace + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1b.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1b.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1b.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1b.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1b.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1b.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1b.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v1.Namespace + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1b.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *NamespaceInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v1a.NamespaceHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("NamespaceInterfaceMock.AddClusterScopedHandlerFunc: method is nil but NamespaceInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.NamespaceHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockNamespaceInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockNamespaceInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedNamespaceInterface.AddClusterScopedHandlerCalls()) +func (mock *NamespaceInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.NamespaceHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.NamespaceHandlerFunc + } + lockNamespaceInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockNamespaceInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *NamespaceInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v1a.NamespaceLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("NamespaceInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but NamespaceInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.NamespaceLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockNamespaceInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockNamespaceInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedNamespaceInterface.AddClusterScopedLifecycleCalls()) +func (mock *NamespaceInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.NamespaceLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.NamespaceLifecycle + } + lockNamespaceInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockNamespaceInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *NamespaceInterfaceMock) AddHandler(ctx context.Context, name string, sync v1a.NamespaceHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("NamespaceInterfaceMock.AddHandlerFunc: method is nil but NamespaceInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v1a.NamespaceHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockNamespaceInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockNamespaceInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedNamespaceInterface.AddHandlerCalls()) +func (mock *NamespaceInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v1a.NamespaceHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v1a.NamespaceHandlerFunc + } + lockNamespaceInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockNamespaceInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *NamespaceInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v1a.NamespaceLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("NamespaceInterfaceMock.AddLifecycleFunc: method is nil but NamespaceInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v1a.NamespaceLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockNamespaceInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockNamespaceInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedNamespaceInterface.AddLifecycleCalls()) +func (mock *NamespaceInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v1a.NamespaceLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v1a.NamespaceLifecycle + } + lockNamespaceInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockNamespaceInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *NamespaceInterfaceMock) Controller() v1a.NamespaceController { + if mock.ControllerFunc == nil { + panic("NamespaceInterfaceMock.ControllerFunc: method is nil but NamespaceInterface.Controller was just called") + } + callInfo := struct { + }{} + lockNamespaceInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockNamespaceInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedNamespaceInterface.ControllerCalls()) +func (mock *NamespaceInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockNamespaceInterfaceMockController.RLock() + calls = mock.calls.Controller + lockNamespaceInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *NamespaceInterfaceMock) Create(in1 *v1.Namespace) (*v1.Namespace, error) { + if mock.CreateFunc == nil { + panic("NamespaceInterfaceMock.CreateFunc: method is nil but NamespaceInterface.Create was just called") + } + callInfo := struct { + In1 *v1.Namespace + }{ + In1: in1, + } + lockNamespaceInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockNamespaceInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedNamespaceInterface.CreateCalls()) +func (mock *NamespaceInterfaceMock) CreateCalls() []struct { + In1 *v1.Namespace +} { + var calls []struct { + In1 *v1.Namespace + } + lockNamespaceInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockNamespaceInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *NamespaceInterfaceMock) Delete(name string, options *v1b.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("NamespaceInterfaceMock.DeleteFunc: method is nil but NamespaceInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1b.DeleteOptions + }{ + Name: name, + Options: options, + } + lockNamespaceInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockNamespaceInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedNamespaceInterface.DeleteCalls()) +func (mock *NamespaceInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1b.DeleteOptions +} { + var calls []struct { + Name string + Options *v1b.DeleteOptions + } + lockNamespaceInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockNamespaceInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *NamespaceInterfaceMock) DeleteCollection(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("NamespaceInterfaceMock.DeleteCollectionFunc: method is nil but NamespaceInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockNamespaceInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockNamespaceInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedNamespaceInterface.DeleteCollectionCalls()) +func (mock *NamespaceInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions +} { + var calls []struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions + } + lockNamespaceInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockNamespaceInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *NamespaceInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1b.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("NamespaceInterfaceMock.DeleteNamespacedFunc: method is nil but NamespaceInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1b.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockNamespaceInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockNamespaceInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedNamespaceInterface.DeleteNamespacedCalls()) +func (mock *NamespaceInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1b.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1b.DeleteOptions + } + lockNamespaceInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockNamespaceInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *NamespaceInterfaceMock) Get(name string, opts v1b.GetOptions) (*v1.Namespace, error) { + if mock.GetFunc == nil { + panic("NamespaceInterfaceMock.GetFunc: method is nil but NamespaceInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1b.GetOptions + }{ + Name: name, + Opts: opts, + } + lockNamespaceInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockNamespaceInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedNamespaceInterface.GetCalls()) +func (mock *NamespaceInterfaceMock) GetCalls() []struct { + Name string + Opts v1b.GetOptions +} { + var calls []struct { + Name string + Opts v1b.GetOptions + } + lockNamespaceInterfaceMockGet.RLock() + calls = mock.calls.Get + lockNamespaceInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *NamespaceInterfaceMock) GetNamespaced(namespace string, name string, opts v1b.GetOptions) (*v1.Namespace, error) { + if mock.GetNamespacedFunc == nil { + panic("NamespaceInterfaceMock.GetNamespacedFunc: method is nil but NamespaceInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1b.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockNamespaceInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockNamespaceInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedNamespaceInterface.GetNamespacedCalls()) +func (mock *NamespaceInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1b.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1b.GetOptions + } + lockNamespaceInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockNamespaceInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *NamespaceInterfaceMock) List(opts v1b.ListOptions) (*v1a.NamespaceList, error) { + if mock.ListFunc == nil { + panic("NamespaceInterfaceMock.ListFunc: method is nil but NamespaceInterface.List was just called") + } + callInfo := struct { + Opts v1b.ListOptions + }{ + Opts: opts, + } + lockNamespaceInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockNamespaceInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedNamespaceInterface.ListCalls()) +func (mock *NamespaceInterfaceMock) ListCalls() []struct { + Opts v1b.ListOptions +} { + var calls []struct { + Opts v1b.ListOptions + } + lockNamespaceInterfaceMockList.RLock() + calls = mock.calls.List + lockNamespaceInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *NamespaceInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("NamespaceInterfaceMock.ObjectClientFunc: method is nil but NamespaceInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockNamespaceInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockNamespaceInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedNamespaceInterface.ObjectClientCalls()) +func (mock *NamespaceInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockNamespaceInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockNamespaceInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *NamespaceInterfaceMock) Update(in1 *v1.Namespace) (*v1.Namespace, error) { + if mock.UpdateFunc == nil { + panic("NamespaceInterfaceMock.UpdateFunc: method is nil but NamespaceInterface.Update was just called") + } + callInfo := struct { + In1 *v1.Namespace + }{ + In1: in1, + } + lockNamespaceInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockNamespaceInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedNamespaceInterface.UpdateCalls()) +func (mock *NamespaceInterfaceMock) UpdateCalls() []struct { + In1 *v1.Namespace +} { + var calls []struct { + In1 *v1.Namespace + } + lockNamespaceInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockNamespaceInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *NamespaceInterfaceMock) Watch(opts v1b.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("NamespaceInterfaceMock.WatchFunc: method is nil but NamespaceInterface.Watch was just called") + } + callInfo := struct { + Opts v1b.ListOptions + }{ + Opts: opts, + } + lockNamespaceInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockNamespaceInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedNamespaceInterface.WatchCalls()) +func (mock *NamespaceInterfaceMock) WatchCalls() []struct { + Opts v1b.ListOptions +} { + var calls []struct { + Opts v1b.ListOptions + } + lockNamespaceInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockNamespaceInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockNamespacesGetterMockNamespaces sync.RWMutex +) + +// Ensure, that NamespacesGetterMock does implement NamespacesGetter. +// If this is not the case, regenerate this file with moq. +var _ v1a.NamespacesGetter = &NamespacesGetterMock{} + +// NamespacesGetterMock is a mock implementation of NamespacesGetter. +// +// func TestSomethingThatUsesNamespacesGetter(t *testing.T) { +// +// // make and configure a mocked NamespacesGetter +// mockedNamespacesGetter := &NamespacesGetterMock{ +// NamespacesFunc: func(namespace string) v1a.NamespaceInterface { +// panic("mock out the Namespaces method") +// }, +// } +// +// // use mockedNamespacesGetter in code that requires NamespacesGetter +// // and then make assertions. +// +// } +type NamespacesGetterMock struct { + // NamespacesFunc mocks the Namespaces method. + NamespacesFunc func(namespace string) v1a.NamespaceInterface + + // calls tracks calls to the methods. + calls struct { + // Namespaces holds details about calls to the Namespaces method. + Namespaces []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// Namespaces calls NamespacesFunc. +func (mock *NamespacesGetterMock) Namespaces(namespace string) v1a.NamespaceInterface { + if mock.NamespacesFunc == nil { + panic("NamespacesGetterMock.NamespacesFunc: method is nil but NamespacesGetter.Namespaces was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockNamespacesGetterMockNamespaces.Lock() + mock.calls.Namespaces = append(mock.calls.Namespaces, callInfo) + lockNamespacesGetterMockNamespaces.Unlock() + return mock.NamespacesFunc(namespace) +} + +// NamespacesCalls gets all the calls that were made to Namespaces. +// Check the length with: +// len(mockedNamespacesGetter.NamespacesCalls()) +func (mock *NamespacesGetterMock) NamespacesCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockNamespacesGetterMockNamespaces.RLock() + calls = mock.calls.Namespaces + lockNamespacesGetterMockNamespaces.RUnlock() + return calls +} diff --git a/apis/core/v1/fakes/zz_generated_node_mock_test.go b/apis/core/v1/fakes/zz_generated_node_mock_test.go new file mode 100644 index 00000000..765fe410 --- /dev/null +++ b/apis/core/v1/fakes/zz_generated_node_mock_test.go @@ -0,0 +1,1357 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v1a "github.com/rancher/types/apis/core/v1" + v1 "k8s.io/api/core/v1" + v1b "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockNodeListerMockGet sync.RWMutex + lockNodeListerMockList sync.RWMutex +) + +// Ensure, that NodeListerMock does implement NodeLister. +// If this is not the case, regenerate this file with moq. +var _ v1a.NodeLister = &NodeListerMock{} + +// NodeListerMock is a mock implementation of NodeLister. +// +// func TestSomethingThatUsesNodeLister(t *testing.T) { +// +// // make and configure a mocked NodeLister +// mockedNodeLister := &NodeListerMock{ +// GetFunc: func(namespace string, name string) (*v1.Node, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v1.Node, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedNodeLister in code that requires NodeLister +// // and then make assertions. +// +// } +type NodeListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v1.Node, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v1.Node, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *NodeListerMock) Get(namespace string, name string) (*v1.Node, error) { + if mock.GetFunc == nil { + panic("NodeListerMock.GetFunc: method is nil but NodeLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockNodeListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockNodeListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedNodeLister.GetCalls()) +func (mock *NodeListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockNodeListerMockGet.RLock() + calls = mock.calls.Get + lockNodeListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *NodeListerMock) List(namespace string, selector labels.Selector) ([]*v1.Node, error) { + if mock.ListFunc == nil { + panic("NodeListerMock.ListFunc: method is nil but NodeLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockNodeListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockNodeListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedNodeLister.ListCalls()) +func (mock *NodeListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockNodeListerMockList.RLock() + calls = mock.calls.List + lockNodeListerMockList.RUnlock() + return calls +} + +var ( + lockNodeControllerMockAddClusterScopedHandler sync.RWMutex + lockNodeControllerMockAddHandler sync.RWMutex + lockNodeControllerMockEnqueue sync.RWMutex + lockNodeControllerMockGeneric sync.RWMutex + lockNodeControllerMockInformer sync.RWMutex + lockNodeControllerMockLister sync.RWMutex + lockNodeControllerMockStart sync.RWMutex + lockNodeControllerMockSync sync.RWMutex +) + +// Ensure, that NodeControllerMock does implement NodeController. +// If this is not the case, regenerate this file with moq. +var _ v1a.NodeController = &NodeControllerMock{} + +// NodeControllerMock is a mock implementation of NodeController. +// +// func TestSomethingThatUsesNodeController(t *testing.T) { +// +// // make and configure a mocked NodeController +// mockedNodeController := &NodeControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v1a.NodeHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v1a.NodeHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v1a.NodeLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedNodeController in code that requires NodeController +// // and then make assertions. +// +// } +type NodeControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v1a.NodeHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v1a.NodeHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v1a.NodeLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v1a.NodeHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v1a.NodeHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *NodeControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v1a.NodeHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("NodeControllerMock.AddClusterScopedHandlerFunc: method is nil but NodeController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.NodeHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockNodeControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockNodeControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedNodeController.AddClusterScopedHandlerCalls()) +func (mock *NodeControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.NodeHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.NodeHandlerFunc + } + lockNodeControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockNodeControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *NodeControllerMock) AddHandler(ctx context.Context, name string, handler v1a.NodeHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("NodeControllerMock.AddHandlerFunc: method is nil but NodeController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v1a.NodeHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockNodeControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockNodeControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedNodeController.AddHandlerCalls()) +func (mock *NodeControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v1a.NodeHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v1a.NodeHandlerFunc + } + lockNodeControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockNodeControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *NodeControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("NodeControllerMock.EnqueueFunc: method is nil but NodeController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockNodeControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockNodeControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedNodeController.EnqueueCalls()) +func (mock *NodeControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockNodeControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockNodeControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *NodeControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("NodeControllerMock.GenericFunc: method is nil but NodeController.Generic was just called") + } + callInfo := struct { + }{} + lockNodeControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockNodeControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedNodeController.GenericCalls()) +func (mock *NodeControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockNodeControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockNodeControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *NodeControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("NodeControllerMock.InformerFunc: method is nil but NodeController.Informer was just called") + } + callInfo := struct { + }{} + lockNodeControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockNodeControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedNodeController.InformerCalls()) +func (mock *NodeControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockNodeControllerMockInformer.RLock() + calls = mock.calls.Informer + lockNodeControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *NodeControllerMock) Lister() v1a.NodeLister { + if mock.ListerFunc == nil { + panic("NodeControllerMock.ListerFunc: method is nil but NodeController.Lister was just called") + } + callInfo := struct { + }{} + lockNodeControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockNodeControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedNodeController.ListerCalls()) +func (mock *NodeControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockNodeControllerMockLister.RLock() + calls = mock.calls.Lister + lockNodeControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *NodeControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("NodeControllerMock.StartFunc: method is nil but NodeController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockNodeControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockNodeControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedNodeController.StartCalls()) +func (mock *NodeControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockNodeControllerMockStart.RLock() + calls = mock.calls.Start + lockNodeControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *NodeControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("NodeControllerMock.SyncFunc: method is nil but NodeController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockNodeControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockNodeControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedNodeController.SyncCalls()) +func (mock *NodeControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockNodeControllerMockSync.RLock() + calls = mock.calls.Sync + lockNodeControllerMockSync.RUnlock() + return calls +} + +var ( + lockNodeInterfaceMockAddClusterScopedHandler sync.RWMutex + lockNodeInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockNodeInterfaceMockAddHandler sync.RWMutex + lockNodeInterfaceMockAddLifecycle sync.RWMutex + lockNodeInterfaceMockController sync.RWMutex + lockNodeInterfaceMockCreate sync.RWMutex + lockNodeInterfaceMockDelete sync.RWMutex + lockNodeInterfaceMockDeleteCollection sync.RWMutex + lockNodeInterfaceMockDeleteNamespaced sync.RWMutex + lockNodeInterfaceMockGet sync.RWMutex + lockNodeInterfaceMockGetNamespaced sync.RWMutex + lockNodeInterfaceMockList sync.RWMutex + lockNodeInterfaceMockObjectClient sync.RWMutex + lockNodeInterfaceMockUpdate sync.RWMutex + lockNodeInterfaceMockWatch sync.RWMutex +) + +// Ensure, that NodeInterfaceMock does implement NodeInterface. +// If this is not the case, regenerate this file with moq. +var _ v1a.NodeInterface = &NodeInterfaceMock{} + +// NodeInterfaceMock is a mock implementation of NodeInterface. +// +// func TestSomethingThatUsesNodeInterface(t *testing.T) { +// +// // make and configure a mocked NodeInterface +// mockedNodeInterface := &NodeInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v1a.NodeHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v1a.NodeLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v1a.NodeHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v1a.NodeLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v1a.NodeController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v1.Node) (*v1.Node, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1b.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1b.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1b.GetOptions) (*v1.Node, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.Node, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1b.ListOptions) (*v1a.NodeList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v1.Node) (*v1.Node, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1b.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedNodeInterface in code that requires NodeInterface +// // and then make assertions. +// +// } +type NodeInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v1a.NodeHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v1a.NodeLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v1a.NodeHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v1a.NodeLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v1a.NodeController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v1.Node) (*v1.Node, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1b.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1b.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1b.GetOptions) (*v1.Node, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.Node, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1b.ListOptions) (*v1a.NodeList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v1.Node) (*v1.Node, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1b.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v1a.NodeHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v1a.NodeLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v1a.NodeHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v1a.NodeLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v1.Node + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1b.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1b.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1b.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1b.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1b.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1b.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1b.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v1.Node + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1b.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *NodeInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v1a.NodeHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("NodeInterfaceMock.AddClusterScopedHandlerFunc: method is nil but NodeInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.NodeHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockNodeInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockNodeInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedNodeInterface.AddClusterScopedHandlerCalls()) +func (mock *NodeInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.NodeHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.NodeHandlerFunc + } + lockNodeInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockNodeInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *NodeInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v1a.NodeLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("NodeInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but NodeInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.NodeLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockNodeInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockNodeInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedNodeInterface.AddClusterScopedLifecycleCalls()) +func (mock *NodeInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.NodeLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.NodeLifecycle + } + lockNodeInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockNodeInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *NodeInterfaceMock) AddHandler(ctx context.Context, name string, sync v1a.NodeHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("NodeInterfaceMock.AddHandlerFunc: method is nil but NodeInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v1a.NodeHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockNodeInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockNodeInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedNodeInterface.AddHandlerCalls()) +func (mock *NodeInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v1a.NodeHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v1a.NodeHandlerFunc + } + lockNodeInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockNodeInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *NodeInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v1a.NodeLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("NodeInterfaceMock.AddLifecycleFunc: method is nil but NodeInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v1a.NodeLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockNodeInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockNodeInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedNodeInterface.AddLifecycleCalls()) +func (mock *NodeInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v1a.NodeLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v1a.NodeLifecycle + } + lockNodeInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockNodeInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *NodeInterfaceMock) Controller() v1a.NodeController { + if mock.ControllerFunc == nil { + panic("NodeInterfaceMock.ControllerFunc: method is nil but NodeInterface.Controller was just called") + } + callInfo := struct { + }{} + lockNodeInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockNodeInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedNodeInterface.ControllerCalls()) +func (mock *NodeInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockNodeInterfaceMockController.RLock() + calls = mock.calls.Controller + lockNodeInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *NodeInterfaceMock) Create(in1 *v1.Node) (*v1.Node, error) { + if mock.CreateFunc == nil { + panic("NodeInterfaceMock.CreateFunc: method is nil but NodeInterface.Create was just called") + } + callInfo := struct { + In1 *v1.Node + }{ + In1: in1, + } + lockNodeInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockNodeInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedNodeInterface.CreateCalls()) +func (mock *NodeInterfaceMock) CreateCalls() []struct { + In1 *v1.Node +} { + var calls []struct { + In1 *v1.Node + } + lockNodeInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockNodeInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *NodeInterfaceMock) Delete(name string, options *v1b.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("NodeInterfaceMock.DeleteFunc: method is nil but NodeInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1b.DeleteOptions + }{ + Name: name, + Options: options, + } + lockNodeInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockNodeInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedNodeInterface.DeleteCalls()) +func (mock *NodeInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1b.DeleteOptions +} { + var calls []struct { + Name string + Options *v1b.DeleteOptions + } + lockNodeInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockNodeInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *NodeInterfaceMock) DeleteCollection(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("NodeInterfaceMock.DeleteCollectionFunc: method is nil but NodeInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockNodeInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockNodeInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedNodeInterface.DeleteCollectionCalls()) +func (mock *NodeInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions +} { + var calls []struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions + } + lockNodeInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockNodeInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *NodeInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1b.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("NodeInterfaceMock.DeleteNamespacedFunc: method is nil but NodeInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1b.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockNodeInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockNodeInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedNodeInterface.DeleteNamespacedCalls()) +func (mock *NodeInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1b.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1b.DeleteOptions + } + lockNodeInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockNodeInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *NodeInterfaceMock) Get(name string, opts v1b.GetOptions) (*v1.Node, error) { + if mock.GetFunc == nil { + panic("NodeInterfaceMock.GetFunc: method is nil but NodeInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1b.GetOptions + }{ + Name: name, + Opts: opts, + } + lockNodeInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockNodeInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedNodeInterface.GetCalls()) +func (mock *NodeInterfaceMock) GetCalls() []struct { + Name string + Opts v1b.GetOptions +} { + var calls []struct { + Name string + Opts v1b.GetOptions + } + lockNodeInterfaceMockGet.RLock() + calls = mock.calls.Get + lockNodeInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *NodeInterfaceMock) GetNamespaced(namespace string, name string, opts v1b.GetOptions) (*v1.Node, error) { + if mock.GetNamespacedFunc == nil { + panic("NodeInterfaceMock.GetNamespacedFunc: method is nil but NodeInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1b.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockNodeInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockNodeInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedNodeInterface.GetNamespacedCalls()) +func (mock *NodeInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1b.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1b.GetOptions + } + lockNodeInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockNodeInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *NodeInterfaceMock) List(opts v1b.ListOptions) (*v1a.NodeList, error) { + if mock.ListFunc == nil { + panic("NodeInterfaceMock.ListFunc: method is nil but NodeInterface.List was just called") + } + callInfo := struct { + Opts v1b.ListOptions + }{ + Opts: opts, + } + lockNodeInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockNodeInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedNodeInterface.ListCalls()) +func (mock *NodeInterfaceMock) ListCalls() []struct { + Opts v1b.ListOptions +} { + var calls []struct { + Opts v1b.ListOptions + } + lockNodeInterfaceMockList.RLock() + calls = mock.calls.List + lockNodeInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *NodeInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("NodeInterfaceMock.ObjectClientFunc: method is nil but NodeInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockNodeInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockNodeInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedNodeInterface.ObjectClientCalls()) +func (mock *NodeInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockNodeInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockNodeInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *NodeInterfaceMock) Update(in1 *v1.Node) (*v1.Node, error) { + if mock.UpdateFunc == nil { + panic("NodeInterfaceMock.UpdateFunc: method is nil but NodeInterface.Update was just called") + } + callInfo := struct { + In1 *v1.Node + }{ + In1: in1, + } + lockNodeInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockNodeInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedNodeInterface.UpdateCalls()) +func (mock *NodeInterfaceMock) UpdateCalls() []struct { + In1 *v1.Node +} { + var calls []struct { + In1 *v1.Node + } + lockNodeInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockNodeInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *NodeInterfaceMock) Watch(opts v1b.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("NodeInterfaceMock.WatchFunc: method is nil but NodeInterface.Watch was just called") + } + callInfo := struct { + Opts v1b.ListOptions + }{ + Opts: opts, + } + lockNodeInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockNodeInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedNodeInterface.WatchCalls()) +func (mock *NodeInterfaceMock) WatchCalls() []struct { + Opts v1b.ListOptions +} { + var calls []struct { + Opts v1b.ListOptions + } + lockNodeInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockNodeInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockNodesGetterMockNodes sync.RWMutex +) + +// Ensure, that NodesGetterMock does implement NodesGetter. +// If this is not the case, regenerate this file with moq. +var _ v1a.NodesGetter = &NodesGetterMock{} + +// NodesGetterMock is a mock implementation of NodesGetter. +// +// func TestSomethingThatUsesNodesGetter(t *testing.T) { +// +// // make and configure a mocked NodesGetter +// mockedNodesGetter := &NodesGetterMock{ +// NodesFunc: func(namespace string) v1a.NodeInterface { +// panic("mock out the Nodes method") +// }, +// } +// +// // use mockedNodesGetter in code that requires NodesGetter +// // and then make assertions. +// +// } +type NodesGetterMock struct { + // NodesFunc mocks the Nodes method. + NodesFunc func(namespace string) v1a.NodeInterface + + // calls tracks calls to the methods. + calls struct { + // Nodes holds details about calls to the Nodes method. + Nodes []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// Nodes calls NodesFunc. +func (mock *NodesGetterMock) Nodes(namespace string) v1a.NodeInterface { + if mock.NodesFunc == nil { + panic("NodesGetterMock.NodesFunc: method is nil but NodesGetter.Nodes was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockNodesGetterMockNodes.Lock() + mock.calls.Nodes = append(mock.calls.Nodes, callInfo) + lockNodesGetterMockNodes.Unlock() + return mock.NodesFunc(namespace) +} + +// NodesCalls gets all the calls that were made to Nodes. +// Check the length with: +// len(mockedNodesGetter.NodesCalls()) +func (mock *NodesGetterMock) NodesCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockNodesGetterMockNodes.RLock() + calls = mock.calls.Nodes + lockNodesGetterMockNodes.RUnlock() + return calls +} diff --git a/apis/core/v1/fakes/zz_generated_persistent_volume_claim_mock_test.go b/apis/core/v1/fakes/zz_generated_persistent_volume_claim_mock_test.go new file mode 100644 index 00000000..6d6acc3f --- /dev/null +++ b/apis/core/v1/fakes/zz_generated_persistent_volume_claim_mock_test.go @@ -0,0 +1,1357 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v1a "github.com/rancher/types/apis/core/v1" + v1 "k8s.io/api/core/v1" + v1b "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockPersistentVolumeClaimListerMockGet sync.RWMutex + lockPersistentVolumeClaimListerMockList sync.RWMutex +) + +// Ensure, that PersistentVolumeClaimListerMock does implement PersistentVolumeClaimLister. +// If this is not the case, regenerate this file with moq. +var _ v1a.PersistentVolumeClaimLister = &PersistentVolumeClaimListerMock{} + +// PersistentVolumeClaimListerMock is a mock implementation of PersistentVolumeClaimLister. +// +// func TestSomethingThatUsesPersistentVolumeClaimLister(t *testing.T) { +// +// // make and configure a mocked PersistentVolumeClaimLister +// mockedPersistentVolumeClaimLister := &PersistentVolumeClaimListerMock{ +// GetFunc: func(namespace string, name string) (*v1.PersistentVolumeClaim, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v1.PersistentVolumeClaim, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedPersistentVolumeClaimLister in code that requires PersistentVolumeClaimLister +// // and then make assertions. +// +// } +type PersistentVolumeClaimListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v1.PersistentVolumeClaim, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v1.PersistentVolumeClaim, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *PersistentVolumeClaimListerMock) Get(namespace string, name string) (*v1.PersistentVolumeClaim, error) { + if mock.GetFunc == nil { + panic("PersistentVolumeClaimListerMock.GetFunc: method is nil but PersistentVolumeClaimLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockPersistentVolumeClaimListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockPersistentVolumeClaimListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedPersistentVolumeClaimLister.GetCalls()) +func (mock *PersistentVolumeClaimListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockPersistentVolumeClaimListerMockGet.RLock() + calls = mock.calls.Get + lockPersistentVolumeClaimListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *PersistentVolumeClaimListerMock) List(namespace string, selector labels.Selector) ([]*v1.PersistentVolumeClaim, error) { + if mock.ListFunc == nil { + panic("PersistentVolumeClaimListerMock.ListFunc: method is nil but PersistentVolumeClaimLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockPersistentVolumeClaimListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockPersistentVolumeClaimListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedPersistentVolumeClaimLister.ListCalls()) +func (mock *PersistentVolumeClaimListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockPersistentVolumeClaimListerMockList.RLock() + calls = mock.calls.List + lockPersistentVolumeClaimListerMockList.RUnlock() + return calls +} + +var ( + lockPersistentVolumeClaimControllerMockAddClusterScopedHandler sync.RWMutex + lockPersistentVolumeClaimControllerMockAddHandler sync.RWMutex + lockPersistentVolumeClaimControllerMockEnqueue sync.RWMutex + lockPersistentVolumeClaimControllerMockGeneric sync.RWMutex + lockPersistentVolumeClaimControllerMockInformer sync.RWMutex + lockPersistentVolumeClaimControllerMockLister sync.RWMutex + lockPersistentVolumeClaimControllerMockStart sync.RWMutex + lockPersistentVolumeClaimControllerMockSync sync.RWMutex +) + +// Ensure, that PersistentVolumeClaimControllerMock does implement PersistentVolumeClaimController. +// If this is not the case, regenerate this file with moq. +var _ v1a.PersistentVolumeClaimController = &PersistentVolumeClaimControllerMock{} + +// PersistentVolumeClaimControllerMock is a mock implementation of PersistentVolumeClaimController. +// +// func TestSomethingThatUsesPersistentVolumeClaimController(t *testing.T) { +// +// // make and configure a mocked PersistentVolumeClaimController +// mockedPersistentVolumeClaimController := &PersistentVolumeClaimControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v1a.PersistentVolumeClaimHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v1a.PersistentVolumeClaimHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v1a.PersistentVolumeClaimLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedPersistentVolumeClaimController in code that requires PersistentVolumeClaimController +// // and then make assertions. +// +// } +type PersistentVolumeClaimControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v1a.PersistentVolumeClaimHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v1a.PersistentVolumeClaimHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v1a.PersistentVolumeClaimLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v1a.PersistentVolumeClaimHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v1a.PersistentVolumeClaimHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *PersistentVolumeClaimControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v1a.PersistentVolumeClaimHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("PersistentVolumeClaimControllerMock.AddClusterScopedHandlerFunc: method is nil but PersistentVolumeClaimController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.PersistentVolumeClaimHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockPersistentVolumeClaimControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockPersistentVolumeClaimControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedPersistentVolumeClaimController.AddClusterScopedHandlerCalls()) +func (mock *PersistentVolumeClaimControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.PersistentVolumeClaimHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.PersistentVolumeClaimHandlerFunc + } + lockPersistentVolumeClaimControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockPersistentVolumeClaimControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *PersistentVolumeClaimControllerMock) AddHandler(ctx context.Context, name string, handler v1a.PersistentVolumeClaimHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("PersistentVolumeClaimControllerMock.AddHandlerFunc: method is nil but PersistentVolumeClaimController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v1a.PersistentVolumeClaimHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockPersistentVolumeClaimControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockPersistentVolumeClaimControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedPersistentVolumeClaimController.AddHandlerCalls()) +func (mock *PersistentVolumeClaimControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v1a.PersistentVolumeClaimHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v1a.PersistentVolumeClaimHandlerFunc + } + lockPersistentVolumeClaimControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockPersistentVolumeClaimControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *PersistentVolumeClaimControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("PersistentVolumeClaimControllerMock.EnqueueFunc: method is nil but PersistentVolumeClaimController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockPersistentVolumeClaimControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockPersistentVolumeClaimControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedPersistentVolumeClaimController.EnqueueCalls()) +func (mock *PersistentVolumeClaimControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockPersistentVolumeClaimControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockPersistentVolumeClaimControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *PersistentVolumeClaimControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("PersistentVolumeClaimControllerMock.GenericFunc: method is nil but PersistentVolumeClaimController.Generic was just called") + } + callInfo := struct { + }{} + lockPersistentVolumeClaimControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockPersistentVolumeClaimControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedPersistentVolumeClaimController.GenericCalls()) +func (mock *PersistentVolumeClaimControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockPersistentVolumeClaimControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockPersistentVolumeClaimControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *PersistentVolumeClaimControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("PersistentVolumeClaimControllerMock.InformerFunc: method is nil but PersistentVolumeClaimController.Informer was just called") + } + callInfo := struct { + }{} + lockPersistentVolumeClaimControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockPersistentVolumeClaimControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedPersistentVolumeClaimController.InformerCalls()) +func (mock *PersistentVolumeClaimControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockPersistentVolumeClaimControllerMockInformer.RLock() + calls = mock.calls.Informer + lockPersistentVolumeClaimControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *PersistentVolumeClaimControllerMock) Lister() v1a.PersistentVolumeClaimLister { + if mock.ListerFunc == nil { + panic("PersistentVolumeClaimControllerMock.ListerFunc: method is nil but PersistentVolumeClaimController.Lister was just called") + } + callInfo := struct { + }{} + lockPersistentVolumeClaimControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockPersistentVolumeClaimControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedPersistentVolumeClaimController.ListerCalls()) +func (mock *PersistentVolumeClaimControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockPersistentVolumeClaimControllerMockLister.RLock() + calls = mock.calls.Lister + lockPersistentVolumeClaimControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *PersistentVolumeClaimControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("PersistentVolumeClaimControllerMock.StartFunc: method is nil but PersistentVolumeClaimController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockPersistentVolumeClaimControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockPersistentVolumeClaimControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedPersistentVolumeClaimController.StartCalls()) +func (mock *PersistentVolumeClaimControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockPersistentVolumeClaimControllerMockStart.RLock() + calls = mock.calls.Start + lockPersistentVolumeClaimControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *PersistentVolumeClaimControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("PersistentVolumeClaimControllerMock.SyncFunc: method is nil but PersistentVolumeClaimController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockPersistentVolumeClaimControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockPersistentVolumeClaimControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedPersistentVolumeClaimController.SyncCalls()) +func (mock *PersistentVolumeClaimControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockPersistentVolumeClaimControllerMockSync.RLock() + calls = mock.calls.Sync + lockPersistentVolumeClaimControllerMockSync.RUnlock() + return calls +} + +var ( + lockPersistentVolumeClaimInterfaceMockAddClusterScopedHandler sync.RWMutex + lockPersistentVolumeClaimInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockPersistentVolumeClaimInterfaceMockAddHandler sync.RWMutex + lockPersistentVolumeClaimInterfaceMockAddLifecycle sync.RWMutex + lockPersistentVolumeClaimInterfaceMockController sync.RWMutex + lockPersistentVolumeClaimInterfaceMockCreate sync.RWMutex + lockPersistentVolumeClaimInterfaceMockDelete sync.RWMutex + lockPersistentVolumeClaimInterfaceMockDeleteCollection sync.RWMutex + lockPersistentVolumeClaimInterfaceMockDeleteNamespaced sync.RWMutex + lockPersistentVolumeClaimInterfaceMockGet sync.RWMutex + lockPersistentVolumeClaimInterfaceMockGetNamespaced sync.RWMutex + lockPersistentVolumeClaimInterfaceMockList sync.RWMutex + lockPersistentVolumeClaimInterfaceMockObjectClient sync.RWMutex + lockPersistentVolumeClaimInterfaceMockUpdate sync.RWMutex + lockPersistentVolumeClaimInterfaceMockWatch sync.RWMutex +) + +// Ensure, that PersistentVolumeClaimInterfaceMock does implement PersistentVolumeClaimInterface. +// If this is not the case, regenerate this file with moq. +var _ v1a.PersistentVolumeClaimInterface = &PersistentVolumeClaimInterfaceMock{} + +// PersistentVolumeClaimInterfaceMock is a mock implementation of PersistentVolumeClaimInterface. +// +// func TestSomethingThatUsesPersistentVolumeClaimInterface(t *testing.T) { +// +// // make and configure a mocked PersistentVolumeClaimInterface +// mockedPersistentVolumeClaimInterface := &PersistentVolumeClaimInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v1a.PersistentVolumeClaimHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v1a.PersistentVolumeClaimLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v1a.PersistentVolumeClaimHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v1a.PersistentVolumeClaimLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v1a.PersistentVolumeClaimController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1b.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1b.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1b.GetOptions) (*v1.PersistentVolumeClaim, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.PersistentVolumeClaim, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1b.ListOptions) (*v1a.PersistentVolumeClaimList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1b.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedPersistentVolumeClaimInterface in code that requires PersistentVolumeClaimInterface +// // and then make assertions. +// +// } +type PersistentVolumeClaimInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v1a.PersistentVolumeClaimHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v1a.PersistentVolumeClaimLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v1a.PersistentVolumeClaimHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v1a.PersistentVolumeClaimLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v1a.PersistentVolumeClaimController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1b.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1b.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1b.GetOptions) (*v1.PersistentVolumeClaim, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.PersistentVolumeClaim, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1b.ListOptions) (*v1a.PersistentVolumeClaimList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1b.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v1a.PersistentVolumeClaimHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v1a.PersistentVolumeClaimLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v1a.PersistentVolumeClaimHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v1a.PersistentVolumeClaimLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v1.PersistentVolumeClaim + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1b.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1b.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1b.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1b.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1b.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1b.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1b.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v1.PersistentVolumeClaim + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1b.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *PersistentVolumeClaimInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v1a.PersistentVolumeClaimHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("PersistentVolumeClaimInterfaceMock.AddClusterScopedHandlerFunc: method is nil but PersistentVolumeClaimInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.PersistentVolumeClaimHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockPersistentVolumeClaimInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockPersistentVolumeClaimInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedPersistentVolumeClaimInterface.AddClusterScopedHandlerCalls()) +func (mock *PersistentVolumeClaimInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.PersistentVolumeClaimHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.PersistentVolumeClaimHandlerFunc + } + lockPersistentVolumeClaimInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockPersistentVolumeClaimInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *PersistentVolumeClaimInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v1a.PersistentVolumeClaimLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("PersistentVolumeClaimInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but PersistentVolumeClaimInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.PersistentVolumeClaimLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockPersistentVolumeClaimInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockPersistentVolumeClaimInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedPersistentVolumeClaimInterface.AddClusterScopedLifecycleCalls()) +func (mock *PersistentVolumeClaimInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.PersistentVolumeClaimLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.PersistentVolumeClaimLifecycle + } + lockPersistentVolumeClaimInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockPersistentVolumeClaimInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *PersistentVolumeClaimInterfaceMock) AddHandler(ctx context.Context, name string, sync v1a.PersistentVolumeClaimHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("PersistentVolumeClaimInterfaceMock.AddHandlerFunc: method is nil but PersistentVolumeClaimInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v1a.PersistentVolumeClaimHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockPersistentVolumeClaimInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockPersistentVolumeClaimInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedPersistentVolumeClaimInterface.AddHandlerCalls()) +func (mock *PersistentVolumeClaimInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v1a.PersistentVolumeClaimHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v1a.PersistentVolumeClaimHandlerFunc + } + lockPersistentVolumeClaimInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockPersistentVolumeClaimInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *PersistentVolumeClaimInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v1a.PersistentVolumeClaimLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("PersistentVolumeClaimInterfaceMock.AddLifecycleFunc: method is nil but PersistentVolumeClaimInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v1a.PersistentVolumeClaimLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockPersistentVolumeClaimInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockPersistentVolumeClaimInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedPersistentVolumeClaimInterface.AddLifecycleCalls()) +func (mock *PersistentVolumeClaimInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v1a.PersistentVolumeClaimLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v1a.PersistentVolumeClaimLifecycle + } + lockPersistentVolumeClaimInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockPersistentVolumeClaimInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *PersistentVolumeClaimInterfaceMock) Controller() v1a.PersistentVolumeClaimController { + if mock.ControllerFunc == nil { + panic("PersistentVolumeClaimInterfaceMock.ControllerFunc: method is nil but PersistentVolumeClaimInterface.Controller was just called") + } + callInfo := struct { + }{} + lockPersistentVolumeClaimInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockPersistentVolumeClaimInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedPersistentVolumeClaimInterface.ControllerCalls()) +func (mock *PersistentVolumeClaimInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockPersistentVolumeClaimInterfaceMockController.RLock() + calls = mock.calls.Controller + lockPersistentVolumeClaimInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *PersistentVolumeClaimInterfaceMock) Create(in1 *v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error) { + if mock.CreateFunc == nil { + panic("PersistentVolumeClaimInterfaceMock.CreateFunc: method is nil but PersistentVolumeClaimInterface.Create was just called") + } + callInfo := struct { + In1 *v1.PersistentVolumeClaim + }{ + In1: in1, + } + lockPersistentVolumeClaimInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockPersistentVolumeClaimInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedPersistentVolumeClaimInterface.CreateCalls()) +func (mock *PersistentVolumeClaimInterfaceMock) CreateCalls() []struct { + In1 *v1.PersistentVolumeClaim +} { + var calls []struct { + In1 *v1.PersistentVolumeClaim + } + lockPersistentVolumeClaimInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockPersistentVolumeClaimInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *PersistentVolumeClaimInterfaceMock) Delete(name string, options *v1b.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("PersistentVolumeClaimInterfaceMock.DeleteFunc: method is nil but PersistentVolumeClaimInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1b.DeleteOptions + }{ + Name: name, + Options: options, + } + lockPersistentVolumeClaimInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockPersistentVolumeClaimInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedPersistentVolumeClaimInterface.DeleteCalls()) +func (mock *PersistentVolumeClaimInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1b.DeleteOptions +} { + var calls []struct { + Name string + Options *v1b.DeleteOptions + } + lockPersistentVolumeClaimInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockPersistentVolumeClaimInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *PersistentVolumeClaimInterfaceMock) DeleteCollection(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("PersistentVolumeClaimInterfaceMock.DeleteCollectionFunc: method is nil but PersistentVolumeClaimInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockPersistentVolumeClaimInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockPersistentVolumeClaimInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedPersistentVolumeClaimInterface.DeleteCollectionCalls()) +func (mock *PersistentVolumeClaimInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions +} { + var calls []struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions + } + lockPersistentVolumeClaimInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockPersistentVolumeClaimInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *PersistentVolumeClaimInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1b.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("PersistentVolumeClaimInterfaceMock.DeleteNamespacedFunc: method is nil but PersistentVolumeClaimInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1b.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockPersistentVolumeClaimInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockPersistentVolumeClaimInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedPersistentVolumeClaimInterface.DeleteNamespacedCalls()) +func (mock *PersistentVolumeClaimInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1b.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1b.DeleteOptions + } + lockPersistentVolumeClaimInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockPersistentVolumeClaimInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *PersistentVolumeClaimInterfaceMock) Get(name string, opts v1b.GetOptions) (*v1.PersistentVolumeClaim, error) { + if mock.GetFunc == nil { + panic("PersistentVolumeClaimInterfaceMock.GetFunc: method is nil but PersistentVolumeClaimInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1b.GetOptions + }{ + Name: name, + Opts: opts, + } + lockPersistentVolumeClaimInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockPersistentVolumeClaimInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedPersistentVolumeClaimInterface.GetCalls()) +func (mock *PersistentVolumeClaimInterfaceMock) GetCalls() []struct { + Name string + Opts v1b.GetOptions +} { + var calls []struct { + Name string + Opts v1b.GetOptions + } + lockPersistentVolumeClaimInterfaceMockGet.RLock() + calls = mock.calls.Get + lockPersistentVolumeClaimInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *PersistentVolumeClaimInterfaceMock) GetNamespaced(namespace string, name string, opts v1b.GetOptions) (*v1.PersistentVolumeClaim, error) { + if mock.GetNamespacedFunc == nil { + panic("PersistentVolumeClaimInterfaceMock.GetNamespacedFunc: method is nil but PersistentVolumeClaimInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1b.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockPersistentVolumeClaimInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockPersistentVolumeClaimInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedPersistentVolumeClaimInterface.GetNamespacedCalls()) +func (mock *PersistentVolumeClaimInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1b.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1b.GetOptions + } + lockPersistentVolumeClaimInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockPersistentVolumeClaimInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *PersistentVolumeClaimInterfaceMock) List(opts v1b.ListOptions) (*v1a.PersistentVolumeClaimList, error) { + if mock.ListFunc == nil { + panic("PersistentVolumeClaimInterfaceMock.ListFunc: method is nil but PersistentVolumeClaimInterface.List was just called") + } + callInfo := struct { + Opts v1b.ListOptions + }{ + Opts: opts, + } + lockPersistentVolumeClaimInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockPersistentVolumeClaimInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedPersistentVolumeClaimInterface.ListCalls()) +func (mock *PersistentVolumeClaimInterfaceMock) ListCalls() []struct { + Opts v1b.ListOptions +} { + var calls []struct { + Opts v1b.ListOptions + } + lockPersistentVolumeClaimInterfaceMockList.RLock() + calls = mock.calls.List + lockPersistentVolumeClaimInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *PersistentVolumeClaimInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("PersistentVolumeClaimInterfaceMock.ObjectClientFunc: method is nil but PersistentVolumeClaimInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockPersistentVolumeClaimInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockPersistentVolumeClaimInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedPersistentVolumeClaimInterface.ObjectClientCalls()) +func (mock *PersistentVolumeClaimInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockPersistentVolumeClaimInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockPersistentVolumeClaimInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *PersistentVolumeClaimInterfaceMock) Update(in1 *v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error) { + if mock.UpdateFunc == nil { + panic("PersistentVolumeClaimInterfaceMock.UpdateFunc: method is nil but PersistentVolumeClaimInterface.Update was just called") + } + callInfo := struct { + In1 *v1.PersistentVolumeClaim + }{ + In1: in1, + } + lockPersistentVolumeClaimInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockPersistentVolumeClaimInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedPersistentVolumeClaimInterface.UpdateCalls()) +func (mock *PersistentVolumeClaimInterfaceMock) UpdateCalls() []struct { + In1 *v1.PersistentVolumeClaim +} { + var calls []struct { + In1 *v1.PersistentVolumeClaim + } + lockPersistentVolumeClaimInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockPersistentVolumeClaimInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *PersistentVolumeClaimInterfaceMock) Watch(opts v1b.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("PersistentVolumeClaimInterfaceMock.WatchFunc: method is nil but PersistentVolumeClaimInterface.Watch was just called") + } + callInfo := struct { + Opts v1b.ListOptions + }{ + Opts: opts, + } + lockPersistentVolumeClaimInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockPersistentVolumeClaimInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedPersistentVolumeClaimInterface.WatchCalls()) +func (mock *PersistentVolumeClaimInterfaceMock) WatchCalls() []struct { + Opts v1b.ListOptions +} { + var calls []struct { + Opts v1b.ListOptions + } + lockPersistentVolumeClaimInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockPersistentVolumeClaimInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockPersistentVolumeClaimsGetterMockPersistentVolumeClaims sync.RWMutex +) + +// Ensure, that PersistentVolumeClaimsGetterMock does implement PersistentVolumeClaimsGetter. +// If this is not the case, regenerate this file with moq. +var _ v1a.PersistentVolumeClaimsGetter = &PersistentVolumeClaimsGetterMock{} + +// PersistentVolumeClaimsGetterMock is a mock implementation of PersistentVolumeClaimsGetter. +// +// func TestSomethingThatUsesPersistentVolumeClaimsGetter(t *testing.T) { +// +// // make and configure a mocked PersistentVolumeClaimsGetter +// mockedPersistentVolumeClaimsGetter := &PersistentVolumeClaimsGetterMock{ +// PersistentVolumeClaimsFunc: func(namespace string) v1a.PersistentVolumeClaimInterface { +// panic("mock out the PersistentVolumeClaims method") +// }, +// } +// +// // use mockedPersistentVolumeClaimsGetter in code that requires PersistentVolumeClaimsGetter +// // and then make assertions. +// +// } +type PersistentVolumeClaimsGetterMock struct { + // PersistentVolumeClaimsFunc mocks the PersistentVolumeClaims method. + PersistentVolumeClaimsFunc func(namespace string) v1a.PersistentVolumeClaimInterface + + // calls tracks calls to the methods. + calls struct { + // PersistentVolumeClaims holds details about calls to the PersistentVolumeClaims method. + PersistentVolumeClaims []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// PersistentVolumeClaims calls PersistentVolumeClaimsFunc. +func (mock *PersistentVolumeClaimsGetterMock) PersistentVolumeClaims(namespace string) v1a.PersistentVolumeClaimInterface { + if mock.PersistentVolumeClaimsFunc == nil { + panic("PersistentVolumeClaimsGetterMock.PersistentVolumeClaimsFunc: method is nil but PersistentVolumeClaimsGetter.PersistentVolumeClaims was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockPersistentVolumeClaimsGetterMockPersistentVolumeClaims.Lock() + mock.calls.PersistentVolumeClaims = append(mock.calls.PersistentVolumeClaims, callInfo) + lockPersistentVolumeClaimsGetterMockPersistentVolumeClaims.Unlock() + return mock.PersistentVolumeClaimsFunc(namespace) +} + +// PersistentVolumeClaimsCalls gets all the calls that were made to PersistentVolumeClaims. +// Check the length with: +// len(mockedPersistentVolumeClaimsGetter.PersistentVolumeClaimsCalls()) +func (mock *PersistentVolumeClaimsGetterMock) PersistentVolumeClaimsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockPersistentVolumeClaimsGetterMockPersistentVolumeClaims.RLock() + calls = mock.calls.PersistentVolumeClaims + lockPersistentVolumeClaimsGetterMockPersistentVolumeClaims.RUnlock() + return calls +} diff --git a/apis/core/v1/fakes/zz_generated_pod_mock_test.go b/apis/core/v1/fakes/zz_generated_pod_mock_test.go new file mode 100644 index 00000000..0f72d46c --- /dev/null +++ b/apis/core/v1/fakes/zz_generated_pod_mock_test.go @@ -0,0 +1,1357 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v1a "github.com/rancher/types/apis/core/v1" + v1 "k8s.io/api/core/v1" + v1b "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockPodListerMockGet sync.RWMutex + lockPodListerMockList sync.RWMutex +) + +// Ensure, that PodListerMock does implement PodLister. +// If this is not the case, regenerate this file with moq. +var _ v1a.PodLister = &PodListerMock{} + +// PodListerMock is a mock implementation of PodLister. +// +// func TestSomethingThatUsesPodLister(t *testing.T) { +// +// // make and configure a mocked PodLister +// mockedPodLister := &PodListerMock{ +// GetFunc: func(namespace string, name string) (*v1.Pod, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v1.Pod, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedPodLister in code that requires PodLister +// // and then make assertions. +// +// } +type PodListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v1.Pod, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v1.Pod, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *PodListerMock) Get(namespace string, name string) (*v1.Pod, error) { + if mock.GetFunc == nil { + panic("PodListerMock.GetFunc: method is nil but PodLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockPodListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockPodListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedPodLister.GetCalls()) +func (mock *PodListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockPodListerMockGet.RLock() + calls = mock.calls.Get + lockPodListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *PodListerMock) List(namespace string, selector labels.Selector) ([]*v1.Pod, error) { + if mock.ListFunc == nil { + panic("PodListerMock.ListFunc: method is nil but PodLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockPodListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockPodListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedPodLister.ListCalls()) +func (mock *PodListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockPodListerMockList.RLock() + calls = mock.calls.List + lockPodListerMockList.RUnlock() + return calls +} + +var ( + lockPodControllerMockAddClusterScopedHandler sync.RWMutex + lockPodControllerMockAddHandler sync.RWMutex + lockPodControllerMockEnqueue sync.RWMutex + lockPodControllerMockGeneric sync.RWMutex + lockPodControllerMockInformer sync.RWMutex + lockPodControllerMockLister sync.RWMutex + lockPodControllerMockStart sync.RWMutex + lockPodControllerMockSync sync.RWMutex +) + +// Ensure, that PodControllerMock does implement PodController. +// If this is not the case, regenerate this file with moq. +var _ v1a.PodController = &PodControllerMock{} + +// PodControllerMock is a mock implementation of PodController. +// +// func TestSomethingThatUsesPodController(t *testing.T) { +// +// // make and configure a mocked PodController +// mockedPodController := &PodControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v1a.PodHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v1a.PodHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v1a.PodLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedPodController in code that requires PodController +// // and then make assertions. +// +// } +type PodControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v1a.PodHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v1a.PodHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v1a.PodLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v1a.PodHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v1a.PodHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *PodControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v1a.PodHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("PodControllerMock.AddClusterScopedHandlerFunc: method is nil but PodController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.PodHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockPodControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockPodControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedPodController.AddClusterScopedHandlerCalls()) +func (mock *PodControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.PodHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.PodHandlerFunc + } + lockPodControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockPodControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *PodControllerMock) AddHandler(ctx context.Context, name string, handler v1a.PodHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("PodControllerMock.AddHandlerFunc: method is nil but PodController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v1a.PodHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockPodControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockPodControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedPodController.AddHandlerCalls()) +func (mock *PodControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v1a.PodHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v1a.PodHandlerFunc + } + lockPodControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockPodControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *PodControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("PodControllerMock.EnqueueFunc: method is nil but PodController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockPodControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockPodControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedPodController.EnqueueCalls()) +func (mock *PodControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockPodControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockPodControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *PodControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("PodControllerMock.GenericFunc: method is nil but PodController.Generic was just called") + } + callInfo := struct { + }{} + lockPodControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockPodControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedPodController.GenericCalls()) +func (mock *PodControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockPodControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockPodControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *PodControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("PodControllerMock.InformerFunc: method is nil but PodController.Informer was just called") + } + callInfo := struct { + }{} + lockPodControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockPodControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedPodController.InformerCalls()) +func (mock *PodControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockPodControllerMockInformer.RLock() + calls = mock.calls.Informer + lockPodControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *PodControllerMock) Lister() v1a.PodLister { + if mock.ListerFunc == nil { + panic("PodControllerMock.ListerFunc: method is nil but PodController.Lister was just called") + } + callInfo := struct { + }{} + lockPodControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockPodControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedPodController.ListerCalls()) +func (mock *PodControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockPodControllerMockLister.RLock() + calls = mock.calls.Lister + lockPodControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *PodControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("PodControllerMock.StartFunc: method is nil but PodController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockPodControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockPodControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedPodController.StartCalls()) +func (mock *PodControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockPodControllerMockStart.RLock() + calls = mock.calls.Start + lockPodControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *PodControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("PodControllerMock.SyncFunc: method is nil but PodController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockPodControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockPodControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedPodController.SyncCalls()) +func (mock *PodControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockPodControllerMockSync.RLock() + calls = mock.calls.Sync + lockPodControllerMockSync.RUnlock() + return calls +} + +var ( + lockPodInterfaceMockAddClusterScopedHandler sync.RWMutex + lockPodInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockPodInterfaceMockAddHandler sync.RWMutex + lockPodInterfaceMockAddLifecycle sync.RWMutex + lockPodInterfaceMockController sync.RWMutex + lockPodInterfaceMockCreate sync.RWMutex + lockPodInterfaceMockDelete sync.RWMutex + lockPodInterfaceMockDeleteCollection sync.RWMutex + lockPodInterfaceMockDeleteNamespaced sync.RWMutex + lockPodInterfaceMockGet sync.RWMutex + lockPodInterfaceMockGetNamespaced sync.RWMutex + lockPodInterfaceMockList sync.RWMutex + lockPodInterfaceMockObjectClient sync.RWMutex + lockPodInterfaceMockUpdate sync.RWMutex + lockPodInterfaceMockWatch sync.RWMutex +) + +// Ensure, that PodInterfaceMock does implement PodInterface. +// If this is not the case, regenerate this file with moq. +var _ v1a.PodInterface = &PodInterfaceMock{} + +// PodInterfaceMock is a mock implementation of PodInterface. +// +// func TestSomethingThatUsesPodInterface(t *testing.T) { +// +// // make and configure a mocked PodInterface +// mockedPodInterface := &PodInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v1a.PodHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v1a.PodLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v1a.PodHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v1a.PodLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v1a.PodController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v1.Pod) (*v1.Pod, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1b.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1b.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1b.GetOptions) (*v1.Pod, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.Pod, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1b.ListOptions) (*v1a.PodList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v1.Pod) (*v1.Pod, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1b.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedPodInterface in code that requires PodInterface +// // and then make assertions. +// +// } +type PodInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v1a.PodHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v1a.PodLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v1a.PodHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v1a.PodLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v1a.PodController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v1.Pod) (*v1.Pod, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1b.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1b.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1b.GetOptions) (*v1.Pod, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.Pod, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1b.ListOptions) (*v1a.PodList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v1.Pod) (*v1.Pod, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1b.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v1a.PodHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v1a.PodLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v1a.PodHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v1a.PodLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v1.Pod + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1b.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1b.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1b.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1b.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1b.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1b.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1b.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v1.Pod + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1b.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *PodInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v1a.PodHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("PodInterfaceMock.AddClusterScopedHandlerFunc: method is nil but PodInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.PodHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockPodInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockPodInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedPodInterface.AddClusterScopedHandlerCalls()) +func (mock *PodInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.PodHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.PodHandlerFunc + } + lockPodInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockPodInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *PodInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v1a.PodLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("PodInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but PodInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.PodLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockPodInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockPodInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedPodInterface.AddClusterScopedLifecycleCalls()) +func (mock *PodInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.PodLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.PodLifecycle + } + lockPodInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockPodInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *PodInterfaceMock) AddHandler(ctx context.Context, name string, sync v1a.PodHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("PodInterfaceMock.AddHandlerFunc: method is nil but PodInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v1a.PodHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockPodInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockPodInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedPodInterface.AddHandlerCalls()) +func (mock *PodInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v1a.PodHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v1a.PodHandlerFunc + } + lockPodInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockPodInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *PodInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v1a.PodLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("PodInterfaceMock.AddLifecycleFunc: method is nil but PodInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v1a.PodLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockPodInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockPodInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedPodInterface.AddLifecycleCalls()) +func (mock *PodInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v1a.PodLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v1a.PodLifecycle + } + lockPodInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockPodInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *PodInterfaceMock) Controller() v1a.PodController { + if mock.ControllerFunc == nil { + panic("PodInterfaceMock.ControllerFunc: method is nil but PodInterface.Controller was just called") + } + callInfo := struct { + }{} + lockPodInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockPodInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedPodInterface.ControllerCalls()) +func (mock *PodInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockPodInterfaceMockController.RLock() + calls = mock.calls.Controller + lockPodInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *PodInterfaceMock) Create(in1 *v1.Pod) (*v1.Pod, error) { + if mock.CreateFunc == nil { + panic("PodInterfaceMock.CreateFunc: method is nil but PodInterface.Create was just called") + } + callInfo := struct { + In1 *v1.Pod + }{ + In1: in1, + } + lockPodInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockPodInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedPodInterface.CreateCalls()) +func (mock *PodInterfaceMock) CreateCalls() []struct { + In1 *v1.Pod +} { + var calls []struct { + In1 *v1.Pod + } + lockPodInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockPodInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *PodInterfaceMock) Delete(name string, options *v1b.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("PodInterfaceMock.DeleteFunc: method is nil but PodInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1b.DeleteOptions + }{ + Name: name, + Options: options, + } + lockPodInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockPodInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedPodInterface.DeleteCalls()) +func (mock *PodInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1b.DeleteOptions +} { + var calls []struct { + Name string + Options *v1b.DeleteOptions + } + lockPodInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockPodInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *PodInterfaceMock) DeleteCollection(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("PodInterfaceMock.DeleteCollectionFunc: method is nil but PodInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockPodInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockPodInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedPodInterface.DeleteCollectionCalls()) +func (mock *PodInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions +} { + var calls []struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions + } + lockPodInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockPodInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *PodInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1b.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("PodInterfaceMock.DeleteNamespacedFunc: method is nil but PodInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1b.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockPodInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockPodInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedPodInterface.DeleteNamespacedCalls()) +func (mock *PodInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1b.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1b.DeleteOptions + } + lockPodInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockPodInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *PodInterfaceMock) Get(name string, opts v1b.GetOptions) (*v1.Pod, error) { + if mock.GetFunc == nil { + panic("PodInterfaceMock.GetFunc: method is nil but PodInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1b.GetOptions + }{ + Name: name, + Opts: opts, + } + lockPodInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockPodInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedPodInterface.GetCalls()) +func (mock *PodInterfaceMock) GetCalls() []struct { + Name string + Opts v1b.GetOptions +} { + var calls []struct { + Name string + Opts v1b.GetOptions + } + lockPodInterfaceMockGet.RLock() + calls = mock.calls.Get + lockPodInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *PodInterfaceMock) GetNamespaced(namespace string, name string, opts v1b.GetOptions) (*v1.Pod, error) { + if mock.GetNamespacedFunc == nil { + panic("PodInterfaceMock.GetNamespacedFunc: method is nil but PodInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1b.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockPodInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockPodInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedPodInterface.GetNamespacedCalls()) +func (mock *PodInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1b.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1b.GetOptions + } + lockPodInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockPodInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *PodInterfaceMock) List(opts v1b.ListOptions) (*v1a.PodList, error) { + if mock.ListFunc == nil { + panic("PodInterfaceMock.ListFunc: method is nil but PodInterface.List was just called") + } + callInfo := struct { + Opts v1b.ListOptions + }{ + Opts: opts, + } + lockPodInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockPodInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedPodInterface.ListCalls()) +func (mock *PodInterfaceMock) ListCalls() []struct { + Opts v1b.ListOptions +} { + var calls []struct { + Opts v1b.ListOptions + } + lockPodInterfaceMockList.RLock() + calls = mock.calls.List + lockPodInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *PodInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("PodInterfaceMock.ObjectClientFunc: method is nil but PodInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockPodInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockPodInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedPodInterface.ObjectClientCalls()) +func (mock *PodInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockPodInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockPodInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *PodInterfaceMock) Update(in1 *v1.Pod) (*v1.Pod, error) { + if mock.UpdateFunc == nil { + panic("PodInterfaceMock.UpdateFunc: method is nil but PodInterface.Update was just called") + } + callInfo := struct { + In1 *v1.Pod + }{ + In1: in1, + } + lockPodInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockPodInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedPodInterface.UpdateCalls()) +func (mock *PodInterfaceMock) UpdateCalls() []struct { + In1 *v1.Pod +} { + var calls []struct { + In1 *v1.Pod + } + lockPodInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockPodInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *PodInterfaceMock) Watch(opts v1b.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("PodInterfaceMock.WatchFunc: method is nil but PodInterface.Watch was just called") + } + callInfo := struct { + Opts v1b.ListOptions + }{ + Opts: opts, + } + lockPodInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockPodInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedPodInterface.WatchCalls()) +func (mock *PodInterfaceMock) WatchCalls() []struct { + Opts v1b.ListOptions +} { + var calls []struct { + Opts v1b.ListOptions + } + lockPodInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockPodInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockPodsGetterMockPods sync.RWMutex +) + +// Ensure, that PodsGetterMock does implement PodsGetter. +// If this is not the case, regenerate this file with moq. +var _ v1a.PodsGetter = &PodsGetterMock{} + +// PodsGetterMock is a mock implementation of PodsGetter. +// +// func TestSomethingThatUsesPodsGetter(t *testing.T) { +// +// // make and configure a mocked PodsGetter +// mockedPodsGetter := &PodsGetterMock{ +// PodsFunc: func(namespace string) v1a.PodInterface { +// panic("mock out the Pods method") +// }, +// } +// +// // use mockedPodsGetter in code that requires PodsGetter +// // and then make assertions. +// +// } +type PodsGetterMock struct { + // PodsFunc mocks the Pods method. + PodsFunc func(namespace string) v1a.PodInterface + + // calls tracks calls to the methods. + calls struct { + // Pods holds details about calls to the Pods method. + Pods []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// Pods calls PodsFunc. +func (mock *PodsGetterMock) Pods(namespace string) v1a.PodInterface { + if mock.PodsFunc == nil { + panic("PodsGetterMock.PodsFunc: method is nil but PodsGetter.Pods was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockPodsGetterMockPods.Lock() + mock.calls.Pods = append(mock.calls.Pods, callInfo) + lockPodsGetterMockPods.Unlock() + return mock.PodsFunc(namespace) +} + +// PodsCalls gets all the calls that were made to Pods. +// Check the length with: +// len(mockedPodsGetter.PodsCalls()) +func (mock *PodsGetterMock) PodsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockPodsGetterMockPods.RLock() + calls = mock.calls.Pods + lockPodsGetterMockPods.RUnlock() + return calls +} diff --git a/apis/core/v1/fakes/zz_generated_replication_controller_mock_test.go b/apis/core/v1/fakes/zz_generated_replication_controller_mock_test.go new file mode 100644 index 00000000..ab4a4ec6 --- /dev/null +++ b/apis/core/v1/fakes/zz_generated_replication_controller_mock_test.go @@ -0,0 +1,1357 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v1a "github.com/rancher/types/apis/core/v1" + v1 "k8s.io/api/core/v1" + v1b "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockReplicationControllerListerMockGet sync.RWMutex + lockReplicationControllerListerMockList sync.RWMutex +) + +// Ensure, that ReplicationControllerListerMock does implement ReplicationControllerLister. +// If this is not the case, regenerate this file with moq. +var _ v1a.ReplicationControllerLister = &ReplicationControllerListerMock{} + +// ReplicationControllerListerMock is a mock implementation of ReplicationControllerLister. +// +// func TestSomethingThatUsesReplicationControllerLister(t *testing.T) { +// +// // make and configure a mocked ReplicationControllerLister +// mockedReplicationControllerLister := &ReplicationControllerListerMock{ +// GetFunc: func(namespace string, name string) (*v1.ReplicationController, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v1.ReplicationController, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedReplicationControllerLister in code that requires ReplicationControllerLister +// // and then make assertions. +// +// } +type ReplicationControllerListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v1.ReplicationController, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v1.ReplicationController, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *ReplicationControllerListerMock) Get(namespace string, name string) (*v1.ReplicationController, error) { + if mock.GetFunc == nil { + panic("ReplicationControllerListerMock.GetFunc: method is nil but ReplicationControllerLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockReplicationControllerListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockReplicationControllerListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedReplicationControllerLister.GetCalls()) +func (mock *ReplicationControllerListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockReplicationControllerListerMockGet.RLock() + calls = mock.calls.Get + lockReplicationControllerListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ReplicationControllerListerMock) List(namespace string, selector labels.Selector) ([]*v1.ReplicationController, error) { + if mock.ListFunc == nil { + panic("ReplicationControllerListerMock.ListFunc: method is nil but ReplicationControllerLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockReplicationControllerListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockReplicationControllerListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedReplicationControllerLister.ListCalls()) +func (mock *ReplicationControllerListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockReplicationControllerListerMockList.RLock() + calls = mock.calls.List + lockReplicationControllerListerMockList.RUnlock() + return calls +} + +var ( + lockReplicationControllerControllerMockAddClusterScopedHandler sync.RWMutex + lockReplicationControllerControllerMockAddHandler sync.RWMutex + lockReplicationControllerControllerMockEnqueue sync.RWMutex + lockReplicationControllerControllerMockGeneric sync.RWMutex + lockReplicationControllerControllerMockInformer sync.RWMutex + lockReplicationControllerControllerMockLister sync.RWMutex + lockReplicationControllerControllerMockStart sync.RWMutex + lockReplicationControllerControllerMockSync sync.RWMutex +) + +// Ensure, that ReplicationControllerControllerMock does implement ReplicationControllerController. +// If this is not the case, regenerate this file with moq. +var _ v1a.ReplicationControllerController = &ReplicationControllerControllerMock{} + +// ReplicationControllerControllerMock is a mock implementation of ReplicationControllerController. +// +// func TestSomethingThatUsesReplicationControllerController(t *testing.T) { +// +// // make and configure a mocked ReplicationControllerController +// mockedReplicationControllerController := &ReplicationControllerControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v1a.ReplicationControllerHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v1a.ReplicationControllerHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v1a.ReplicationControllerLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedReplicationControllerController in code that requires ReplicationControllerController +// // and then make assertions. +// +// } +type ReplicationControllerControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v1a.ReplicationControllerHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v1a.ReplicationControllerHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v1a.ReplicationControllerLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v1a.ReplicationControllerHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v1a.ReplicationControllerHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ReplicationControllerControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v1a.ReplicationControllerHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ReplicationControllerControllerMock.AddClusterScopedHandlerFunc: method is nil but ReplicationControllerController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.ReplicationControllerHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockReplicationControllerControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockReplicationControllerControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedReplicationControllerController.AddClusterScopedHandlerCalls()) +func (mock *ReplicationControllerControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.ReplicationControllerHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.ReplicationControllerHandlerFunc + } + lockReplicationControllerControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockReplicationControllerControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ReplicationControllerControllerMock) AddHandler(ctx context.Context, name string, handler v1a.ReplicationControllerHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ReplicationControllerControllerMock.AddHandlerFunc: method is nil but ReplicationControllerController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v1a.ReplicationControllerHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockReplicationControllerControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockReplicationControllerControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedReplicationControllerController.AddHandlerCalls()) +func (mock *ReplicationControllerControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v1a.ReplicationControllerHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v1a.ReplicationControllerHandlerFunc + } + lockReplicationControllerControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockReplicationControllerControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *ReplicationControllerControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("ReplicationControllerControllerMock.EnqueueFunc: method is nil but ReplicationControllerController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockReplicationControllerControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockReplicationControllerControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedReplicationControllerController.EnqueueCalls()) +func (mock *ReplicationControllerControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockReplicationControllerControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockReplicationControllerControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *ReplicationControllerControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("ReplicationControllerControllerMock.GenericFunc: method is nil but ReplicationControllerController.Generic was just called") + } + callInfo := struct { + }{} + lockReplicationControllerControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockReplicationControllerControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedReplicationControllerController.GenericCalls()) +func (mock *ReplicationControllerControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockReplicationControllerControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockReplicationControllerControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *ReplicationControllerControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("ReplicationControllerControllerMock.InformerFunc: method is nil but ReplicationControllerController.Informer was just called") + } + callInfo := struct { + }{} + lockReplicationControllerControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockReplicationControllerControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedReplicationControllerController.InformerCalls()) +func (mock *ReplicationControllerControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockReplicationControllerControllerMockInformer.RLock() + calls = mock.calls.Informer + lockReplicationControllerControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *ReplicationControllerControllerMock) Lister() v1a.ReplicationControllerLister { + if mock.ListerFunc == nil { + panic("ReplicationControllerControllerMock.ListerFunc: method is nil but ReplicationControllerController.Lister was just called") + } + callInfo := struct { + }{} + lockReplicationControllerControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockReplicationControllerControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedReplicationControllerController.ListerCalls()) +func (mock *ReplicationControllerControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockReplicationControllerControllerMockLister.RLock() + calls = mock.calls.Lister + lockReplicationControllerControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *ReplicationControllerControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("ReplicationControllerControllerMock.StartFunc: method is nil but ReplicationControllerController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockReplicationControllerControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockReplicationControllerControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedReplicationControllerController.StartCalls()) +func (mock *ReplicationControllerControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockReplicationControllerControllerMockStart.RLock() + calls = mock.calls.Start + lockReplicationControllerControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *ReplicationControllerControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("ReplicationControllerControllerMock.SyncFunc: method is nil but ReplicationControllerController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockReplicationControllerControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockReplicationControllerControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedReplicationControllerController.SyncCalls()) +func (mock *ReplicationControllerControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockReplicationControllerControllerMockSync.RLock() + calls = mock.calls.Sync + lockReplicationControllerControllerMockSync.RUnlock() + return calls +} + +var ( + lockReplicationControllerInterfaceMockAddClusterScopedHandler sync.RWMutex + lockReplicationControllerInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockReplicationControllerInterfaceMockAddHandler sync.RWMutex + lockReplicationControllerInterfaceMockAddLifecycle sync.RWMutex + lockReplicationControllerInterfaceMockController sync.RWMutex + lockReplicationControllerInterfaceMockCreate sync.RWMutex + lockReplicationControllerInterfaceMockDelete sync.RWMutex + lockReplicationControllerInterfaceMockDeleteCollection sync.RWMutex + lockReplicationControllerInterfaceMockDeleteNamespaced sync.RWMutex + lockReplicationControllerInterfaceMockGet sync.RWMutex + lockReplicationControllerInterfaceMockGetNamespaced sync.RWMutex + lockReplicationControllerInterfaceMockList sync.RWMutex + lockReplicationControllerInterfaceMockObjectClient sync.RWMutex + lockReplicationControllerInterfaceMockUpdate sync.RWMutex + lockReplicationControllerInterfaceMockWatch sync.RWMutex +) + +// Ensure, that ReplicationControllerInterfaceMock does implement ReplicationControllerInterface. +// If this is not the case, regenerate this file with moq. +var _ v1a.ReplicationControllerInterface = &ReplicationControllerInterfaceMock{} + +// ReplicationControllerInterfaceMock is a mock implementation of ReplicationControllerInterface. +// +// func TestSomethingThatUsesReplicationControllerInterface(t *testing.T) { +// +// // make and configure a mocked ReplicationControllerInterface +// mockedReplicationControllerInterface := &ReplicationControllerInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v1a.ReplicationControllerHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v1a.ReplicationControllerLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v1a.ReplicationControllerHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v1a.ReplicationControllerLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v1a.ReplicationControllerController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v1.ReplicationController) (*v1.ReplicationController, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1b.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1b.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1b.GetOptions) (*v1.ReplicationController, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.ReplicationController, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1b.ListOptions) (*v1a.ReplicationControllerList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v1.ReplicationController) (*v1.ReplicationController, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1b.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedReplicationControllerInterface in code that requires ReplicationControllerInterface +// // and then make assertions. +// +// } +type ReplicationControllerInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v1a.ReplicationControllerHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v1a.ReplicationControllerLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v1a.ReplicationControllerHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v1a.ReplicationControllerLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v1a.ReplicationControllerController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v1.ReplicationController) (*v1.ReplicationController, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1b.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1b.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1b.GetOptions) (*v1.ReplicationController, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.ReplicationController, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1b.ListOptions) (*v1a.ReplicationControllerList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v1.ReplicationController) (*v1.ReplicationController, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1b.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v1a.ReplicationControllerHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v1a.ReplicationControllerLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v1a.ReplicationControllerHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v1a.ReplicationControllerLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v1.ReplicationController + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1b.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1b.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1b.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1b.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1b.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1b.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1b.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v1.ReplicationController + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1b.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ReplicationControllerInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v1a.ReplicationControllerHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ReplicationControllerInterfaceMock.AddClusterScopedHandlerFunc: method is nil but ReplicationControllerInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.ReplicationControllerHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockReplicationControllerInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockReplicationControllerInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedReplicationControllerInterface.AddClusterScopedHandlerCalls()) +func (mock *ReplicationControllerInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.ReplicationControllerHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.ReplicationControllerHandlerFunc + } + lockReplicationControllerInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockReplicationControllerInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *ReplicationControllerInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v1a.ReplicationControllerLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("ReplicationControllerInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but ReplicationControllerInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.ReplicationControllerLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockReplicationControllerInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockReplicationControllerInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedReplicationControllerInterface.AddClusterScopedLifecycleCalls()) +func (mock *ReplicationControllerInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.ReplicationControllerLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.ReplicationControllerLifecycle + } + lockReplicationControllerInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockReplicationControllerInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ReplicationControllerInterfaceMock) AddHandler(ctx context.Context, name string, sync v1a.ReplicationControllerHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ReplicationControllerInterfaceMock.AddHandlerFunc: method is nil but ReplicationControllerInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v1a.ReplicationControllerHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockReplicationControllerInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockReplicationControllerInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedReplicationControllerInterface.AddHandlerCalls()) +func (mock *ReplicationControllerInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v1a.ReplicationControllerHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v1a.ReplicationControllerHandlerFunc + } + lockReplicationControllerInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockReplicationControllerInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *ReplicationControllerInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v1a.ReplicationControllerLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("ReplicationControllerInterfaceMock.AddLifecycleFunc: method is nil but ReplicationControllerInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v1a.ReplicationControllerLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockReplicationControllerInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockReplicationControllerInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedReplicationControllerInterface.AddLifecycleCalls()) +func (mock *ReplicationControllerInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v1a.ReplicationControllerLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v1a.ReplicationControllerLifecycle + } + lockReplicationControllerInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockReplicationControllerInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *ReplicationControllerInterfaceMock) Controller() v1a.ReplicationControllerController { + if mock.ControllerFunc == nil { + panic("ReplicationControllerInterfaceMock.ControllerFunc: method is nil but ReplicationControllerInterface.Controller was just called") + } + callInfo := struct { + }{} + lockReplicationControllerInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockReplicationControllerInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedReplicationControllerInterface.ControllerCalls()) +func (mock *ReplicationControllerInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockReplicationControllerInterfaceMockController.RLock() + calls = mock.calls.Controller + lockReplicationControllerInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *ReplicationControllerInterfaceMock) Create(in1 *v1.ReplicationController) (*v1.ReplicationController, error) { + if mock.CreateFunc == nil { + panic("ReplicationControllerInterfaceMock.CreateFunc: method is nil but ReplicationControllerInterface.Create was just called") + } + callInfo := struct { + In1 *v1.ReplicationController + }{ + In1: in1, + } + lockReplicationControllerInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockReplicationControllerInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedReplicationControllerInterface.CreateCalls()) +func (mock *ReplicationControllerInterfaceMock) CreateCalls() []struct { + In1 *v1.ReplicationController +} { + var calls []struct { + In1 *v1.ReplicationController + } + lockReplicationControllerInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockReplicationControllerInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *ReplicationControllerInterfaceMock) Delete(name string, options *v1b.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("ReplicationControllerInterfaceMock.DeleteFunc: method is nil but ReplicationControllerInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1b.DeleteOptions + }{ + Name: name, + Options: options, + } + lockReplicationControllerInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockReplicationControllerInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedReplicationControllerInterface.DeleteCalls()) +func (mock *ReplicationControllerInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1b.DeleteOptions +} { + var calls []struct { + Name string + Options *v1b.DeleteOptions + } + lockReplicationControllerInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockReplicationControllerInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *ReplicationControllerInterfaceMock) DeleteCollection(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("ReplicationControllerInterfaceMock.DeleteCollectionFunc: method is nil but ReplicationControllerInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockReplicationControllerInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockReplicationControllerInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedReplicationControllerInterface.DeleteCollectionCalls()) +func (mock *ReplicationControllerInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions +} { + var calls []struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions + } + lockReplicationControllerInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockReplicationControllerInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *ReplicationControllerInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1b.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("ReplicationControllerInterfaceMock.DeleteNamespacedFunc: method is nil but ReplicationControllerInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1b.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockReplicationControllerInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockReplicationControllerInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedReplicationControllerInterface.DeleteNamespacedCalls()) +func (mock *ReplicationControllerInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1b.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1b.DeleteOptions + } + lockReplicationControllerInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockReplicationControllerInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *ReplicationControllerInterfaceMock) Get(name string, opts v1b.GetOptions) (*v1.ReplicationController, error) { + if mock.GetFunc == nil { + panic("ReplicationControllerInterfaceMock.GetFunc: method is nil but ReplicationControllerInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1b.GetOptions + }{ + Name: name, + Opts: opts, + } + lockReplicationControllerInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockReplicationControllerInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedReplicationControllerInterface.GetCalls()) +func (mock *ReplicationControllerInterfaceMock) GetCalls() []struct { + Name string + Opts v1b.GetOptions +} { + var calls []struct { + Name string + Opts v1b.GetOptions + } + lockReplicationControllerInterfaceMockGet.RLock() + calls = mock.calls.Get + lockReplicationControllerInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *ReplicationControllerInterfaceMock) GetNamespaced(namespace string, name string, opts v1b.GetOptions) (*v1.ReplicationController, error) { + if mock.GetNamespacedFunc == nil { + panic("ReplicationControllerInterfaceMock.GetNamespacedFunc: method is nil but ReplicationControllerInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1b.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockReplicationControllerInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockReplicationControllerInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedReplicationControllerInterface.GetNamespacedCalls()) +func (mock *ReplicationControllerInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1b.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1b.GetOptions + } + lockReplicationControllerInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockReplicationControllerInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ReplicationControllerInterfaceMock) List(opts v1b.ListOptions) (*v1a.ReplicationControllerList, error) { + if mock.ListFunc == nil { + panic("ReplicationControllerInterfaceMock.ListFunc: method is nil but ReplicationControllerInterface.List was just called") + } + callInfo := struct { + Opts v1b.ListOptions + }{ + Opts: opts, + } + lockReplicationControllerInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockReplicationControllerInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedReplicationControllerInterface.ListCalls()) +func (mock *ReplicationControllerInterfaceMock) ListCalls() []struct { + Opts v1b.ListOptions +} { + var calls []struct { + Opts v1b.ListOptions + } + lockReplicationControllerInterfaceMockList.RLock() + calls = mock.calls.List + lockReplicationControllerInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *ReplicationControllerInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("ReplicationControllerInterfaceMock.ObjectClientFunc: method is nil but ReplicationControllerInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockReplicationControllerInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockReplicationControllerInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedReplicationControllerInterface.ObjectClientCalls()) +func (mock *ReplicationControllerInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockReplicationControllerInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockReplicationControllerInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *ReplicationControllerInterfaceMock) Update(in1 *v1.ReplicationController) (*v1.ReplicationController, error) { + if mock.UpdateFunc == nil { + panic("ReplicationControllerInterfaceMock.UpdateFunc: method is nil but ReplicationControllerInterface.Update was just called") + } + callInfo := struct { + In1 *v1.ReplicationController + }{ + In1: in1, + } + lockReplicationControllerInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockReplicationControllerInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedReplicationControllerInterface.UpdateCalls()) +func (mock *ReplicationControllerInterfaceMock) UpdateCalls() []struct { + In1 *v1.ReplicationController +} { + var calls []struct { + In1 *v1.ReplicationController + } + lockReplicationControllerInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockReplicationControllerInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *ReplicationControllerInterfaceMock) Watch(opts v1b.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("ReplicationControllerInterfaceMock.WatchFunc: method is nil but ReplicationControllerInterface.Watch was just called") + } + callInfo := struct { + Opts v1b.ListOptions + }{ + Opts: opts, + } + lockReplicationControllerInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockReplicationControllerInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedReplicationControllerInterface.WatchCalls()) +func (mock *ReplicationControllerInterfaceMock) WatchCalls() []struct { + Opts v1b.ListOptions +} { + var calls []struct { + Opts v1b.ListOptions + } + lockReplicationControllerInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockReplicationControllerInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockReplicationControllersGetterMockReplicationControllers sync.RWMutex +) + +// Ensure, that ReplicationControllersGetterMock does implement ReplicationControllersGetter. +// If this is not the case, regenerate this file with moq. +var _ v1a.ReplicationControllersGetter = &ReplicationControllersGetterMock{} + +// ReplicationControllersGetterMock is a mock implementation of ReplicationControllersGetter. +// +// func TestSomethingThatUsesReplicationControllersGetter(t *testing.T) { +// +// // make and configure a mocked ReplicationControllersGetter +// mockedReplicationControllersGetter := &ReplicationControllersGetterMock{ +// ReplicationControllersFunc: func(namespace string) v1a.ReplicationControllerInterface { +// panic("mock out the ReplicationControllers method") +// }, +// } +// +// // use mockedReplicationControllersGetter in code that requires ReplicationControllersGetter +// // and then make assertions. +// +// } +type ReplicationControllersGetterMock struct { + // ReplicationControllersFunc mocks the ReplicationControllers method. + ReplicationControllersFunc func(namespace string) v1a.ReplicationControllerInterface + + // calls tracks calls to the methods. + calls struct { + // ReplicationControllers holds details about calls to the ReplicationControllers method. + ReplicationControllers []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// ReplicationControllers calls ReplicationControllersFunc. +func (mock *ReplicationControllersGetterMock) ReplicationControllers(namespace string) v1a.ReplicationControllerInterface { + if mock.ReplicationControllersFunc == nil { + panic("ReplicationControllersGetterMock.ReplicationControllersFunc: method is nil but ReplicationControllersGetter.ReplicationControllers was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockReplicationControllersGetterMockReplicationControllers.Lock() + mock.calls.ReplicationControllers = append(mock.calls.ReplicationControllers, callInfo) + lockReplicationControllersGetterMockReplicationControllers.Unlock() + return mock.ReplicationControllersFunc(namespace) +} + +// ReplicationControllersCalls gets all the calls that were made to ReplicationControllers. +// Check the length with: +// len(mockedReplicationControllersGetter.ReplicationControllersCalls()) +func (mock *ReplicationControllersGetterMock) ReplicationControllersCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockReplicationControllersGetterMockReplicationControllers.RLock() + calls = mock.calls.ReplicationControllers + lockReplicationControllersGetterMockReplicationControllers.RUnlock() + return calls +} diff --git a/apis/core/v1/fakes/zz_generated_resource_quota_mock_test.go b/apis/core/v1/fakes/zz_generated_resource_quota_mock_test.go new file mode 100644 index 00000000..aa4a3afa --- /dev/null +++ b/apis/core/v1/fakes/zz_generated_resource_quota_mock_test.go @@ -0,0 +1,1357 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v1a "github.com/rancher/types/apis/core/v1" + v1 "k8s.io/api/core/v1" + v1b "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockResourceQuotaListerMockGet sync.RWMutex + lockResourceQuotaListerMockList sync.RWMutex +) + +// Ensure, that ResourceQuotaListerMock does implement ResourceQuotaLister. +// If this is not the case, regenerate this file with moq. +var _ v1a.ResourceQuotaLister = &ResourceQuotaListerMock{} + +// ResourceQuotaListerMock is a mock implementation of ResourceQuotaLister. +// +// func TestSomethingThatUsesResourceQuotaLister(t *testing.T) { +// +// // make and configure a mocked ResourceQuotaLister +// mockedResourceQuotaLister := &ResourceQuotaListerMock{ +// GetFunc: func(namespace string, name string) (*v1.ResourceQuota, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v1.ResourceQuota, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedResourceQuotaLister in code that requires ResourceQuotaLister +// // and then make assertions. +// +// } +type ResourceQuotaListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v1.ResourceQuota, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v1.ResourceQuota, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *ResourceQuotaListerMock) Get(namespace string, name string) (*v1.ResourceQuota, error) { + if mock.GetFunc == nil { + panic("ResourceQuotaListerMock.GetFunc: method is nil but ResourceQuotaLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockResourceQuotaListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockResourceQuotaListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedResourceQuotaLister.GetCalls()) +func (mock *ResourceQuotaListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockResourceQuotaListerMockGet.RLock() + calls = mock.calls.Get + lockResourceQuotaListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ResourceQuotaListerMock) List(namespace string, selector labels.Selector) ([]*v1.ResourceQuota, error) { + if mock.ListFunc == nil { + panic("ResourceQuotaListerMock.ListFunc: method is nil but ResourceQuotaLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockResourceQuotaListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockResourceQuotaListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedResourceQuotaLister.ListCalls()) +func (mock *ResourceQuotaListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockResourceQuotaListerMockList.RLock() + calls = mock.calls.List + lockResourceQuotaListerMockList.RUnlock() + return calls +} + +var ( + lockResourceQuotaControllerMockAddClusterScopedHandler sync.RWMutex + lockResourceQuotaControllerMockAddHandler sync.RWMutex + lockResourceQuotaControllerMockEnqueue sync.RWMutex + lockResourceQuotaControllerMockGeneric sync.RWMutex + lockResourceQuotaControllerMockInformer sync.RWMutex + lockResourceQuotaControllerMockLister sync.RWMutex + lockResourceQuotaControllerMockStart sync.RWMutex + lockResourceQuotaControllerMockSync sync.RWMutex +) + +// Ensure, that ResourceQuotaControllerMock does implement ResourceQuotaController. +// If this is not the case, regenerate this file with moq. +var _ v1a.ResourceQuotaController = &ResourceQuotaControllerMock{} + +// ResourceQuotaControllerMock is a mock implementation of ResourceQuotaController. +// +// func TestSomethingThatUsesResourceQuotaController(t *testing.T) { +// +// // make and configure a mocked ResourceQuotaController +// mockedResourceQuotaController := &ResourceQuotaControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v1a.ResourceQuotaHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v1a.ResourceQuotaHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v1a.ResourceQuotaLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedResourceQuotaController in code that requires ResourceQuotaController +// // and then make assertions. +// +// } +type ResourceQuotaControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v1a.ResourceQuotaHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v1a.ResourceQuotaHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v1a.ResourceQuotaLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v1a.ResourceQuotaHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v1a.ResourceQuotaHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ResourceQuotaControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v1a.ResourceQuotaHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ResourceQuotaControllerMock.AddClusterScopedHandlerFunc: method is nil but ResourceQuotaController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.ResourceQuotaHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockResourceQuotaControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockResourceQuotaControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedResourceQuotaController.AddClusterScopedHandlerCalls()) +func (mock *ResourceQuotaControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.ResourceQuotaHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.ResourceQuotaHandlerFunc + } + lockResourceQuotaControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockResourceQuotaControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ResourceQuotaControllerMock) AddHandler(ctx context.Context, name string, handler v1a.ResourceQuotaHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ResourceQuotaControllerMock.AddHandlerFunc: method is nil but ResourceQuotaController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v1a.ResourceQuotaHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockResourceQuotaControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockResourceQuotaControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedResourceQuotaController.AddHandlerCalls()) +func (mock *ResourceQuotaControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v1a.ResourceQuotaHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v1a.ResourceQuotaHandlerFunc + } + lockResourceQuotaControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockResourceQuotaControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *ResourceQuotaControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("ResourceQuotaControllerMock.EnqueueFunc: method is nil but ResourceQuotaController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockResourceQuotaControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockResourceQuotaControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedResourceQuotaController.EnqueueCalls()) +func (mock *ResourceQuotaControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockResourceQuotaControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockResourceQuotaControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *ResourceQuotaControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("ResourceQuotaControllerMock.GenericFunc: method is nil but ResourceQuotaController.Generic was just called") + } + callInfo := struct { + }{} + lockResourceQuotaControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockResourceQuotaControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedResourceQuotaController.GenericCalls()) +func (mock *ResourceQuotaControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockResourceQuotaControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockResourceQuotaControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *ResourceQuotaControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("ResourceQuotaControllerMock.InformerFunc: method is nil but ResourceQuotaController.Informer was just called") + } + callInfo := struct { + }{} + lockResourceQuotaControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockResourceQuotaControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedResourceQuotaController.InformerCalls()) +func (mock *ResourceQuotaControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockResourceQuotaControllerMockInformer.RLock() + calls = mock.calls.Informer + lockResourceQuotaControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *ResourceQuotaControllerMock) Lister() v1a.ResourceQuotaLister { + if mock.ListerFunc == nil { + panic("ResourceQuotaControllerMock.ListerFunc: method is nil but ResourceQuotaController.Lister was just called") + } + callInfo := struct { + }{} + lockResourceQuotaControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockResourceQuotaControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedResourceQuotaController.ListerCalls()) +func (mock *ResourceQuotaControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockResourceQuotaControllerMockLister.RLock() + calls = mock.calls.Lister + lockResourceQuotaControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *ResourceQuotaControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("ResourceQuotaControllerMock.StartFunc: method is nil but ResourceQuotaController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockResourceQuotaControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockResourceQuotaControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedResourceQuotaController.StartCalls()) +func (mock *ResourceQuotaControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockResourceQuotaControllerMockStart.RLock() + calls = mock.calls.Start + lockResourceQuotaControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *ResourceQuotaControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("ResourceQuotaControllerMock.SyncFunc: method is nil but ResourceQuotaController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockResourceQuotaControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockResourceQuotaControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedResourceQuotaController.SyncCalls()) +func (mock *ResourceQuotaControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockResourceQuotaControllerMockSync.RLock() + calls = mock.calls.Sync + lockResourceQuotaControllerMockSync.RUnlock() + return calls +} + +var ( + lockResourceQuotaInterfaceMockAddClusterScopedHandler sync.RWMutex + lockResourceQuotaInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockResourceQuotaInterfaceMockAddHandler sync.RWMutex + lockResourceQuotaInterfaceMockAddLifecycle sync.RWMutex + lockResourceQuotaInterfaceMockController sync.RWMutex + lockResourceQuotaInterfaceMockCreate sync.RWMutex + lockResourceQuotaInterfaceMockDelete sync.RWMutex + lockResourceQuotaInterfaceMockDeleteCollection sync.RWMutex + lockResourceQuotaInterfaceMockDeleteNamespaced sync.RWMutex + lockResourceQuotaInterfaceMockGet sync.RWMutex + lockResourceQuotaInterfaceMockGetNamespaced sync.RWMutex + lockResourceQuotaInterfaceMockList sync.RWMutex + lockResourceQuotaInterfaceMockObjectClient sync.RWMutex + lockResourceQuotaInterfaceMockUpdate sync.RWMutex + lockResourceQuotaInterfaceMockWatch sync.RWMutex +) + +// Ensure, that ResourceQuotaInterfaceMock does implement ResourceQuotaInterface. +// If this is not the case, regenerate this file with moq. +var _ v1a.ResourceQuotaInterface = &ResourceQuotaInterfaceMock{} + +// ResourceQuotaInterfaceMock is a mock implementation of ResourceQuotaInterface. +// +// func TestSomethingThatUsesResourceQuotaInterface(t *testing.T) { +// +// // make and configure a mocked ResourceQuotaInterface +// mockedResourceQuotaInterface := &ResourceQuotaInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v1a.ResourceQuotaHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v1a.ResourceQuotaLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v1a.ResourceQuotaHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v1a.ResourceQuotaLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v1a.ResourceQuotaController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v1.ResourceQuota) (*v1.ResourceQuota, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1b.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1b.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1b.GetOptions) (*v1.ResourceQuota, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.ResourceQuota, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1b.ListOptions) (*v1a.ResourceQuotaList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v1.ResourceQuota) (*v1.ResourceQuota, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1b.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedResourceQuotaInterface in code that requires ResourceQuotaInterface +// // and then make assertions. +// +// } +type ResourceQuotaInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v1a.ResourceQuotaHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v1a.ResourceQuotaLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v1a.ResourceQuotaHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v1a.ResourceQuotaLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v1a.ResourceQuotaController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v1.ResourceQuota) (*v1.ResourceQuota, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1b.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1b.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1b.GetOptions) (*v1.ResourceQuota, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.ResourceQuota, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1b.ListOptions) (*v1a.ResourceQuotaList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v1.ResourceQuota) (*v1.ResourceQuota, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1b.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v1a.ResourceQuotaHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v1a.ResourceQuotaLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v1a.ResourceQuotaHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v1a.ResourceQuotaLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v1.ResourceQuota + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1b.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1b.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1b.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1b.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1b.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1b.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1b.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v1.ResourceQuota + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1b.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ResourceQuotaInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v1a.ResourceQuotaHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ResourceQuotaInterfaceMock.AddClusterScopedHandlerFunc: method is nil but ResourceQuotaInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.ResourceQuotaHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockResourceQuotaInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockResourceQuotaInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedResourceQuotaInterface.AddClusterScopedHandlerCalls()) +func (mock *ResourceQuotaInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.ResourceQuotaHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.ResourceQuotaHandlerFunc + } + lockResourceQuotaInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockResourceQuotaInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *ResourceQuotaInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v1a.ResourceQuotaLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("ResourceQuotaInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but ResourceQuotaInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.ResourceQuotaLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockResourceQuotaInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockResourceQuotaInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedResourceQuotaInterface.AddClusterScopedLifecycleCalls()) +func (mock *ResourceQuotaInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.ResourceQuotaLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.ResourceQuotaLifecycle + } + lockResourceQuotaInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockResourceQuotaInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ResourceQuotaInterfaceMock) AddHandler(ctx context.Context, name string, sync v1a.ResourceQuotaHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ResourceQuotaInterfaceMock.AddHandlerFunc: method is nil but ResourceQuotaInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v1a.ResourceQuotaHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockResourceQuotaInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockResourceQuotaInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedResourceQuotaInterface.AddHandlerCalls()) +func (mock *ResourceQuotaInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v1a.ResourceQuotaHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v1a.ResourceQuotaHandlerFunc + } + lockResourceQuotaInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockResourceQuotaInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *ResourceQuotaInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v1a.ResourceQuotaLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("ResourceQuotaInterfaceMock.AddLifecycleFunc: method is nil but ResourceQuotaInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v1a.ResourceQuotaLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockResourceQuotaInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockResourceQuotaInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedResourceQuotaInterface.AddLifecycleCalls()) +func (mock *ResourceQuotaInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v1a.ResourceQuotaLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v1a.ResourceQuotaLifecycle + } + lockResourceQuotaInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockResourceQuotaInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *ResourceQuotaInterfaceMock) Controller() v1a.ResourceQuotaController { + if mock.ControllerFunc == nil { + panic("ResourceQuotaInterfaceMock.ControllerFunc: method is nil but ResourceQuotaInterface.Controller was just called") + } + callInfo := struct { + }{} + lockResourceQuotaInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockResourceQuotaInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedResourceQuotaInterface.ControllerCalls()) +func (mock *ResourceQuotaInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockResourceQuotaInterfaceMockController.RLock() + calls = mock.calls.Controller + lockResourceQuotaInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *ResourceQuotaInterfaceMock) Create(in1 *v1.ResourceQuota) (*v1.ResourceQuota, error) { + if mock.CreateFunc == nil { + panic("ResourceQuotaInterfaceMock.CreateFunc: method is nil but ResourceQuotaInterface.Create was just called") + } + callInfo := struct { + In1 *v1.ResourceQuota + }{ + In1: in1, + } + lockResourceQuotaInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockResourceQuotaInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedResourceQuotaInterface.CreateCalls()) +func (mock *ResourceQuotaInterfaceMock) CreateCalls() []struct { + In1 *v1.ResourceQuota +} { + var calls []struct { + In1 *v1.ResourceQuota + } + lockResourceQuotaInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockResourceQuotaInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *ResourceQuotaInterfaceMock) Delete(name string, options *v1b.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("ResourceQuotaInterfaceMock.DeleteFunc: method is nil but ResourceQuotaInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1b.DeleteOptions + }{ + Name: name, + Options: options, + } + lockResourceQuotaInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockResourceQuotaInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedResourceQuotaInterface.DeleteCalls()) +func (mock *ResourceQuotaInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1b.DeleteOptions +} { + var calls []struct { + Name string + Options *v1b.DeleteOptions + } + lockResourceQuotaInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockResourceQuotaInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *ResourceQuotaInterfaceMock) DeleteCollection(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("ResourceQuotaInterfaceMock.DeleteCollectionFunc: method is nil but ResourceQuotaInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockResourceQuotaInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockResourceQuotaInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedResourceQuotaInterface.DeleteCollectionCalls()) +func (mock *ResourceQuotaInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions +} { + var calls []struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions + } + lockResourceQuotaInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockResourceQuotaInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *ResourceQuotaInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1b.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("ResourceQuotaInterfaceMock.DeleteNamespacedFunc: method is nil but ResourceQuotaInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1b.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockResourceQuotaInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockResourceQuotaInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedResourceQuotaInterface.DeleteNamespacedCalls()) +func (mock *ResourceQuotaInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1b.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1b.DeleteOptions + } + lockResourceQuotaInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockResourceQuotaInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *ResourceQuotaInterfaceMock) Get(name string, opts v1b.GetOptions) (*v1.ResourceQuota, error) { + if mock.GetFunc == nil { + panic("ResourceQuotaInterfaceMock.GetFunc: method is nil but ResourceQuotaInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1b.GetOptions + }{ + Name: name, + Opts: opts, + } + lockResourceQuotaInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockResourceQuotaInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedResourceQuotaInterface.GetCalls()) +func (mock *ResourceQuotaInterfaceMock) GetCalls() []struct { + Name string + Opts v1b.GetOptions +} { + var calls []struct { + Name string + Opts v1b.GetOptions + } + lockResourceQuotaInterfaceMockGet.RLock() + calls = mock.calls.Get + lockResourceQuotaInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *ResourceQuotaInterfaceMock) GetNamespaced(namespace string, name string, opts v1b.GetOptions) (*v1.ResourceQuota, error) { + if mock.GetNamespacedFunc == nil { + panic("ResourceQuotaInterfaceMock.GetNamespacedFunc: method is nil but ResourceQuotaInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1b.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockResourceQuotaInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockResourceQuotaInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedResourceQuotaInterface.GetNamespacedCalls()) +func (mock *ResourceQuotaInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1b.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1b.GetOptions + } + lockResourceQuotaInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockResourceQuotaInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ResourceQuotaInterfaceMock) List(opts v1b.ListOptions) (*v1a.ResourceQuotaList, error) { + if mock.ListFunc == nil { + panic("ResourceQuotaInterfaceMock.ListFunc: method is nil but ResourceQuotaInterface.List was just called") + } + callInfo := struct { + Opts v1b.ListOptions + }{ + Opts: opts, + } + lockResourceQuotaInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockResourceQuotaInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedResourceQuotaInterface.ListCalls()) +func (mock *ResourceQuotaInterfaceMock) ListCalls() []struct { + Opts v1b.ListOptions +} { + var calls []struct { + Opts v1b.ListOptions + } + lockResourceQuotaInterfaceMockList.RLock() + calls = mock.calls.List + lockResourceQuotaInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *ResourceQuotaInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("ResourceQuotaInterfaceMock.ObjectClientFunc: method is nil but ResourceQuotaInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockResourceQuotaInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockResourceQuotaInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedResourceQuotaInterface.ObjectClientCalls()) +func (mock *ResourceQuotaInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockResourceQuotaInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockResourceQuotaInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *ResourceQuotaInterfaceMock) Update(in1 *v1.ResourceQuota) (*v1.ResourceQuota, error) { + if mock.UpdateFunc == nil { + panic("ResourceQuotaInterfaceMock.UpdateFunc: method is nil but ResourceQuotaInterface.Update was just called") + } + callInfo := struct { + In1 *v1.ResourceQuota + }{ + In1: in1, + } + lockResourceQuotaInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockResourceQuotaInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedResourceQuotaInterface.UpdateCalls()) +func (mock *ResourceQuotaInterfaceMock) UpdateCalls() []struct { + In1 *v1.ResourceQuota +} { + var calls []struct { + In1 *v1.ResourceQuota + } + lockResourceQuotaInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockResourceQuotaInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *ResourceQuotaInterfaceMock) Watch(opts v1b.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("ResourceQuotaInterfaceMock.WatchFunc: method is nil but ResourceQuotaInterface.Watch was just called") + } + callInfo := struct { + Opts v1b.ListOptions + }{ + Opts: opts, + } + lockResourceQuotaInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockResourceQuotaInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedResourceQuotaInterface.WatchCalls()) +func (mock *ResourceQuotaInterfaceMock) WatchCalls() []struct { + Opts v1b.ListOptions +} { + var calls []struct { + Opts v1b.ListOptions + } + lockResourceQuotaInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockResourceQuotaInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockResourceQuotasGetterMockResourceQuotas sync.RWMutex +) + +// Ensure, that ResourceQuotasGetterMock does implement ResourceQuotasGetter. +// If this is not the case, regenerate this file with moq. +var _ v1a.ResourceQuotasGetter = &ResourceQuotasGetterMock{} + +// ResourceQuotasGetterMock is a mock implementation of ResourceQuotasGetter. +// +// func TestSomethingThatUsesResourceQuotasGetter(t *testing.T) { +// +// // make and configure a mocked ResourceQuotasGetter +// mockedResourceQuotasGetter := &ResourceQuotasGetterMock{ +// ResourceQuotasFunc: func(namespace string) v1a.ResourceQuotaInterface { +// panic("mock out the ResourceQuotas method") +// }, +// } +// +// // use mockedResourceQuotasGetter in code that requires ResourceQuotasGetter +// // and then make assertions. +// +// } +type ResourceQuotasGetterMock struct { + // ResourceQuotasFunc mocks the ResourceQuotas method. + ResourceQuotasFunc func(namespace string) v1a.ResourceQuotaInterface + + // calls tracks calls to the methods. + calls struct { + // ResourceQuotas holds details about calls to the ResourceQuotas method. + ResourceQuotas []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// ResourceQuotas calls ResourceQuotasFunc. +func (mock *ResourceQuotasGetterMock) ResourceQuotas(namespace string) v1a.ResourceQuotaInterface { + if mock.ResourceQuotasFunc == nil { + panic("ResourceQuotasGetterMock.ResourceQuotasFunc: method is nil but ResourceQuotasGetter.ResourceQuotas was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockResourceQuotasGetterMockResourceQuotas.Lock() + mock.calls.ResourceQuotas = append(mock.calls.ResourceQuotas, callInfo) + lockResourceQuotasGetterMockResourceQuotas.Unlock() + return mock.ResourceQuotasFunc(namespace) +} + +// ResourceQuotasCalls gets all the calls that were made to ResourceQuotas. +// Check the length with: +// len(mockedResourceQuotasGetter.ResourceQuotasCalls()) +func (mock *ResourceQuotasGetterMock) ResourceQuotasCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockResourceQuotasGetterMockResourceQuotas.RLock() + calls = mock.calls.ResourceQuotas + lockResourceQuotasGetterMockResourceQuotas.RUnlock() + return calls +} diff --git a/apis/core/v1/fakes/zz_generated_secret_mock_test.go b/apis/core/v1/fakes/zz_generated_secret_mock_test.go new file mode 100644 index 00000000..ec1e5574 --- /dev/null +++ b/apis/core/v1/fakes/zz_generated_secret_mock_test.go @@ -0,0 +1,1357 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v1a "github.com/rancher/types/apis/core/v1" + v1 "k8s.io/api/core/v1" + v1b "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockSecretListerMockGet sync.RWMutex + lockSecretListerMockList sync.RWMutex +) + +// Ensure, that SecretListerMock does implement SecretLister. +// If this is not the case, regenerate this file with moq. +var _ v1a.SecretLister = &SecretListerMock{} + +// SecretListerMock is a mock implementation of SecretLister. +// +// func TestSomethingThatUsesSecretLister(t *testing.T) { +// +// // make and configure a mocked SecretLister +// mockedSecretLister := &SecretListerMock{ +// GetFunc: func(namespace string, name string) (*v1.Secret, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v1.Secret, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedSecretLister in code that requires SecretLister +// // and then make assertions. +// +// } +type SecretListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v1.Secret, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v1.Secret, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *SecretListerMock) Get(namespace string, name string) (*v1.Secret, error) { + if mock.GetFunc == nil { + panic("SecretListerMock.GetFunc: method is nil but SecretLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockSecretListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockSecretListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedSecretLister.GetCalls()) +func (mock *SecretListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockSecretListerMockGet.RLock() + calls = mock.calls.Get + lockSecretListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *SecretListerMock) List(namespace string, selector labels.Selector) ([]*v1.Secret, error) { + if mock.ListFunc == nil { + panic("SecretListerMock.ListFunc: method is nil but SecretLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockSecretListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockSecretListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedSecretLister.ListCalls()) +func (mock *SecretListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockSecretListerMockList.RLock() + calls = mock.calls.List + lockSecretListerMockList.RUnlock() + return calls +} + +var ( + lockSecretControllerMockAddClusterScopedHandler sync.RWMutex + lockSecretControllerMockAddHandler sync.RWMutex + lockSecretControllerMockEnqueue sync.RWMutex + lockSecretControllerMockGeneric sync.RWMutex + lockSecretControllerMockInformer sync.RWMutex + lockSecretControllerMockLister sync.RWMutex + lockSecretControllerMockStart sync.RWMutex + lockSecretControllerMockSync sync.RWMutex +) + +// Ensure, that SecretControllerMock does implement SecretController. +// If this is not the case, regenerate this file with moq. +var _ v1a.SecretController = &SecretControllerMock{} + +// SecretControllerMock is a mock implementation of SecretController. +// +// func TestSomethingThatUsesSecretController(t *testing.T) { +// +// // make and configure a mocked SecretController +// mockedSecretController := &SecretControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v1a.SecretHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v1a.SecretHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v1a.SecretLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedSecretController in code that requires SecretController +// // and then make assertions. +// +// } +type SecretControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v1a.SecretHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v1a.SecretHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v1a.SecretLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v1a.SecretHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v1a.SecretHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *SecretControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v1a.SecretHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("SecretControllerMock.AddClusterScopedHandlerFunc: method is nil but SecretController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.SecretHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockSecretControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockSecretControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedSecretController.AddClusterScopedHandlerCalls()) +func (mock *SecretControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.SecretHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.SecretHandlerFunc + } + lockSecretControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockSecretControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *SecretControllerMock) AddHandler(ctx context.Context, name string, handler v1a.SecretHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("SecretControllerMock.AddHandlerFunc: method is nil but SecretController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v1a.SecretHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockSecretControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockSecretControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedSecretController.AddHandlerCalls()) +func (mock *SecretControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v1a.SecretHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v1a.SecretHandlerFunc + } + lockSecretControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockSecretControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *SecretControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("SecretControllerMock.EnqueueFunc: method is nil but SecretController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockSecretControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockSecretControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedSecretController.EnqueueCalls()) +func (mock *SecretControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockSecretControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockSecretControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *SecretControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("SecretControllerMock.GenericFunc: method is nil but SecretController.Generic was just called") + } + callInfo := struct { + }{} + lockSecretControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockSecretControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedSecretController.GenericCalls()) +func (mock *SecretControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockSecretControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockSecretControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *SecretControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("SecretControllerMock.InformerFunc: method is nil but SecretController.Informer was just called") + } + callInfo := struct { + }{} + lockSecretControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockSecretControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedSecretController.InformerCalls()) +func (mock *SecretControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockSecretControllerMockInformer.RLock() + calls = mock.calls.Informer + lockSecretControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *SecretControllerMock) Lister() v1a.SecretLister { + if mock.ListerFunc == nil { + panic("SecretControllerMock.ListerFunc: method is nil but SecretController.Lister was just called") + } + callInfo := struct { + }{} + lockSecretControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockSecretControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedSecretController.ListerCalls()) +func (mock *SecretControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockSecretControllerMockLister.RLock() + calls = mock.calls.Lister + lockSecretControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *SecretControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("SecretControllerMock.StartFunc: method is nil but SecretController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockSecretControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockSecretControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedSecretController.StartCalls()) +func (mock *SecretControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockSecretControllerMockStart.RLock() + calls = mock.calls.Start + lockSecretControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *SecretControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("SecretControllerMock.SyncFunc: method is nil but SecretController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockSecretControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockSecretControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedSecretController.SyncCalls()) +func (mock *SecretControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockSecretControllerMockSync.RLock() + calls = mock.calls.Sync + lockSecretControllerMockSync.RUnlock() + return calls +} + +var ( + lockSecretInterfaceMockAddClusterScopedHandler sync.RWMutex + lockSecretInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockSecretInterfaceMockAddHandler sync.RWMutex + lockSecretInterfaceMockAddLifecycle sync.RWMutex + lockSecretInterfaceMockController sync.RWMutex + lockSecretInterfaceMockCreate sync.RWMutex + lockSecretInterfaceMockDelete sync.RWMutex + lockSecretInterfaceMockDeleteCollection sync.RWMutex + lockSecretInterfaceMockDeleteNamespaced sync.RWMutex + lockSecretInterfaceMockGet sync.RWMutex + lockSecretInterfaceMockGetNamespaced sync.RWMutex + lockSecretInterfaceMockList sync.RWMutex + lockSecretInterfaceMockObjectClient sync.RWMutex + lockSecretInterfaceMockUpdate sync.RWMutex + lockSecretInterfaceMockWatch sync.RWMutex +) + +// Ensure, that SecretInterfaceMock does implement SecretInterface. +// If this is not the case, regenerate this file with moq. +var _ v1a.SecretInterface = &SecretInterfaceMock{} + +// SecretInterfaceMock is a mock implementation of SecretInterface. +// +// func TestSomethingThatUsesSecretInterface(t *testing.T) { +// +// // make and configure a mocked SecretInterface +// mockedSecretInterface := &SecretInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v1a.SecretHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v1a.SecretLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v1a.SecretHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v1a.SecretLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v1a.SecretController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v1.Secret) (*v1.Secret, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1b.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1b.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1b.GetOptions) (*v1.Secret, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.Secret, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1b.ListOptions) (*v1a.SecretList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v1.Secret) (*v1.Secret, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1b.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedSecretInterface in code that requires SecretInterface +// // and then make assertions. +// +// } +type SecretInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v1a.SecretHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v1a.SecretLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v1a.SecretHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v1a.SecretLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v1a.SecretController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v1.Secret) (*v1.Secret, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1b.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1b.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1b.GetOptions) (*v1.Secret, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.Secret, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1b.ListOptions) (*v1a.SecretList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v1.Secret) (*v1.Secret, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1b.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v1a.SecretHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v1a.SecretLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v1a.SecretHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v1a.SecretLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v1.Secret + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1b.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1b.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1b.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1b.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1b.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1b.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1b.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v1.Secret + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1b.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *SecretInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v1a.SecretHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("SecretInterfaceMock.AddClusterScopedHandlerFunc: method is nil but SecretInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.SecretHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockSecretInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockSecretInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedSecretInterface.AddClusterScopedHandlerCalls()) +func (mock *SecretInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.SecretHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.SecretHandlerFunc + } + lockSecretInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockSecretInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *SecretInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v1a.SecretLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("SecretInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but SecretInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.SecretLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockSecretInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockSecretInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedSecretInterface.AddClusterScopedLifecycleCalls()) +func (mock *SecretInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.SecretLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.SecretLifecycle + } + lockSecretInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockSecretInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *SecretInterfaceMock) AddHandler(ctx context.Context, name string, sync v1a.SecretHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("SecretInterfaceMock.AddHandlerFunc: method is nil but SecretInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v1a.SecretHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockSecretInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockSecretInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedSecretInterface.AddHandlerCalls()) +func (mock *SecretInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v1a.SecretHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v1a.SecretHandlerFunc + } + lockSecretInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockSecretInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *SecretInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v1a.SecretLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("SecretInterfaceMock.AddLifecycleFunc: method is nil but SecretInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v1a.SecretLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockSecretInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockSecretInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedSecretInterface.AddLifecycleCalls()) +func (mock *SecretInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v1a.SecretLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v1a.SecretLifecycle + } + lockSecretInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockSecretInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *SecretInterfaceMock) Controller() v1a.SecretController { + if mock.ControllerFunc == nil { + panic("SecretInterfaceMock.ControllerFunc: method is nil but SecretInterface.Controller was just called") + } + callInfo := struct { + }{} + lockSecretInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockSecretInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedSecretInterface.ControllerCalls()) +func (mock *SecretInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockSecretInterfaceMockController.RLock() + calls = mock.calls.Controller + lockSecretInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *SecretInterfaceMock) Create(in1 *v1.Secret) (*v1.Secret, error) { + if mock.CreateFunc == nil { + panic("SecretInterfaceMock.CreateFunc: method is nil but SecretInterface.Create was just called") + } + callInfo := struct { + In1 *v1.Secret + }{ + In1: in1, + } + lockSecretInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockSecretInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedSecretInterface.CreateCalls()) +func (mock *SecretInterfaceMock) CreateCalls() []struct { + In1 *v1.Secret +} { + var calls []struct { + In1 *v1.Secret + } + lockSecretInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockSecretInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *SecretInterfaceMock) Delete(name string, options *v1b.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("SecretInterfaceMock.DeleteFunc: method is nil but SecretInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1b.DeleteOptions + }{ + Name: name, + Options: options, + } + lockSecretInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockSecretInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedSecretInterface.DeleteCalls()) +func (mock *SecretInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1b.DeleteOptions +} { + var calls []struct { + Name string + Options *v1b.DeleteOptions + } + lockSecretInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockSecretInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *SecretInterfaceMock) DeleteCollection(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("SecretInterfaceMock.DeleteCollectionFunc: method is nil but SecretInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockSecretInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockSecretInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedSecretInterface.DeleteCollectionCalls()) +func (mock *SecretInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions +} { + var calls []struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions + } + lockSecretInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockSecretInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *SecretInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1b.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("SecretInterfaceMock.DeleteNamespacedFunc: method is nil but SecretInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1b.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockSecretInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockSecretInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedSecretInterface.DeleteNamespacedCalls()) +func (mock *SecretInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1b.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1b.DeleteOptions + } + lockSecretInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockSecretInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *SecretInterfaceMock) Get(name string, opts v1b.GetOptions) (*v1.Secret, error) { + if mock.GetFunc == nil { + panic("SecretInterfaceMock.GetFunc: method is nil but SecretInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1b.GetOptions + }{ + Name: name, + Opts: opts, + } + lockSecretInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockSecretInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedSecretInterface.GetCalls()) +func (mock *SecretInterfaceMock) GetCalls() []struct { + Name string + Opts v1b.GetOptions +} { + var calls []struct { + Name string + Opts v1b.GetOptions + } + lockSecretInterfaceMockGet.RLock() + calls = mock.calls.Get + lockSecretInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *SecretInterfaceMock) GetNamespaced(namespace string, name string, opts v1b.GetOptions) (*v1.Secret, error) { + if mock.GetNamespacedFunc == nil { + panic("SecretInterfaceMock.GetNamespacedFunc: method is nil but SecretInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1b.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockSecretInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockSecretInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedSecretInterface.GetNamespacedCalls()) +func (mock *SecretInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1b.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1b.GetOptions + } + lockSecretInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockSecretInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *SecretInterfaceMock) List(opts v1b.ListOptions) (*v1a.SecretList, error) { + if mock.ListFunc == nil { + panic("SecretInterfaceMock.ListFunc: method is nil but SecretInterface.List was just called") + } + callInfo := struct { + Opts v1b.ListOptions + }{ + Opts: opts, + } + lockSecretInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockSecretInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedSecretInterface.ListCalls()) +func (mock *SecretInterfaceMock) ListCalls() []struct { + Opts v1b.ListOptions +} { + var calls []struct { + Opts v1b.ListOptions + } + lockSecretInterfaceMockList.RLock() + calls = mock.calls.List + lockSecretInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *SecretInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("SecretInterfaceMock.ObjectClientFunc: method is nil but SecretInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockSecretInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockSecretInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedSecretInterface.ObjectClientCalls()) +func (mock *SecretInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockSecretInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockSecretInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *SecretInterfaceMock) Update(in1 *v1.Secret) (*v1.Secret, error) { + if mock.UpdateFunc == nil { + panic("SecretInterfaceMock.UpdateFunc: method is nil but SecretInterface.Update was just called") + } + callInfo := struct { + In1 *v1.Secret + }{ + In1: in1, + } + lockSecretInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockSecretInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedSecretInterface.UpdateCalls()) +func (mock *SecretInterfaceMock) UpdateCalls() []struct { + In1 *v1.Secret +} { + var calls []struct { + In1 *v1.Secret + } + lockSecretInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockSecretInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *SecretInterfaceMock) Watch(opts v1b.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("SecretInterfaceMock.WatchFunc: method is nil but SecretInterface.Watch was just called") + } + callInfo := struct { + Opts v1b.ListOptions + }{ + Opts: opts, + } + lockSecretInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockSecretInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedSecretInterface.WatchCalls()) +func (mock *SecretInterfaceMock) WatchCalls() []struct { + Opts v1b.ListOptions +} { + var calls []struct { + Opts v1b.ListOptions + } + lockSecretInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockSecretInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockSecretsGetterMockSecrets sync.RWMutex +) + +// Ensure, that SecretsGetterMock does implement SecretsGetter. +// If this is not the case, regenerate this file with moq. +var _ v1a.SecretsGetter = &SecretsGetterMock{} + +// SecretsGetterMock is a mock implementation of SecretsGetter. +// +// func TestSomethingThatUsesSecretsGetter(t *testing.T) { +// +// // make and configure a mocked SecretsGetter +// mockedSecretsGetter := &SecretsGetterMock{ +// SecretsFunc: func(namespace string) v1a.SecretInterface { +// panic("mock out the Secrets method") +// }, +// } +// +// // use mockedSecretsGetter in code that requires SecretsGetter +// // and then make assertions. +// +// } +type SecretsGetterMock struct { + // SecretsFunc mocks the Secrets method. + SecretsFunc func(namespace string) v1a.SecretInterface + + // calls tracks calls to the methods. + calls struct { + // Secrets holds details about calls to the Secrets method. + Secrets []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// Secrets calls SecretsFunc. +func (mock *SecretsGetterMock) Secrets(namespace string) v1a.SecretInterface { + if mock.SecretsFunc == nil { + panic("SecretsGetterMock.SecretsFunc: method is nil but SecretsGetter.Secrets was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockSecretsGetterMockSecrets.Lock() + mock.calls.Secrets = append(mock.calls.Secrets, callInfo) + lockSecretsGetterMockSecrets.Unlock() + return mock.SecretsFunc(namespace) +} + +// SecretsCalls gets all the calls that were made to Secrets. +// Check the length with: +// len(mockedSecretsGetter.SecretsCalls()) +func (mock *SecretsGetterMock) SecretsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockSecretsGetterMockSecrets.RLock() + calls = mock.calls.Secrets + lockSecretsGetterMockSecrets.RUnlock() + return calls +} diff --git a/apis/core/v1/fakes/zz_generated_service_account_mock_test.go b/apis/core/v1/fakes/zz_generated_service_account_mock_test.go new file mode 100644 index 00000000..a734d47e --- /dev/null +++ b/apis/core/v1/fakes/zz_generated_service_account_mock_test.go @@ -0,0 +1,1357 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v1a "github.com/rancher/types/apis/core/v1" + v1 "k8s.io/api/core/v1" + v1b "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockServiceAccountListerMockGet sync.RWMutex + lockServiceAccountListerMockList sync.RWMutex +) + +// Ensure, that ServiceAccountListerMock does implement ServiceAccountLister. +// If this is not the case, regenerate this file with moq. +var _ v1a.ServiceAccountLister = &ServiceAccountListerMock{} + +// ServiceAccountListerMock is a mock implementation of ServiceAccountLister. +// +// func TestSomethingThatUsesServiceAccountLister(t *testing.T) { +// +// // make and configure a mocked ServiceAccountLister +// mockedServiceAccountLister := &ServiceAccountListerMock{ +// GetFunc: func(namespace string, name string) (*v1.ServiceAccount, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v1.ServiceAccount, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedServiceAccountLister in code that requires ServiceAccountLister +// // and then make assertions. +// +// } +type ServiceAccountListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v1.ServiceAccount, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v1.ServiceAccount, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *ServiceAccountListerMock) Get(namespace string, name string) (*v1.ServiceAccount, error) { + if mock.GetFunc == nil { + panic("ServiceAccountListerMock.GetFunc: method is nil but ServiceAccountLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockServiceAccountListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockServiceAccountListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedServiceAccountLister.GetCalls()) +func (mock *ServiceAccountListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockServiceAccountListerMockGet.RLock() + calls = mock.calls.Get + lockServiceAccountListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ServiceAccountListerMock) List(namespace string, selector labels.Selector) ([]*v1.ServiceAccount, error) { + if mock.ListFunc == nil { + panic("ServiceAccountListerMock.ListFunc: method is nil but ServiceAccountLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockServiceAccountListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockServiceAccountListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedServiceAccountLister.ListCalls()) +func (mock *ServiceAccountListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockServiceAccountListerMockList.RLock() + calls = mock.calls.List + lockServiceAccountListerMockList.RUnlock() + return calls +} + +var ( + lockServiceAccountControllerMockAddClusterScopedHandler sync.RWMutex + lockServiceAccountControllerMockAddHandler sync.RWMutex + lockServiceAccountControllerMockEnqueue sync.RWMutex + lockServiceAccountControllerMockGeneric sync.RWMutex + lockServiceAccountControllerMockInformer sync.RWMutex + lockServiceAccountControllerMockLister sync.RWMutex + lockServiceAccountControllerMockStart sync.RWMutex + lockServiceAccountControllerMockSync sync.RWMutex +) + +// Ensure, that ServiceAccountControllerMock does implement ServiceAccountController. +// If this is not the case, regenerate this file with moq. +var _ v1a.ServiceAccountController = &ServiceAccountControllerMock{} + +// ServiceAccountControllerMock is a mock implementation of ServiceAccountController. +// +// func TestSomethingThatUsesServiceAccountController(t *testing.T) { +// +// // make and configure a mocked ServiceAccountController +// mockedServiceAccountController := &ServiceAccountControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v1a.ServiceAccountHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v1a.ServiceAccountHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v1a.ServiceAccountLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedServiceAccountController in code that requires ServiceAccountController +// // and then make assertions. +// +// } +type ServiceAccountControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v1a.ServiceAccountHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v1a.ServiceAccountHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v1a.ServiceAccountLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v1a.ServiceAccountHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v1a.ServiceAccountHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ServiceAccountControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v1a.ServiceAccountHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ServiceAccountControllerMock.AddClusterScopedHandlerFunc: method is nil but ServiceAccountController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.ServiceAccountHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockServiceAccountControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockServiceAccountControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedServiceAccountController.AddClusterScopedHandlerCalls()) +func (mock *ServiceAccountControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.ServiceAccountHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.ServiceAccountHandlerFunc + } + lockServiceAccountControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockServiceAccountControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ServiceAccountControllerMock) AddHandler(ctx context.Context, name string, handler v1a.ServiceAccountHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ServiceAccountControllerMock.AddHandlerFunc: method is nil but ServiceAccountController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v1a.ServiceAccountHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockServiceAccountControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockServiceAccountControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedServiceAccountController.AddHandlerCalls()) +func (mock *ServiceAccountControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v1a.ServiceAccountHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v1a.ServiceAccountHandlerFunc + } + lockServiceAccountControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockServiceAccountControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *ServiceAccountControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("ServiceAccountControllerMock.EnqueueFunc: method is nil but ServiceAccountController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockServiceAccountControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockServiceAccountControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedServiceAccountController.EnqueueCalls()) +func (mock *ServiceAccountControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockServiceAccountControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockServiceAccountControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *ServiceAccountControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("ServiceAccountControllerMock.GenericFunc: method is nil but ServiceAccountController.Generic was just called") + } + callInfo := struct { + }{} + lockServiceAccountControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockServiceAccountControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedServiceAccountController.GenericCalls()) +func (mock *ServiceAccountControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockServiceAccountControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockServiceAccountControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *ServiceAccountControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("ServiceAccountControllerMock.InformerFunc: method is nil but ServiceAccountController.Informer was just called") + } + callInfo := struct { + }{} + lockServiceAccountControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockServiceAccountControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedServiceAccountController.InformerCalls()) +func (mock *ServiceAccountControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockServiceAccountControllerMockInformer.RLock() + calls = mock.calls.Informer + lockServiceAccountControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *ServiceAccountControllerMock) Lister() v1a.ServiceAccountLister { + if mock.ListerFunc == nil { + panic("ServiceAccountControllerMock.ListerFunc: method is nil but ServiceAccountController.Lister was just called") + } + callInfo := struct { + }{} + lockServiceAccountControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockServiceAccountControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedServiceAccountController.ListerCalls()) +func (mock *ServiceAccountControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockServiceAccountControllerMockLister.RLock() + calls = mock.calls.Lister + lockServiceAccountControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *ServiceAccountControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("ServiceAccountControllerMock.StartFunc: method is nil but ServiceAccountController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockServiceAccountControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockServiceAccountControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedServiceAccountController.StartCalls()) +func (mock *ServiceAccountControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockServiceAccountControllerMockStart.RLock() + calls = mock.calls.Start + lockServiceAccountControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *ServiceAccountControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("ServiceAccountControllerMock.SyncFunc: method is nil but ServiceAccountController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockServiceAccountControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockServiceAccountControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedServiceAccountController.SyncCalls()) +func (mock *ServiceAccountControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockServiceAccountControllerMockSync.RLock() + calls = mock.calls.Sync + lockServiceAccountControllerMockSync.RUnlock() + return calls +} + +var ( + lockServiceAccountInterfaceMockAddClusterScopedHandler sync.RWMutex + lockServiceAccountInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockServiceAccountInterfaceMockAddHandler sync.RWMutex + lockServiceAccountInterfaceMockAddLifecycle sync.RWMutex + lockServiceAccountInterfaceMockController sync.RWMutex + lockServiceAccountInterfaceMockCreate sync.RWMutex + lockServiceAccountInterfaceMockDelete sync.RWMutex + lockServiceAccountInterfaceMockDeleteCollection sync.RWMutex + lockServiceAccountInterfaceMockDeleteNamespaced sync.RWMutex + lockServiceAccountInterfaceMockGet sync.RWMutex + lockServiceAccountInterfaceMockGetNamespaced sync.RWMutex + lockServiceAccountInterfaceMockList sync.RWMutex + lockServiceAccountInterfaceMockObjectClient sync.RWMutex + lockServiceAccountInterfaceMockUpdate sync.RWMutex + lockServiceAccountInterfaceMockWatch sync.RWMutex +) + +// Ensure, that ServiceAccountInterfaceMock does implement ServiceAccountInterface. +// If this is not the case, regenerate this file with moq. +var _ v1a.ServiceAccountInterface = &ServiceAccountInterfaceMock{} + +// ServiceAccountInterfaceMock is a mock implementation of ServiceAccountInterface. +// +// func TestSomethingThatUsesServiceAccountInterface(t *testing.T) { +// +// // make and configure a mocked ServiceAccountInterface +// mockedServiceAccountInterface := &ServiceAccountInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v1a.ServiceAccountHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v1a.ServiceAccountLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v1a.ServiceAccountHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v1a.ServiceAccountLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v1a.ServiceAccountController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v1.ServiceAccount) (*v1.ServiceAccount, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1b.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1b.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1b.GetOptions) (*v1.ServiceAccount, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.ServiceAccount, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1b.ListOptions) (*v1a.ServiceAccountList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v1.ServiceAccount) (*v1.ServiceAccount, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1b.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedServiceAccountInterface in code that requires ServiceAccountInterface +// // and then make assertions. +// +// } +type ServiceAccountInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v1a.ServiceAccountHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v1a.ServiceAccountLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v1a.ServiceAccountHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v1a.ServiceAccountLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v1a.ServiceAccountController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v1.ServiceAccount) (*v1.ServiceAccount, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1b.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1b.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1b.GetOptions) (*v1.ServiceAccount, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.ServiceAccount, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1b.ListOptions) (*v1a.ServiceAccountList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v1.ServiceAccount) (*v1.ServiceAccount, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1b.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v1a.ServiceAccountHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v1a.ServiceAccountLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v1a.ServiceAccountHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v1a.ServiceAccountLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v1.ServiceAccount + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1b.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1b.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1b.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1b.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1b.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1b.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1b.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v1.ServiceAccount + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1b.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ServiceAccountInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v1a.ServiceAccountHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ServiceAccountInterfaceMock.AddClusterScopedHandlerFunc: method is nil but ServiceAccountInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.ServiceAccountHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockServiceAccountInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockServiceAccountInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedServiceAccountInterface.AddClusterScopedHandlerCalls()) +func (mock *ServiceAccountInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.ServiceAccountHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.ServiceAccountHandlerFunc + } + lockServiceAccountInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockServiceAccountInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *ServiceAccountInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v1a.ServiceAccountLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("ServiceAccountInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but ServiceAccountInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.ServiceAccountLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockServiceAccountInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockServiceAccountInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedServiceAccountInterface.AddClusterScopedLifecycleCalls()) +func (mock *ServiceAccountInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.ServiceAccountLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.ServiceAccountLifecycle + } + lockServiceAccountInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockServiceAccountInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ServiceAccountInterfaceMock) AddHandler(ctx context.Context, name string, sync v1a.ServiceAccountHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ServiceAccountInterfaceMock.AddHandlerFunc: method is nil but ServiceAccountInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v1a.ServiceAccountHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockServiceAccountInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockServiceAccountInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedServiceAccountInterface.AddHandlerCalls()) +func (mock *ServiceAccountInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v1a.ServiceAccountHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v1a.ServiceAccountHandlerFunc + } + lockServiceAccountInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockServiceAccountInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *ServiceAccountInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v1a.ServiceAccountLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("ServiceAccountInterfaceMock.AddLifecycleFunc: method is nil but ServiceAccountInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v1a.ServiceAccountLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockServiceAccountInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockServiceAccountInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedServiceAccountInterface.AddLifecycleCalls()) +func (mock *ServiceAccountInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v1a.ServiceAccountLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v1a.ServiceAccountLifecycle + } + lockServiceAccountInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockServiceAccountInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *ServiceAccountInterfaceMock) Controller() v1a.ServiceAccountController { + if mock.ControllerFunc == nil { + panic("ServiceAccountInterfaceMock.ControllerFunc: method is nil but ServiceAccountInterface.Controller was just called") + } + callInfo := struct { + }{} + lockServiceAccountInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockServiceAccountInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedServiceAccountInterface.ControllerCalls()) +func (mock *ServiceAccountInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockServiceAccountInterfaceMockController.RLock() + calls = mock.calls.Controller + lockServiceAccountInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *ServiceAccountInterfaceMock) Create(in1 *v1.ServiceAccount) (*v1.ServiceAccount, error) { + if mock.CreateFunc == nil { + panic("ServiceAccountInterfaceMock.CreateFunc: method is nil but ServiceAccountInterface.Create was just called") + } + callInfo := struct { + In1 *v1.ServiceAccount + }{ + In1: in1, + } + lockServiceAccountInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockServiceAccountInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedServiceAccountInterface.CreateCalls()) +func (mock *ServiceAccountInterfaceMock) CreateCalls() []struct { + In1 *v1.ServiceAccount +} { + var calls []struct { + In1 *v1.ServiceAccount + } + lockServiceAccountInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockServiceAccountInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *ServiceAccountInterfaceMock) Delete(name string, options *v1b.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("ServiceAccountInterfaceMock.DeleteFunc: method is nil but ServiceAccountInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1b.DeleteOptions + }{ + Name: name, + Options: options, + } + lockServiceAccountInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockServiceAccountInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedServiceAccountInterface.DeleteCalls()) +func (mock *ServiceAccountInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1b.DeleteOptions +} { + var calls []struct { + Name string + Options *v1b.DeleteOptions + } + lockServiceAccountInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockServiceAccountInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *ServiceAccountInterfaceMock) DeleteCollection(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("ServiceAccountInterfaceMock.DeleteCollectionFunc: method is nil but ServiceAccountInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockServiceAccountInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockServiceAccountInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedServiceAccountInterface.DeleteCollectionCalls()) +func (mock *ServiceAccountInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions +} { + var calls []struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions + } + lockServiceAccountInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockServiceAccountInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *ServiceAccountInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1b.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("ServiceAccountInterfaceMock.DeleteNamespacedFunc: method is nil but ServiceAccountInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1b.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockServiceAccountInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockServiceAccountInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedServiceAccountInterface.DeleteNamespacedCalls()) +func (mock *ServiceAccountInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1b.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1b.DeleteOptions + } + lockServiceAccountInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockServiceAccountInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *ServiceAccountInterfaceMock) Get(name string, opts v1b.GetOptions) (*v1.ServiceAccount, error) { + if mock.GetFunc == nil { + panic("ServiceAccountInterfaceMock.GetFunc: method is nil but ServiceAccountInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1b.GetOptions + }{ + Name: name, + Opts: opts, + } + lockServiceAccountInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockServiceAccountInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedServiceAccountInterface.GetCalls()) +func (mock *ServiceAccountInterfaceMock) GetCalls() []struct { + Name string + Opts v1b.GetOptions +} { + var calls []struct { + Name string + Opts v1b.GetOptions + } + lockServiceAccountInterfaceMockGet.RLock() + calls = mock.calls.Get + lockServiceAccountInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *ServiceAccountInterfaceMock) GetNamespaced(namespace string, name string, opts v1b.GetOptions) (*v1.ServiceAccount, error) { + if mock.GetNamespacedFunc == nil { + panic("ServiceAccountInterfaceMock.GetNamespacedFunc: method is nil but ServiceAccountInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1b.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockServiceAccountInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockServiceAccountInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedServiceAccountInterface.GetNamespacedCalls()) +func (mock *ServiceAccountInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1b.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1b.GetOptions + } + lockServiceAccountInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockServiceAccountInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ServiceAccountInterfaceMock) List(opts v1b.ListOptions) (*v1a.ServiceAccountList, error) { + if mock.ListFunc == nil { + panic("ServiceAccountInterfaceMock.ListFunc: method is nil but ServiceAccountInterface.List was just called") + } + callInfo := struct { + Opts v1b.ListOptions + }{ + Opts: opts, + } + lockServiceAccountInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockServiceAccountInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedServiceAccountInterface.ListCalls()) +func (mock *ServiceAccountInterfaceMock) ListCalls() []struct { + Opts v1b.ListOptions +} { + var calls []struct { + Opts v1b.ListOptions + } + lockServiceAccountInterfaceMockList.RLock() + calls = mock.calls.List + lockServiceAccountInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *ServiceAccountInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("ServiceAccountInterfaceMock.ObjectClientFunc: method is nil but ServiceAccountInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockServiceAccountInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockServiceAccountInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedServiceAccountInterface.ObjectClientCalls()) +func (mock *ServiceAccountInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockServiceAccountInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockServiceAccountInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *ServiceAccountInterfaceMock) Update(in1 *v1.ServiceAccount) (*v1.ServiceAccount, error) { + if mock.UpdateFunc == nil { + panic("ServiceAccountInterfaceMock.UpdateFunc: method is nil but ServiceAccountInterface.Update was just called") + } + callInfo := struct { + In1 *v1.ServiceAccount + }{ + In1: in1, + } + lockServiceAccountInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockServiceAccountInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedServiceAccountInterface.UpdateCalls()) +func (mock *ServiceAccountInterfaceMock) UpdateCalls() []struct { + In1 *v1.ServiceAccount +} { + var calls []struct { + In1 *v1.ServiceAccount + } + lockServiceAccountInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockServiceAccountInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *ServiceAccountInterfaceMock) Watch(opts v1b.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("ServiceAccountInterfaceMock.WatchFunc: method is nil but ServiceAccountInterface.Watch was just called") + } + callInfo := struct { + Opts v1b.ListOptions + }{ + Opts: opts, + } + lockServiceAccountInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockServiceAccountInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedServiceAccountInterface.WatchCalls()) +func (mock *ServiceAccountInterfaceMock) WatchCalls() []struct { + Opts v1b.ListOptions +} { + var calls []struct { + Opts v1b.ListOptions + } + lockServiceAccountInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockServiceAccountInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockServiceAccountsGetterMockServiceAccounts sync.RWMutex +) + +// Ensure, that ServiceAccountsGetterMock does implement ServiceAccountsGetter. +// If this is not the case, regenerate this file with moq. +var _ v1a.ServiceAccountsGetter = &ServiceAccountsGetterMock{} + +// ServiceAccountsGetterMock is a mock implementation of ServiceAccountsGetter. +// +// func TestSomethingThatUsesServiceAccountsGetter(t *testing.T) { +// +// // make and configure a mocked ServiceAccountsGetter +// mockedServiceAccountsGetter := &ServiceAccountsGetterMock{ +// ServiceAccountsFunc: func(namespace string) v1a.ServiceAccountInterface { +// panic("mock out the ServiceAccounts method") +// }, +// } +// +// // use mockedServiceAccountsGetter in code that requires ServiceAccountsGetter +// // and then make assertions. +// +// } +type ServiceAccountsGetterMock struct { + // ServiceAccountsFunc mocks the ServiceAccounts method. + ServiceAccountsFunc func(namespace string) v1a.ServiceAccountInterface + + // calls tracks calls to the methods. + calls struct { + // ServiceAccounts holds details about calls to the ServiceAccounts method. + ServiceAccounts []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// ServiceAccounts calls ServiceAccountsFunc. +func (mock *ServiceAccountsGetterMock) ServiceAccounts(namespace string) v1a.ServiceAccountInterface { + if mock.ServiceAccountsFunc == nil { + panic("ServiceAccountsGetterMock.ServiceAccountsFunc: method is nil but ServiceAccountsGetter.ServiceAccounts was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockServiceAccountsGetterMockServiceAccounts.Lock() + mock.calls.ServiceAccounts = append(mock.calls.ServiceAccounts, callInfo) + lockServiceAccountsGetterMockServiceAccounts.Unlock() + return mock.ServiceAccountsFunc(namespace) +} + +// ServiceAccountsCalls gets all the calls that were made to ServiceAccounts. +// Check the length with: +// len(mockedServiceAccountsGetter.ServiceAccountsCalls()) +func (mock *ServiceAccountsGetterMock) ServiceAccountsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockServiceAccountsGetterMockServiceAccounts.RLock() + calls = mock.calls.ServiceAccounts + lockServiceAccountsGetterMockServiceAccounts.RUnlock() + return calls +} diff --git a/apis/core/v1/fakes/zz_generated_service_mock_test.go b/apis/core/v1/fakes/zz_generated_service_mock_test.go new file mode 100644 index 00000000..6e9ddcb0 --- /dev/null +++ b/apis/core/v1/fakes/zz_generated_service_mock_test.go @@ -0,0 +1,1357 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v1a "github.com/rancher/types/apis/core/v1" + v1 "k8s.io/api/core/v1" + v1b "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockServiceListerMockGet sync.RWMutex + lockServiceListerMockList sync.RWMutex +) + +// Ensure, that ServiceListerMock does implement ServiceLister. +// If this is not the case, regenerate this file with moq. +var _ v1a.ServiceLister = &ServiceListerMock{} + +// ServiceListerMock is a mock implementation of ServiceLister. +// +// func TestSomethingThatUsesServiceLister(t *testing.T) { +// +// // make and configure a mocked ServiceLister +// mockedServiceLister := &ServiceListerMock{ +// GetFunc: func(namespace string, name string) (*v1.Service, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v1.Service, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedServiceLister in code that requires ServiceLister +// // and then make assertions. +// +// } +type ServiceListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v1.Service, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v1.Service, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *ServiceListerMock) Get(namespace string, name string) (*v1.Service, error) { + if mock.GetFunc == nil { + panic("ServiceListerMock.GetFunc: method is nil but ServiceLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockServiceListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockServiceListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedServiceLister.GetCalls()) +func (mock *ServiceListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockServiceListerMockGet.RLock() + calls = mock.calls.Get + lockServiceListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ServiceListerMock) List(namespace string, selector labels.Selector) ([]*v1.Service, error) { + if mock.ListFunc == nil { + panic("ServiceListerMock.ListFunc: method is nil but ServiceLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockServiceListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockServiceListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedServiceLister.ListCalls()) +func (mock *ServiceListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockServiceListerMockList.RLock() + calls = mock.calls.List + lockServiceListerMockList.RUnlock() + return calls +} + +var ( + lockServiceControllerMockAddClusterScopedHandler sync.RWMutex + lockServiceControllerMockAddHandler sync.RWMutex + lockServiceControllerMockEnqueue sync.RWMutex + lockServiceControllerMockGeneric sync.RWMutex + lockServiceControllerMockInformer sync.RWMutex + lockServiceControllerMockLister sync.RWMutex + lockServiceControllerMockStart sync.RWMutex + lockServiceControllerMockSync sync.RWMutex +) + +// Ensure, that ServiceControllerMock does implement ServiceController. +// If this is not the case, regenerate this file with moq. +var _ v1a.ServiceController = &ServiceControllerMock{} + +// ServiceControllerMock is a mock implementation of ServiceController. +// +// func TestSomethingThatUsesServiceController(t *testing.T) { +// +// // make and configure a mocked ServiceController +// mockedServiceController := &ServiceControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v1a.ServiceHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v1a.ServiceHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v1a.ServiceLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedServiceController in code that requires ServiceController +// // and then make assertions. +// +// } +type ServiceControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v1a.ServiceHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v1a.ServiceHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v1a.ServiceLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v1a.ServiceHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v1a.ServiceHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ServiceControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v1a.ServiceHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ServiceControllerMock.AddClusterScopedHandlerFunc: method is nil but ServiceController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.ServiceHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockServiceControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockServiceControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedServiceController.AddClusterScopedHandlerCalls()) +func (mock *ServiceControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.ServiceHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.ServiceHandlerFunc + } + lockServiceControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockServiceControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ServiceControllerMock) AddHandler(ctx context.Context, name string, handler v1a.ServiceHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ServiceControllerMock.AddHandlerFunc: method is nil but ServiceController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v1a.ServiceHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockServiceControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockServiceControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedServiceController.AddHandlerCalls()) +func (mock *ServiceControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v1a.ServiceHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v1a.ServiceHandlerFunc + } + lockServiceControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockServiceControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *ServiceControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("ServiceControllerMock.EnqueueFunc: method is nil but ServiceController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockServiceControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockServiceControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedServiceController.EnqueueCalls()) +func (mock *ServiceControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockServiceControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockServiceControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *ServiceControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("ServiceControllerMock.GenericFunc: method is nil but ServiceController.Generic was just called") + } + callInfo := struct { + }{} + lockServiceControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockServiceControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedServiceController.GenericCalls()) +func (mock *ServiceControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockServiceControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockServiceControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *ServiceControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("ServiceControllerMock.InformerFunc: method is nil but ServiceController.Informer was just called") + } + callInfo := struct { + }{} + lockServiceControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockServiceControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedServiceController.InformerCalls()) +func (mock *ServiceControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockServiceControllerMockInformer.RLock() + calls = mock.calls.Informer + lockServiceControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *ServiceControllerMock) Lister() v1a.ServiceLister { + if mock.ListerFunc == nil { + panic("ServiceControllerMock.ListerFunc: method is nil but ServiceController.Lister was just called") + } + callInfo := struct { + }{} + lockServiceControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockServiceControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedServiceController.ListerCalls()) +func (mock *ServiceControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockServiceControllerMockLister.RLock() + calls = mock.calls.Lister + lockServiceControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *ServiceControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("ServiceControllerMock.StartFunc: method is nil but ServiceController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockServiceControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockServiceControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedServiceController.StartCalls()) +func (mock *ServiceControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockServiceControllerMockStart.RLock() + calls = mock.calls.Start + lockServiceControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *ServiceControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("ServiceControllerMock.SyncFunc: method is nil but ServiceController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockServiceControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockServiceControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedServiceController.SyncCalls()) +func (mock *ServiceControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockServiceControllerMockSync.RLock() + calls = mock.calls.Sync + lockServiceControllerMockSync.RUnlock() + return calls +} + +var ( + lockServiceInterfaceMockAddClusterScopedHandler sync.RWMutex + lockServiceInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockServiceInterfaceMockAddHandler sync.RWMutex + lockServiceInterfaceMockAddLifecycle sync.RWMutex + lockServiceInterfaceMockController sync.RWMutex + lockServiceInterfaceMockCreate sync.RWMutex + lockServiceInterfaceMockDelete sync.RWMutex + lockServiceInterfaceMockDeleteCollection sync.RWMutex + lockServiceInterfaceMockDeleteNamespaced sync.RWMutex + lockServiceInterfaceMockGet sync.RWMutex + lockServiceInterfaceMockGetNamespaced sync.RWMutex + lockServiceInterfaceMockList sync.RWMutex + lockServiceInterfaceMockObjectClient sync.RWMutex + lockServiceInterfaceMockUpdate sync.RWMutex + lockServiceInterfaceMockWatch sync.RWMutex +) + +// Ensure, that ServiceInterfaceMock does implement ServiceInterface. +// If this is not the case, regenerate this file with moq. +var _ v1a.ServiceInterface = &ServiceInterfaceMock{} + +// ServiceInterfaceMock is a mock implementation of ServiceInterface. +// +// func TestSomethingThatUsesServiceInterface(t *testing.T) { +// +// // make and configure a mocked ServiceInterface +// mockedServiceInterface := &ServiceInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v1a.ServiceHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v1a.ServiceLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v1a.ServiceHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v1a.ServiceLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v1a.ServiceController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v1.Service) (*v1.Service, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1b.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1b.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1b.GetOptions) (*v1.Service, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.Service, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1b.ListOptions) (*v1a.ServiceList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v1.Service) (*v1.Service, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1b.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedServiceInterface in code that requires ServiceInterface +// // and then make assertions. +// +// } +type ServiceInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v1a.ServiceHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v1a.ServiceLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v1a.ServiceHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v1a.ServiceLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v1a.ServiceController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v1.Service) (*v1.Service, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1b.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1b.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1b.GetOptions) (*v1.Service, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.Service, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1b.ListOptions) (*v1a.ServiceList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v1.Service) (*v1.Service, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1b.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v1a.ServiceHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v1a.ServiceLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v1a.ServiceHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v1a.ServiceLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v1.Service + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1b.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1b.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1b.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1b.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1b.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1b.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1b.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v1.Service + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1b.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ServiceInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v1a.ServiceHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ServiceInterfaceMock.AddClusterScopedHandlerFunc: method is nil but ServiceInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.ServiceHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockServiceInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockServiceInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedServiceInterface.AddClusterScopedHandlerCalls()) +func (mock *ServiceInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.ServiceHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.ServiceHandlerFunc + } + lockServiceInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockServiceInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *ServiceInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v1a.ServiceLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("ServiceInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but ServiceInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.ServiceLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockServiceInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockServiceInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedServiceInterface.AddClusterScopedLifecycleCalls()) +func (mock *ServiceInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.ServiceLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.ServiceLifecycle + } + lockServiceInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockServiceInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ServiceInterfaceMock) AddHandler(ctx context.Context, name string, sync v1a.ServiceHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ServiceInterfaceMock.AddHandlerFunc: method is nil but ServiceInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v1a.ServiceHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockServiceInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockServiceInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedServiceInterface.AddHandlerCalls()) +func (mock *ServiceInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v1a.ServiceHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v1a.ServiceHandlerFunc + } + lockServiceInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockServiceInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *ServiceInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v1a.ServiceLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("ServiceInterfaceMock.AddLifecycleFunc: method is nil but ServiceInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v1a.ServiceLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockServiceInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockServiceInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedServiceInterface.AddLifecycleCalls()) +func (mock *ServiceInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v1a.ServiceLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v1a.ServiceLifecycle + } + lockServiceInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockServiceInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *ServiceInterfaceMock) Controller() v1a.ServiceController { + if mock.ControllerFunc == nil { + panic("ServiceInterfaceMock.ControllerFunc: method is nil but ServiceInterface.Controller was just called") + } + callInfo := struct { + }{} + lockServiceInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockServiceInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedServiceInterface.ControllerCalls()) +func (mock *ServiceInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockServiceInterfaceMockController.RLock() + calls = mock.calls.Controller + lockServiceInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *ServiceInterfaceMock) Create(in1 *v1.Service) (*v1.Service, error) { + if mock.CreateFunc == nil { + panic("ServiceInterfaceMock.CreateFunc: method is nil but ServiceInterface.Create was just called") + } + callInfo := struct { + In1 *v1.Service + }{ + In1: in1, + } + lockServiceInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockServiceInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedServiceInterface.CreateCalls()) +func (mock *ServiceInterfaceMock) CreateCalls() []struct { + In1 *v1.Service +} { + var calls []struct { + In1 *v1.Service + } + lockServiceInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockServiceInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *ServiceInterfaceMock) Delete(name string, options *v1b.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("ServiceInterfaceMock.DeleteFunc: method is nil but ServiceInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1b.DeleteOptions + }{ + Name: name, + Options: options, + } + lockServiceInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockServiceInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedServiceInterface.DeleteCalls()) +func (mock *ServiceInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1b.DeleteOptions +} { + var calls []struct { + Name string + Options *v1b.DeleteOptions + } + lockServiceInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockServiceInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *ServiceInterfaceMock) DeleteCollection(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("ServiceInterfaceMock.DeleteCollectionFunc: method is nil but ServiceInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockServiceInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockServiceInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedServiceInterface.DeleteCollectionCalls()) +func (mock *ServiceInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions +} { + var calls []struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions + } + lockServiceInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockServiceInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *ServiceInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1b.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("ServiceInterfaceMock.DeleteNamespacedFunc: method is nil but ServiceInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1b.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockServiceInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockServiceInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedServiceInterface.DeleteNamespacedCalls()) +func (mock *ServiceInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1b.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1b.DeleteOptions + } + lockServiceInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockServiceInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *ServiceInterfaceMock) Get(name string, opts v1b.GetOptions) (*v1.Service, error) { + if mock.GetFunc == nil { + panic("ServiceInterfaceMock.GetFunc: method is nil but ServiceInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1b.GetOptions + }{ + Name: name, + Opts: opts, + } + lockServiceInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockServiceInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedServiceInterface.GetCalls()) +func (mock *ServiceInterfaceMock) GetCalls() []struct { + Name string + Opts v1b.GetOptions +} { + var calls []struct { + Name string + Opts v1b.GetOptions + } + lockServiceInterfaceMockGet.RLock() + calls = mock.calls.Get + lockServiceInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *ServiceInterfaceMock) GetNamespaced(namespace string, name string, opts v1b.GetOptions) (*v1.Service, error) { + if mock.GetNamespacedFunc == nil { + panic("ServiceInterfaceMock.GetNamespacedFunc: method is nil but ServiceInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1b.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockServiceInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockServiceInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedServiceInterface.GetNamespacedCalls()) +func (mock *ServiceInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1b.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1b.GetOptions + } + lockServiceInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockServiceInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ServiceInterfaceMock) List(opts v1b.ListOptions) (*v1a.ServiceList, error) { + if mock.ListFunc == nil { + panic("ServiceInterfaceMock.ListFunc: method is nil but ServiceInterface.List was just called") + } + callInfo := struct { + Opts v1b.ListOptions + }{ + Opts: opts, + } + lockServiceInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockServiceInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedServiceInterface.ListCalls()) +func (mock *ServiceInterfaceMock) ListCalls() []struct { + Opts v1b.ListOptions +} { + var calls []struct { + Opts v1b.ListOptions + } + lockServiceInterfaceMockList.RLock() + calls = mock.calls.List + lockServiceInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *ServiceInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("ServiceInterfaceMock.ObjectClientFunc: method is nil but ServiceInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockServiceInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockServiceInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedServiceInterface.ObjectClientCalls()) +func (mock *ServiceInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockServiceInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockServiceInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *ServiceInterfaceMock) Update(in1 *v1.Service) (*v1.Service, error) { + if mock.UpdateFunc == nil { + panic("ServiceInterfaceMock.UpdateFunc: method is nil but ServiceInterface.Update was just called") + } + callInfo := struct { + In1 *v1.Service + }{ + In1: in1, + } + lockServiceInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockServiceInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedServiceInterface.UpdateCalls()) +func (mock *ServiceInterfaceMock) UpdateCalls() []struct { + In1 *v1.Service +} { + var calls []struct { + In1 *v1.Service + } + lockServiceInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockServiceInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *ServiceInterfaceMock) Watch(opts v1b.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("ServiceInterfaceMock.WatchFunc: method is nil but ServiceInterface.Watch was just called") + } + callInfo := struct { + Opts v1b.ListOptions + }{ + Opts: opts, + } + lockServiceInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockServiceInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedServiceInterface.WatchCalls()) +func (mock *ServiceInterfaceMock) WatchCalls() []struct { + Opts v1b.ListOptions +} { + var calls []struct { + Opts v1b.ListOptions + } + lockServiceInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockServiceInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockServicesGetterMockServices sync.RWMutex +) + +// Ensure, that ServicesGetterMock does implement ServicesGetter. +// If this is not the case, regenerate this file with moq. +var _ v1a.ServicesGetter = &ServicesGetterMock{} + +// ServicesGetterMock is a mock implementation of ServicesGetter. +// +// func TestSomethingThatUsesServicesGetter(t *testing.T) { +// +// // make and configure a mocked ServicesGetter +// mockedServicesGetter := &ServicesGetterMock{ +// ServicesFunc: func(namespace string) v1a.ServiceInterface { +// panic("mock out the Services method") +// }, +// } +// +// // use mockedServicesGetter in code that requires ServicesGetter +// // and then make assertions. +// +// } +type ServicesGetterMock struct { + // ServicesFunc mocks the Services method. + ServicesFunc func(namespace string) v1a.ServiceInterface + + // calls tracks calls to the methods. + calls struct { + // Services holds details about calls to the Services method. + Services []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// Services calls ServicesFunc. +func (mock *ServicesGetterMock) Services(namespace string) v1a.ServiceInterface { + if mock.ServicesFunc == nil { + panic("ServicesGetterMock.ServicesFunc: method is nil but ServicesGetter.Services was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockServicesGetterMockServices.Lock() + mock.calls.Services = append(mock.calls.Services, callInfo) + lockServicesGetterMockServices.Unlock() + return mock.ServicesFunc(namespace) +} + +// ServicesCalls gets all the calls that were made to Services. +// Check the length with: +// len(mockedServicesGetter.ServicesCalls()) +func (mock *ServicesGetterMock) ServicesCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockServicesGetterMockServices.RLock() + calls = mock.calls.Services + lockServicesGetterMockServices.RUnlock() + return calls +} diff --git a/apis/core/v1/zz_generated_component_status_controller.go b/apis/core/v1/zz_generated_component_status_controller.go index 04e25c02..f0231bce 100644 --- a/apis/core/v1/zz_generated_component_status_controller.go +++ b/apis/core/v1/zz_generated_component_status_controller.go @@ -40,7 +40,7 @@ func NewComponentStatus(namespace, name string, obj v1.ComponentStatus) *v1.Comp type ComponentStatusList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.ComponentStatus + Items []v1.ComponentStatus `json:"items"` } type ComponentStatusHandlerFunc func(key string, obj *v1.ComponentStatus) (runtime.Object, error) diff --git a/apis/core/v1/zz_generated_config_map_controller.go b/apis/core/v1/zz_generated_config_map_controller.go index 0c74f973..4abf19dc 100644 --- a/apis/core/v1/zz_generated_config_map_controller.go +++ b/apis/core/v1/zz_generated_config_map_controller.go @@ -41,7 +41,7 @@ func NewConfigMap(namespace, name string, obj v1.ConfigMap) *v1.ConfigMap { type ConfigMapList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.ConfigMap + Items []v1.ConfigMap `json:"items"` } type ConfigMapHandlerFunc func(key string, obj *v1.ConfigMap) (runtime.Object, error) diff --git a/apis/core/v1/zz_generated_endpoints_controller.go b/apis/core/v1/zz_generated_endpoints_controller.go index 7d3d0ae0..6e62c6c4 100644 --- a/apis/core/v1/zz_generated_endpoints_controller.go +++ b/apis/core/v1/zz_generated_endpoints_controller.go @@ -41,7 +41,7 @@ func NewEndpoints(namespace, name string, obj v1.Endpoints) *v1.Endpoints { type EndpointsList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.Endpoints + Items []v1.Endpoints `json:"items"` } type EndpointsHandlerFunc func(key string, obj *v1.Endpoints) (runtime.Object, error) diff --git a/apis/core/v1/zz_generated_event_controller.go b/apis/core/v1/zz_generated_event_controller.go index d58d0581..b3253d76 100644 --- a/apis/core/v1/zz_generated_event_controller.go +++ b/apis/core/v1/zz_generated_event_controller.go @@ -40,7 +40,7 @@ func NewEvent(namespace, name string, obj v1.Event) *v1.Event { type EventList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.Event + Items []v1.Event `json:"items"` } type EventHandlerFunc func(key string, obj *v1.Event) (runtime.Object, error) diff --git a/apis/core/v1/zz_generated_limit_range_controller.go b/apis/core/v1/zz_generated_limit_range_controller.go index fca15943..1fec3a65 100644 --- a/apis/core/v1/zz_generated_limit_range_controller.go +++ b/apis/core/v1/zz_generated_limit_range_controller.go @@ -41,7 +41,7 @@ func NewLimitRange(namespace, name string, obj v1.LimitRange) *v1.LimitRange { type LimitRangeList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.LimitRange + Items []v1.LimitRange `json:"items"` } type LimitRangeHandlerFunc func(key string, obj *v1.LimitRange) (runtime.Object, error) diff --git a/apis/core/v1/zz_generated_namespace_controller.go b/apis/core/v1/zz_generated_namespace_controller.go index 091c1036..90465485 100644 --- a/apis/core/v1/zz_generated_namespace_controller.go +++ b/apis/core/v1/zz_generated_namespace_controller.go @@ -40,7 +40,7 @@ func NewNamespace(namespace, name string, obj v1.Namespace) *v1.Namespace { type NamespaceList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.Namespace + Items []v1.Namespace `json:"items"` } type NamespaceHandlerFunc func(key string, obj *v1.Namespace) (runtime.Object, error) diff --git a/apis/core/v1/zz_generated_node_controller.go b/apis/core/v1/zz_generated_node_controller.go index 55579c69..92461af0 100644 --- a/apis/core/v1/zz_generated_node_controller.go +++ b/apis/core/v1/zz_generated_node_controller.go @@ -40,7 +40,7 @@ func NewNode(namespace, name string, obj v1.Node) *v1.Node { type NodeList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.Node + Items []v1.Node `json:"items"` } type NodeHandlerFunc func(key string, obj *v1.Node) (runtime.Object, error) diff --git a/apis/core/v1/zz_generated_persistent_volume_claim_controller.go b/apis/core/v1/zz_generated_persistent_volume_claim_controller.go index d06c6d0a..c5692ec6 100644 --- a/apis/core/v1/zz_generated_persistent_volume_claim_controller.go +++ b/apis/core/v1/zz_generated_persistent_volume_claim_controller.go @@ -41,7 +41,7 @@ func NewPersistentVolumeClaim(namespace, name string, obj v1.PersistentVolumeCla type PersistentVolumeClaimList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.PersistentVolumeClaim + Items []v1.PersistentVolumeClaim `json:"items"` } type PersistentVolumeClaimHandlerFunc func(key string, obj *v1.PersistentVolumeClaim) (runtime.Object, error) diff --git a/apis/core/v1/zz_generated_pod_controller.go b/apis/core/v1/zz_generated_pod_controller.go index c8bb2c19..c999e8d3 100644 --- a/apis/core/v1/zz_generated_pod_controller.go +++ b/apis/core/v1/zz_generated_pod_controller.go @@ -41,7 +41,7 @@ func NewPod(namespace, name string, obj v1.Pod) *v1.Pod { type PodList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.Pod + Items []v1.Pod `json:"items"` } type PodHandlerFunc func(key string, obj *v1.Pod) (runtime.Object, error) diff --git a/apis/core/v1/zz_generated_replication_controller_controller.go b/apis/core/v1/zz_generated_replication_controller_controller.go index 807cc83a..5fcebedf 100644 --- a/apis/core/v1/zz_generated_replication_controller_controller.go +++ b/apis/core/v1/zz_generated_replication_controller_controller.go @@ -41,7 +41,7 @@ func NewReplicationController(namespace, name string, obj v1.ReplicationControll type ReplicationControllerList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.ReplicationController + Items []v1.ReplicationController `json:"items"` } type ReplicationControllerHandlerFunc func(key string, obj *v1.ReplicationController) (runtime.Object, error) diff --git a/apis/core/v1/zz_generated_resource_quota_controller.go b/apis/core/v1/zz_generated_resource_quota_controller.go index 8dd1341e..4f7fbd1a 100644 --- a/apis/core/v1/zz_generated_resource_quota_controller.go +++ b/apis/core/v1/zz_generated_resource_quota_controller.go @@ -41,7 +41,7 @@ func NewResourceQuota(namespace, name string, obj v1.ResourceQuota) *v1.Resource type ResourceQuotaList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.ResourceQuota + Items []v1.ResourceQuota `json:"items"` } type ResourceQuotaHandlerFunc func(key string, obj *v1.ResourceQuota) (runtime.Object, error) diff --git a/apis/core/v1/zz_generated_scheme.go b/apis/core/v1/zz_generated_scheme.go index e80d7cc5..a9cf35a7 100644 --- a/apis/core/v1/zz_generated_scheme.go +++ b/apis/core/v1/zz_generated_scheme.go @@ -1,6 +1,7 @@ package v1 import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) @@ -48,5 +49,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &ResourceQuotaList{}, &LimitRangeList{}, ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil } diff --git a/apis/core/v1/zz_generated_secret_controller.go b/apis/core/v1/zz_generated_secret_controller.go index 020b0dce..b6ca9344 100644 --- a/apis/core/v1/zz_generated_secret_controller.go +++ b/apis/core/v1/zz_generated_secret_controller.go @@ -41,7 +41,7 @@ func NewSecret(namespace, name string, obj v1.Secret) *v1.Secret { type SecretList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.Secret + Items []v1.Secret `json:"items"` } type SecretHandlerFunc func(key string, obj *v1.Secret) (runtime.Object, error) diff --git a/apis/core/v1/zz_generated_service_account_controller.go b/apis/core/v1/zz_generated_service_account_controller.go index ef1f84e9..9d489b6a 100644 --- a/apis/core/v1/zz_generated_service_account_controller.go +++ b/apis/core/v1/zz_generated_service_account_controller.go @@ -41,7 +41,7 @@ func NewServiceAccount(namespace, name string, obj v1.ServiceAccount) *v1.Servic type ServiceAccountList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.ServiceAccount + Items []v1.ServiceAccount `json:"items"` } type ServiceAccountHandlerFunc func(key string, obj *v1.ServiceAccount) (runtime.Object, error) diff --git a/apis/core/v1/zz_generated_service_controller.go b/apis/core/v1/zz_generated_service_controller.go index d455c53c..1374eeda 100644 --- a/apis/core/v1/zz_generated_service_controller.go +++ b/apis/core/v1/zz_generated_service_controller.go @@ -41,7 +41,7 @@ func NewService(namespace, name string, obj v1.Service) *v1.Service { type ServiceList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.Service + Items []v1.Service `json:"items"` } type ServiceHandlerFunc func(key string, obj *v1.Service) (runtime.Object, error) diff --git a/apis/extensions/v1beta1/fakes/zz_generated_ingress_mock_test.go b/apis/extensions/v1beta1/fakes/zz_generated_ingress_mock_test.go new file mode 100644 index 00000000..f1ab4565 --- /dev/null +++ b/apis/extensions/v1beta1/fakes/zz_generated_ingress_mock_test.go @@ -0,0 +1,1357 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v1beta1a "github.com/rancher/types/apis/extensions/v1beta1" + v1beta1 "k8s.io/api/extensions/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockIngressListerMockGet sync.RWMutex + lockIngressListerMockList sync.RWMutex +) + +// Ensure, that IngressListerMock does implement IngressLister. +// If this is not the case, regenerate this file with moq. +var _ v1beta1a.IngressLister = &IngressListerMock{} + +// IngressListerMock is a mock implementation of IngressLister. +// +// func TestSomethingThatUsesIngressLister(t *testing.T) { +// +// // make and configure a mocked IngressLister +// mockedIngressLister := &IngressListerMock{ +// GetFunc: func(namespace string, name string) (*v1beta1.Ingress, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v1beta1.Ingress, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedIngressLister in code that requires IngressLister +// // and then make assertions. +// +// } +type IngressListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v1beta1.Ingress, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v1beta1.Ingress, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *IngressListerMock) Get(namespace string, name string) (*v1beta1.Ingress, error) { + if mock.GetFunc == nil { + panic("IngressListerMock.GetFunc: method is nil but IngressLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockIngressListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockIngressListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedIngressLister.GetCalls()) +func (mock *IngressListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockIngressListerMockGet.RLock() + calls = mock.calls.Get + lockIngressListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *IngressListerMock) List(namespace string, selector labels.Selector) ([]*v1beta1.Ingress, error) { + if mock.ListFunc == nil { + panic("IngressListerMock.ListFunc: method is nil but IngressLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockIngressListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockIngressListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedIngressLister.ListCalls()) +func (mock *IngressListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockIngressListerMockList.RLock() + calls = mock.calls.List + lockIngressListerMockList.RUnlock() + return calls +} + +var ( + lockIngressControllerMockAddClusterScopedHandler sync.RWMutex + lockIngressControllerMockAddHandler sync.RWMutex + lockIngressControllerMockEnqueue sync.RWMutex + lockIngressControllerMockGeneric sync.RWMutex + lockIngressControllerMockInformer sync.RWMutex + lockIngressControllerMockLister sync.RWMutex + lockIngressControllerMockStart sync.RWMutex + lockIngressControllerMockSync sync.RWMutex +) + +// Ensure, that IngressControllerMock does implement IngressController. +// If this is not the case, regenerate this file with moq. +var _ v1beta1a.IngressController = &IngressControllerMock{} + +// IngressControllerMock is a mock implementation of IngressController. +// +// func TestSomethingThatUsesIngressController(t *testing.T) { +// +// // make and configure a mocked IngressController +// mockedIngressController := &IngressControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v1beta1a.IngressHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v1beta1a.IngressHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v1beta1a.IngressLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedIngressController in code that requires IngressController +// // and then make assertions. +// +// } +type IngressControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v1beta1a.IngressHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v1beta1a.IngressHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v1beta1a.IngressLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v1beta1a.IngressHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v1beta1a.IngressHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *IngressControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v1beta1a.IngressHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("IngressControllerMock.AddClusterScopedHandlerFunc: method is nil but IngressController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v1beta1a.IngressHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockIngressControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockIngressControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedIngressController.AddClusterScopedHandlerCalls()) +func (mock *IngressControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1beta1a.IngressHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1beta1a.IngressHandlerFunc + } + lockIngressControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockIngressControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *IngressControllerMock) AddHandler(ctx context.Context, name string, handler v1beta1a.IngressHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("IngressControllerMock.AddHandlerFunc: method is nil but IngressController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v1beta1a.IngressHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockIngressControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockIngressControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedIngressController.AddHandlerCalls()) +func (mock *IngressControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v1beta1a.IngressHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v1beta1a.IngressHandlerFunc + } + lockIngressControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockIngressControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *IngressControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("IngressControllerMock.EnqueueFunc: method is nil but IngressController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockIngressControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockIngressControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedIngressController.EnqueueCalls()) +func (mock *IngressControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockIngressControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockIngressControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *IngressControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("IngressControllerMock.GenericFunc: method is nil but IngressController.Generic was just called") + } + callInfo := struct { + }{} + lockIngressControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockIngressControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedIngressController.GenericCalls()) +func (mock *IngressControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockIngressControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockIngressControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *IngressControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("IngressControllerMock.InformerFunc: method is nil but IngressController.Informer was just called") + } + callInfo := struct { + }{} + lockIngressControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockIngressControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedIngressController.InformerCalls()) +func (mock *IngressControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockIngressControllerMockInformer.RLock() + calls = mock.calls.Informer + lockIngressControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *IngressControllerMock) Lister() v1beta1a.IngressLister { + if mock.ListerFunc == nil { + panic("IngressControllerMock.ListerFunc: method is nil but IngressController.Lister was just called") + } + callInfo := struct { + }{} + lockIngressControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockIngressControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedIngressController.ListerCalls()) +func (mock *IngressControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockIngressControllerMockLister.RLock() + calls = mock.calls.Lister + lockIngressControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *IngressControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("IngressControllerMock.StartFunc: method is nil but IngressController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockIngressControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockIngressControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedIngressController.StartCalls()) +func (mock *IngressControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockIngressControllerMockStart.RLock() + calls = mock.calls.Start + lockIngressControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *IngressControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("IngressControllerMock.SyncFunc: method is nil but IngressController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockIngressControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockIngressControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedIngressController.SyncCalls()) +func (mock *IngressControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockIngressControllerMockSync.RLock() + calls = mock.calls.Sync + lockIngressControllerMockSync.RUnlock() + return calls +} + +var ( + lockIngressInterfaceMockAddClusterScopedHandler sync.RWMutex + lockIngressInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockIngressInterfaceMockAddHandler sync.RWMutex + lockIngressInterfaceMockAddLifecycle sync.RWMutex + lockIngressInterfaceMockController sync.RWMutex + lockIngressInterfaceMockCreate sync.RWMutex + lockIngressInterfaceMockDelete sync.RWMutex + lockIngressInterfaceMockDeleteCollection sync.RWMutex + lockIngressInterfaceMockDeleteNamespaced sync.RWMutex + lockIngressInterfaceMockGet sync.RWMutex + lockIngressInterfaceMockGetNamespaced sync.RWMutex + lockIngressInterfaceMockList sync.RWMutex + lockIngressInterfaceMockObjectClient sync.RWMutex + lockIngressInterfaceMockUpdate sync.RWMutex + lockIngressInterfaceMockWatch sync.RWMutex +) + +// Ensure, that IngressInterfaceMock does implement IngressInterface. +// If this is not the case, regenerate this file with moq. +var _ v1beta1a.IngressInterface = &IngressInterfaceMock{} + +// IngressInterfaceMock is a mock implementation of IngressInterface. +// +// func TestSomethingThatUsesIngressInterface(t *testing.T) { +// +// // make and configure a mocked IngressInterface +// mockedIngressInterface := &IngressInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v1beta1a.IngressHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v1beta1a.IngressLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v1beta1a.IngressHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v1beta1a.IngressLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v1beta1a.IngressController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v1beta1.Ingress) (*v1beta1.Ingress, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v1beta1.Ingress, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v1beta1.Ingress, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v1beta1a.IngressList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v1beta1.Ingress) (*v1beta1.Ingress, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedIngressInterface in code that requires IngressInterface +// // and then make assertions. +// +// } +type IngressInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v1beta1a.IngressHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v1beta1a.IngressLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v1beta1a.IngressHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v1beta1a.IngressLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v1beta1a.IngressController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v1beta1.Ingress) (*v1beta1.Ingress, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v1beta1.Ingress, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v1beta1.Ingress, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v1beta1a.IngressList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v1beta1.Ingress) (*v1beta1.Ingress, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v1beta1a.IngressHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v1beta1a.IngressLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v1beta1a.IngressHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v1beta1a.IngressLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v1beta1.Ingress + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v1beta1.Ingress + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *IngressInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v1beta1a.IngressHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("IngressInterfaceMock.AddClusterScopedHandlerFunc: method is nil but IngressInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v1beta1a.IngressHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockIngressInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockIngressInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedIngressInterface.AddClusterScopedHandlerCalls()) +func (mock *IngressInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1beta1a.IngressHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1beta1a.IngressHandlerFunc + } + lockIngressInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockIngressInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *IngressInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v1beta1a.IngressLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("IngressInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but IngressInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1beta1a.IngressLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockIngressInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockIngressInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedIngressInterface.AddClusterScopedLifecycleCalls()) +func (mock *IngressInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1beta1a.IngressLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1beta1a.IngressLifecycle + } + lockIngressInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockIngressInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *IngressInterfaceMock) AddHandler(ctx context.Context, name string, sync v1beta1a.IngressHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("IngressInterfaceMock.AddHandlerFunc: method is nil but IngressInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v1beta1a.IngressHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockIngressInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockIngressInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedIngressInterface.AddHandlerCalls()) +func (mock *IngressInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v1beta1a.IngressHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v1beta1a.IngressHandlerFunc + } + lockIngressInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockIngressInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *IngressInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v1beta1a.IngressLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("IngressInterfaceMock.AddLifecycleFunc: method is nil but IngressInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v1beta1a.IngressLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockIngressInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockIngressInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedIngressInterface.AddLifecycleCalls()) +func (mock *IngressInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v1beta1a.IngressLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v1beta1a.IngressLifecycle + } + lockIngressInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockIngressInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *IngressInterfaceMock) Controller() v1beta1a.IngressController { + if mock.ControllerFunc == nil { + panic("IngressInterfaceMock.ControllerFunc: method is nil but IngressInterface.Controller was just called") + } + callInfo := struct { + }{} + lockIngressInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockIngressInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedIngressInterface.ControllerCalls()) +func (mock *IngressInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockIngressInterfaceMockController.RLock() + calls = mock.calls.Controller + lockIngressInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *IngressInterfaceMock) Create(in1 *v1beta1.Ingress) (*v1beta1.Ingress, error) { + if mock.CreateFunc == nil { + panic("IngressInterfaceMock.CreateFunc: method is nil but IngressInterface.Create was just called") + } + callInfo := struct { + In1 *v1beta1.Ingress + }{ + In1: in1, + } + lockIngressInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockIngressInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedIngressInterface.CreateCalls()) +func (mock *IngressInterfaceMock) CreateCalls() []struct { + In1 *v1beta1.Ingress +} { + var calls []struct { + In1 *v1beta1.Ingress + } + lockIngressInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockIngressInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *IngressInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("IngressInterfaceMock.DeleteFunc: method is nil but IngressInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockIngressInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockIngressInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedIngressInterface.DeleteCalls()) +func (mock *IngressInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockIngressInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockIngressInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *IngressInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("IngressInterfaceMock.DeleteCollectionFunc: method is nil but IngressInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockIngressInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockIngressInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedIngressInterface.DeleteCollectionCalls()) +func (mock *IngressInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockIngressInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockIngressInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *IngressInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("IngressInterfaceMock.DeleteNamespacedFunc: method is nil but IngressInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockIngressInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockIngressInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedIngressInterface.DeleteNamespacedCalls()) +func (mock *IngressInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockIngressInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockIngressInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *IngressInterfaceMock) Get(name string, opts v1.GetOptions) (*v1beta1.Ingress, error) { + if mock.GetFunc == nil { + panic("IngressInterfaceMock.GetFunc: method is nil but IngressInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockIngressInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockIngressInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedIngressInterface.GetCalls()) +func (mock *IngressInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockIngressInterfaceMockGet.RLock() + calls = mock.calls.Get + lockIngressInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *IngressInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v1beta1.Ingress, error) { + if mock.GetNamespacedFunc == nil { + panic("IngressInterfaceMock.GetNamespacedFunc: method is nil but IngressInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockIngressInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockIngressInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedIngressInterface.GetNamespacedCalls()) +func (mock *IngressInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockIngressInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockIngressInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *IngressInterfaceMock) List(opts v1.ListOptions) (*v1beta1a.IngressList, error) { + if mock.ListFunc == nil { + panic("IngressInterfaceMock.ListFunc: method is nil but IngressInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockIngressInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockIngressInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedIngressInterface.ListCalls()) +func (mock *IngressInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockIngressInterfaceMockList.RLock() + calls = mock.calls.List + lockIngressInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *IngressInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("IngressInterfaceMock.ObjectClientFunc: method is nil but IngressInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockIngressInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockIngressInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedIngressInterface.ObjectClientCalls()) +func (mock *IngressInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockIngressInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockIngressInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *IngressInterfaceMock) Update(in1 *v1beta1.Ingress) (*v1beta1.Ingress, error) { + if mock.UpdateFunc == nil { + panic("IngressInterfaceMock.UpdateFunc: method is nil but IngressInterface.Update was just called") + } + callInfo := struct { + In1 *v1beta1.Ingress + }{ + In1: in1, + } + lockIngressInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockIngressInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedIngressInterface.UpdateCalls()) +func (mock *IngressInterfaceMock) UpdateCalls() []struct { + In1 *v1beta1.Ingress +} { + var calls []struct { + In1 *v1beta1.Ingress + } + lockIngressInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockIngressInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *IngressInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("IngressInterfaceMock.WatchFunc: method is nil but IngressInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockIngressInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockIngressInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedIngressInterface.WatchCalls()) +func (mock *IngressInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockIngressInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockIngressInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockIngressesGetterMockIngresses sync.RWMutex +) + +// Ensure, that IngressesGetterMock does implement IngressesGetter. +// If this is not the case, regenerate this file with moq. +var _ v1beta1a.IngressesGetter = &IngressesGetterMock{} + +// IngressesGetterMock is a mock implementation of IngressesGetter. +// +// func TestSomethingThatUsesIngressesGetter(t *testing.T) { +// +// // make and configure a mocked IngressesGetter +// mockedIngressesGetter := &IngressesGetterMock{ +// IngressesFunc: func(namespace string) v1beta1a.IngressInterface { +// panic("mock out the Ingresses method") +// }, +// } +// +// // use mockedIngressesGetter in code that requires IngressesGetter +// // and then make assertions. +// +// } +type IngressesGetterMock struct { + // IngressesFunc mocks the Ingresses method. + IngressesFunc func(namespace string) v1beta1a.IngressInterface + + // calls tracks calls to the methods. + calls struct { + // Ingresses holds details about calls to the Ingresses method. + Ingresses []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// Ingresses calls IngressesFunc. +func (mock *IngressesGetterMock) Ingresses(namespace string) v1beta1a.IngressInterface { + if mock.IngressesFunc == nil { + panic("IngressesGetterMock.IngressesFunc: method is nil but IngressesGetter.Ingresses was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockIngressesGetterMockIngresses.Lock() + mock.calls.Ingresses = append(mock.calls.Ingresses, callInfo) + lockIngressesGetterMockIngresses.Unlock() + return mock.IngressesFunc(namespace) +} + +// IngressesCalls gets all the calls that were made to Ingresses. +// Check the length with: +// len(mockedIngressesGetter.IngressesCalls()) +func (mock *IngressesGetterMock) IngressesCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockIngressesGetterMockIngresses.RLock() + calls = mock.calls.Ingresses + lockIngressesGetterMockIngresses.RUnlock() + return calls +} diff --git a/apis/extensions/v1beta1/fakes/zz_generated_pod_security_policy_mock_test.go b/apis/extensions/v1beta1/fakes/zz_generated_pod_security_policy_mock_test.go new file mode 100644 index 00000000..b24f7f65 --- /dev/null +++ b/apis/extensions/v1beta1/fakes/zz_generated_pod_security_policy_mock_test.go @@ -0,0 +1,1357 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v1beta1a "github.com/rancher/types/apis/extensions/v1beta1" + v1beta1 "k8s.io/api/extensions/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockPodSecurityPolicyListerMockGet sync.RWMutex + lockPodSecurityPolicyListerMockList sync.RWMutex +) + +// Ensure, that PodSecurityPolicyListerMock does implement PodSecurityPolicyLister. +// If this is not the case, regenerate this file with moq. +var _ v1beta1a.PodSecurityPolicyLister = &PodSecurityPolicyListerMock{} + +// PodSecurityPolicyListerMock is a mock implementation of PodSecurityPolicyLister. +// +// func TestSomethingThatUsesPodSecurityPolicyLister(t *testing.T) { +// +// // make and configure a mocked PodSecurityPolicyLister +// mockedPodSecurityPolicyLister := &PodSecurityPolicyListerMock{ +// GetFunc: func(namespace string, name string) (*v1beta1.PodSecurityPolicy, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v1beta1.PodSecurityPolicy, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedPodSecurityPolicyLister in code that requires PodSecurityPolicyLister +// // and then make assertions. +// +// } +type PodSecurityPolicyListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v1beta1.PodSecurityPolicy, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v1beta1.PodSecurityPolicy, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *PodSecurityPolicyListerMock) Get(namespace string, name string) (*v1beta1.PodSecurityPolicy, error) { + if mock.GetFunc == nil { + panic("PodSecurityPolicyListerMock.GetFunc: method is nil but PodSecurityPolicyLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockPodSecurityPolicyListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockPodSecurityPolicyListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedPodSecurityPolicyLister.GetCalls()) +func (mock *PodSecurityPolicyListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockPodSecurityPolicyListerMockGet.RLock() + calls = mock.calls.Get + lockPodSecurityPolicyListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *PodSecurityPolicyListerMock) List(namespace string, selector labels.Selector) ([]*v1beta1.PodSecurityPolicy, error) { + if mock.ListFunc == nil { + panic("PodSecurityPolicyListerMock.ListFunc: method is nil but PodSecurityPolicyLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockPodSecurityPolicyListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockPodSecurityPolicyListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedPodSecurityPolicyLister.ListCalls()) +func (mock *PodSecurityPolicyListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockPodSecurityPolicyListerMockList.RLock() + calls = mock.calls.List + lockPodSecurityPolicyListerMockList.RUnlock() + return calls +} + +var ( + lockPodSecurityPolicyControllerMockAddClusterScopedHandler sync.RWMutex + lockPodSecurityPolicyControllerMockAddHandler sync.RWMutex + lockPodSecurityPolicyControllerMockEnqueue sync.RWMutex + lockPodSecurityPolicyControllerMockGeneric sync.RWMutex + lockPodSecurityPolicyControllerMockInformer sync.RWMutex + lockPodSecurityPolicyControllerMockLister sync.RWMutex + lockPodSecurityPolicyControllerMockStart sync.RWMutex + lockPodSecurityPolicyControllerMockSync sync.RWMutex +) + +// Ensure, that PodSecurityPolicyControllerMock does implement PodSecurityPolicyController. +// If this is not the case, regenerate this file with moq. +var _ v1beta1a.PodSecurityPolicyController = &PodSecurityPolicyControllerMock{} + +// PodSecurityPolicyControllerMock is a mock implementation of PodSecurityPolicyController. +// +// func TestSomethingThatUsesPodSecurityPolicyController(t *testing.T) { +// +// // make and configure a mocked PodSecurityPolicyController +// mockedPodSecurityPolicyController := &PodSecurityPolicyControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v1beta1a.PodSecurityPolicyHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v1beta1a.PodSecurityPolicyHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v1beta1a.PodSecurityPolicyLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedPodSecurityPolicyController in code that requires PodSecurityPolicyController +// // and then make assertions. +// +// } +type PodSecurityPolicyControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v1beta1a.PodSecurityPolicyHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v1beta1a.PodSecurityPolicyHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v1beta1a.PodSecurityPolicyLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v1beta1a.PodSecurityPolicyHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v1beta1a.PodSecurityPolicyHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *PodSecurityPolicyControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v1beta1a.PodSecurityPolicyHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("PodSecurityPolicyControllerMock.AddClusterScopedHandlerFunc: method is nil but PodSecurityPolicyController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v1beta1a.PodSecurityPolicyHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockPodSecurityPolicyControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockPodSecurityPolicyControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedPodSecurityPolicyController.AddClusterScopedHandlerCalls()) +func (mock *PodSecurityPolicyControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1beta1a.PodSecurityPolicyHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1beta1a.PodSecurityPolicyHandlerFunc + } + lockPodSecurityPolicyControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockPodSecurityPolicyControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *PodSecurityPolicyControllerMock) AddHandler(ctx context.Context, name string, handler v1beta1a.PodSecurityPolicyHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("PodSecurityPolicyControllerMock.AddHandlerFunc: method is nil but PodSecurityPolicyController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v1beta1a.PodSecurityPolicyHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockPodSecurityPolicyControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockPodSecurityPolicyControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedPodSecurityPolicyController.AddHandlerCalls()) +func (mock *PodSecurityPolicyControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v1beta1a.PodSecurityPolicyHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v1beta1a.PodSecurityPolicyHandlerFunc + } + lockPodSecurityPolicyControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockPodSecurityPolicyControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *PodSecurityPolicyControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("PodSecurityPolicyControllerMock.EnqueueFunc: method is nil but PodSecurityPolicyController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockPodSecurityPolicyControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockPodSecurityPolicyControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedPodSecurityPolicyController.EnqueueCalls()) +func (mock *PodSecurityPolicyControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockPodSecurityPolicyControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockPodSecurityPolicyControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *PodSecurityPolicyControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("PodSecurityPolicyControllerMock.GenericFunc: method is nil but PodSecurityPolicyController.Generic was just called") + } + callInfo := struct { + }{} + lockPodSecurityPolicyControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockPodSecurityPolicyControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedPodSecurityPolicyController.GenericCalls()) +func (mock *PodSecurityPolicyControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockPodSecurityPolicyControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockPodSecurityPolicyControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *PodSecurityPolicyControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("PodSecurityPolicyControllerMock.InformerFunc: method is nil but PodSecurityPolicyController.Informer was just called") + } + callInfo := struct { + }{} + lockPodSecurityPolicyControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockPodSecurityPolicyControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedPodSecurityPolicyController.InformerCalls()) +func (mock *PodSecurityPolicyControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockPodSecurityPolicyControllerMockInformer.RLock() + calls = mock.calls.Informer + lockPodSecurityPolicyControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *PodSecurityPolicyControllerMock) Lister() v1beta1a.PodSecurityPolicyLister { + if mock.ListerFunc == nil { + panic("PodSecurityPolicyControllerMock.ListerFunc: method is nil but PodSecurityPolicyController.Lister was just called") + } + callInfo := struct { + }{} + lockPodSecurityPolicyControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockPodSecurityPolicyControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedPodSecurityPolicyController.ListerCalls()) +func (mock *PodSecurityPolicyControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockPodSecurityPolicyControllerMockLister.RLock() + calls = mock.calls.Lister + lockPodSecurityPolicyControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *PodSecurityPolicyControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("PodSecurityPolicyControllerMock.StartFunc: method is nil but PodSecurityPolicyController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockPodSecurityPolicyControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockPodSecurityPolicyControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedPodSecurityPolicyController.StartCalls()) +func (mock *PodSecurityPolicyControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockPodSecurityPolicyControllerMockStart.RLock() + calls = mock.calls.Start + lockPodSecurityPolicyControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *PodSecurityPolicyControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("PodSecurityPolicyControllerMock.SyncFunc: method is nil but PodSecurityPolicyController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockPodSecurityPolicyControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockPodSecurityPolicyControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedPodSecurityPolicyController.SyncCalls()) +func (mock *PodSecurityPolicyControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockPodSecurityPolicyControllerMockSync.RLock() + calls = mock.calls.Sync + lockPodSecurityPolicyControllerMockSync.RUnlock() + return calls +} + +var ( + lockPodSecurityPolicyInterfaceMockAddClusterScopedHandler sync.RWMutex + lockPodSecurityPolicyInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockPodSecurityPolicyInterfaceMockAddHandler sync.RWMutex + lockPodSecurityPolicyInterfaceMockAddLifecycle sync.RWMutex + lockPodSecurityPolicyInterfaceMockController sync.RWMutex + lockPodSecurityPolicyInterfaceMockCreate sync.RWMutex + lockPodSecurityPolicyInterfaceMockDelete sync.RWMutex + lockPodSecurityPolicyInterfaceMockDeleteCollection sync.RWMutex + lockPodSecurityPolicyInterfaceMockDeleteNamespaced sync.RWMutex + lockPodSecurityPolicyInterfaceMockGet sync.RWMutex + lockPodSecurityPolicyInterfaceMockGetNamespaced sync.RWMutex + lockPodSecurityPolicyInterfaceMockList sync.RWMutex + lockPodSecurityPolicyInterfaceMockObjectClient sync.RWMutex + lockPodSecurityPolicyInterfaceMockUpdate sync.RWMutex + lockPodSecurityPolicyInterfaceMockWatch sync.RWMutex +) + +// Ensure, that PodSecurityPolicyInterfaceMock does implement PodSecurityPolicyInterface. +// If this is not the case, regenerate this file with moq. +var _ v1beta1a.PodSecurityPolicyInterface = &PodSecurityPolicyInterfaceMock{} + +// PodSecurityPolicyInterfaceMock is a mock implementation of PodSecurityPolicyInterface. +// +// func TestSomethingThatUsesPodSecurityPolicyInterface(t *testing.T) { +// +// // make and configure a mocked PodSecurityPolicyInterface +// mockedPodSecurityPolicyInterface := &PodSecurityPolicyInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v1beta1a.PodSecurityPolicyHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v1beta1a.PodSecurityPolicyLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v1beta1a.PodSecurityPolicyHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v1beta1a.PodSecurityPolicyLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v1beta1a.PodSecurityPolicyController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v1beta1.PodSecurityPolicy) (*v1beta1.PodSecurityPolicy, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v1beta1.PodSecurityPolicy, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v1beta1.PodSecurityPolicy, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v1beta1a.PodSecurityPolicyList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v1beta1.PodSecurityPolicy) (*v1beta1.PodSecurityPolicy, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedPodSecurityPolicyInterface in code that requires PodSecurityPolicyInterface +// // and then make assertions. +// +// } +type PodSecurityPolicyInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v1beta1a.PodSecurityPolicyHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v1beta1a.PodSecurityPolicyLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v1beta1a.PodSecurityPolicyHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v1beta1a.PodSecurityPolicyLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v1beta1a.PodSecurityPolicyController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v1beta1.PodSecurityPolicy) (*v1beta1.PodSecurityPolicy, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v1beta1.PodSecurityPolicy, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v1beta1.PodSecurityPolicy, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v1beta1a.PodSecurityPolicyList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v1beta1.PodSecurityPolicy) (*v1beta1.PodSecurityPolicy, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v1beta1a.PodSecurityPolicyHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v1beta1a.PodSecurityPolicyLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v1beta1a.PodSecurityPolicyHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v1beta1a.PodSecurityPolicyLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v1beta1.PodSecurityPolicy + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v1beta1.PodSecurityPolicy + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *PodSecurityPolicyInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v1beta1a.PodSecurityPolicyHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("PodSecurityPolicyInterfaceMock.AddClusterScopedHandlerFunc: method is nil but PodSecurityPolicyInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v1beta1a.PodSecurityPolicyHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockPodSecurityPolicyInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockPodSecurityPolicyInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedPodSecurityPolicyInterface.AddClusterScopedHandlerCalls()) +func (mock *PodSecurityPolicyInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1beta1a.PodSecurityPolicyHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1beta1a.PodSecurityPolicyHandlerFunc + } + lockPodSecurityPolicyInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockPodSecurityPolicyInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *PodSecurityPolicyInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v1beta1a.PodSecurityPolicyLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("PodSecurityPolicyInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but PodSecurityPolicyInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1beta1a.PodSecurityPolicyLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockPodSecurityPolicyInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockPodSecurityPolicyInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedPodSecurityPolicyInterface.AddClusterScopedLifecycleCalls()) +func (mock *PodSecurityPolicyInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1beta1a.PodSecurityPolicyLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1beta1a.PodSecurityPolicyLifecycle + } + lockPodSecurityPolicyInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockPodSecurityPolicyInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *PodSecurityPolicyInterfaceMock) AddHandler(ctx context.Context, name string, sync v1beta1a.PodSecurityPolicyHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("PodSecurityPolicyInterfaceMock.AddHandlerFunc: method is nil but PodSecurityPolicyInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v1beta1a.PodSecurityPolicyHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockPodSecurityPolicyInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockPodSecurityPolicyInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedPodSecurityPolicyInterface.AddHandlerCalls()) +func (mock *PodSecurityPolicyInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v1beta1a.PodSecurityPolicyHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v1beta1a.PodSecurityPolicyHandlerFunc + } + lockPodSecurityPolicyInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockPodSecurityPolicyInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *PodSecurityPolicyInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v1beta1a.PodSecurityPolicyLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("PodSecurityPolicyInterfaceMock.AddLifecycleFunc: method is nil but PodSecurityPolicyInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v1beta1a.PodSecurityPolicyLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockPodSecurityPolicyInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockPodSecurityPolicyInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedPodSecurityPolicyInterface.AddLifecycleCalls()) +func (mock *PodSecurityPolicyInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v1beta1a.PodSecurityPolicyLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v1beta1a.PodSecurityPolicyLifecycle + } + lockPodSecurityPolicyInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockPodSecurityPolicyInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *PodSecurityPolicyInterfaceMock) Controller() v1beta1a.PodSecurityPolicyController { + if mock.ControllerFunc == nil { + panic("PodSecurityPolicyInterfaceMock.ControllerFunc: method is nil but PodSecurityPolicyInterface.Controller was just called") + } + callInfo := struct { + }{} + lockPodSecurityPolicyInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockPodSecurityPolicyInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedPodSecurityPolicyInterface.ControllerCalls()) +func (mock *PodSecurityPolicyInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockPodSecurityPolicyInterfaceMockController.RLock() + calls = mock.calls.Controller + lockPodSecurityPolicyInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *PodSecurityPolicyInterfaceMock) Create(in1 *v1beta1.PodSecurityPolicy) (*v1beta1.PodSecurityPolicy, error) { + if mock.CreateFunc == nil { + panic("PodSecurityPolicyInterfaceMock.CreateFunc: method is nil but PodSecurityPolicyInterface.Create was just called") + } + callInfo := struct { + In1 *v1beta1.PodSecurityPolicy + }{ + In1: in1, + } + lockPodSecurityPolicyInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockPodSecurityPolicyInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedPodSecurityPolicyInterface.CreateCalls()) +func (mock *PodSecurityPolicyInterfaceMock) CreateCalls() []struct { + In1 *v1beta1.PodSecurityPolicy +} { + var calls []struct { + In1 *v1beta1.PodSecurityPolicy + } + lockPodSecurityPolicyInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockPodSecurityPolicyInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *PodSecurityPolicyInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("PodSecurityPolicyInterfaceMock.DeleteFunc: method is nil but PodSecurityPolicyInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockPodSecurityPolicyInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockPodSecurityPolicyInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedPodSecurityPolicyInterface.DeleteCalls()) +func (mock *PodSecurityPolicyInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockPodSecurityPolicyInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockPodSecurityPolicyInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *PodSecurityPolicyInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("PodSecurityPolicyInterfaceMock.DeleteCollectionFunc: method is nil but PodSecurityPolicyInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockPodSecurityPolicyInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockPodSecurityPolicyInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedPodSecurityPolicyInterface.DeleteCollectionCalls()) +func (mock *PodSecurityPolicyInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockPodSecurityPolicyInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockPodSecurityPolicyInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *PodSecurityPolicyInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("PodSecurityPolicyInterfaceMock.DeleteNamespacedFunc: method is nil but PodSecurityPolicyInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockPodSecurityPolicyInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockPodSecurityPolicyInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedPodSecurityPolicyInterface.DeleteNamespacedCalls()) +func (mock *PodSecurityPolicyInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockPodSecurityPolicyInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockPodSecurityPolicyInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *PodSecurityPolicyInterfaceMock) Get(name string, opts v1.GetOptions) (*v1beta1.PodSecurityPolicy, error) { + if mock.GetFunc == nil { + panic("PodSecurityPolicyInterfaceMock.GetFunc: method is nil but PodSecurityPolicyInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockPodSecurityPolicyInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockPodSecurityPolicyInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedPodSecurityPolicyInterface.GetCalls()) +func (mock *PodSecurityPolicyInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockPodSecurityPolicyInterfaceMockGet.RLock() + calls = mock.calls.Get + lockPodSecurityPolicyInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *PodSecurityPolicyInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v1beta1.PodSecurityPolicy, error) { + if mock.GetNamespacedFunc == nil { + panic("PodSecurityPolicyInterfaceMock.GetNamespacedFunc: method is nil but PodSecurityPolicyInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockPodSecurityPolicyInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockPodSecurityPolicyInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedPodSecurityPolicyInterface.GetNamespacedCalls()) +func (mock *PodSecurityPolicyInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockPodSecurityPolicyInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockPodSecurityPolicyInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *PodSecurityPolicyInterfaceMock) List(opts v1.ListOptions) (*v1beta1a.PodSecurityPolicyList, error) { + if mock.ListFunc == nil { + panic("PodSecurityPolicyInterfaceMock.ListFunc: method is nil but PodSecurityPolicyInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockPodSecurityPolicyInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockPodSecurityPolicyInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedPodSecurityPolicyInterface.ListCalls()) +func (mock *PodSecurityPolicyInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockPodSecurityPolicyInterfaceMockList.RLock() + calls = mock.calls.List + lockPodSecurityPolicyInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *PodSecurityPolicyInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("PodSecurityPolicyInterfaceMock.ObjectClientFunc: method is nil but PodSecurityPolicyInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockPodSecurityPolicyInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockPodSecurityPolicyInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedPodSecurityPolicyInterface.ObjectClientCalls()) +func (mock *PodSecurityPolicyInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockPodSecurityPolicyInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockPodSecurityPolicyInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *PodSecurityPolicyInterfaceMock) Update(in1 *v1beta1.PodSecurityPolicy) (*v1beta1.PodSecurityPolicy, error) { + if mock.UpdateFunc == nil { + panic("PodSecurityPolicyInterfaceMock.UpdateFunc: method is nil but PodSecurityPolicyInterface.Update was just called") + } + callInfo := struct { + In1 *v1beta1.PodSecurityPolicy + }{ + In1: in1, + } + lockPodSecurityPolicyInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockPodSecurityPolicyInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedPodSecurityPolicyInterface.UpdateCalls()) +func (mock *PodSecurityPolicyInterfaceMock) UpdateCalls() []struct { + In1 *v1beta1.PodSecurityPolicy +} { + var calls []struct { + In1 *v1beta1.PodSecurityPolicy + } + lockPodSecurityPolicyInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockPodSecurityPolicyInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *PodSecurityPolicyInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("PodSecurityPolicyInterfaceMock.WatchFunc: method is nil but PodSecurityPolicyInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockPodSecurityPolicyInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockPodSecurityPolicyInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedPodSecurityPolicyInterface.WatchCalls()) +func (mock *PodSecurityPolicyInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockPodSecurityPolicyInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockPodSecurityPolicyInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockPodSecurityPoliciesGetterMockPodSecurityPolicies sync.RWMutex +) + +// Ensure, that PodSecurityPoliciesGetterMock does implement PodSecurityPoliciesGetter. +// If this is not the case, regenerate this file with moq. +var _ v1beta1a.PodSecurityPoliciesGetter = &PodSecurityPoliciesGetterMock{} + +// PodSecurityPoliciesGetterMock is a mock implementation of PodSecurityPoliciesGetter. +// +// func TestSomethingThatUsesPodSecurityPoliciesGetter(t *testing.T) { +// +// // make and configure a mocked PodSecurityPoliciesGetter +// mockedPodSecurityPoliciesGetter := &PodSecurityPoliciesGetterMock{ +// PodSecurityPoliciesFunc: func(namespace string) v1beta1a.PodSecurityPolicyInterface { +// panic("mock out the PodSecurityPolicies method") +// }, +// } +// +// // use mockedPodSecurityPoliciesGetter in code that requires PodSecurityPoliciesGetter +// // and then make assertions. +// +// } +type PodSecurityPoliciesGetterMock struct { + // PodSecurityPoliciesFunc mocks the PodSecurityPolicies method. + PodSecurityPoliciesFunc func(namespace string) v1beta1a.PodSecurityPolicyInterface + + // calls tracks calls to the methods. + calls struct { + // PodSecurityPolicies holds details about calls to the PodSecurityPolicies method. + PodSecurityPolicies []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// PodSecurityPolicies calls PodSecurityPoliciesFunc. +func (mock *PodSecurityPoliciesGetterMock) PodSecurityPolicies(namespace string) v1beta1a.PodSecurityPolicyInterface { + if mock.PodSecurityPoliciesFunc == nil { + panic("PodSecurityPoliciesGetterMock.PodSecurityPoliciesFunc: method is nil but PodSecurityPoliciesGetter.PodSecurityPolicies was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockPodSecurityPoliciesGetterMockPodSecurityPolicies.Lock() + mock.calls.PodSecurityPolicies = append(mock.calls.PodSecurityPolicies, callInfo) + lockPodSecurityPoliciesGetterMockPodSecurityPolicies.Unlock() + return mock.PodSecurityPoliciesFunc(namespace) +} + +// PodSecurityPoliciesCalls gets all the calls that were made to PodSecurityPolicies. +// Check the length with: +// len(mockedPodSecurityPoliciesGetter.PodSecurityPoliciesCalls()) +func (mock *PodSecurityPoliciesGetterMock) PodSecurityPoliciesCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockPodSecurityPoliciesGetterMockPodSecurityPolicies.RLock() + calls = mock.calls.PodSecurityPolicies + lockPodSecurityPoliciesGetterMockPodSecurityPolicies.RUnlock() + return calls +} diff --git a/apis/extensions/v1beta1/zz_generated_ingress_controller.go b/apis/extensions/v1beta1/zz_generated_ingress_controller.go index b06ae037..b5f7c9fd 100644 --- a/apis/extensions/v1beta1/zz_generated_ingress_controller.go +++ b/apis/extensions/v1beta1/zz_generated_ingress_controller.go @@ -41,7 +41,7 @@ func NewIngress(namespace, name string, obj v1beta1.Ingress) *v1beta1.Ingress { type IngressList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []v1beta1.Ingress + Items []v1beta1.Ingress `json:"items"` } type IngressHandlerFunc func(key string, obj *v1beta1.Ingress) (runtime.Object, error) diff --git a/apis/extensions/v1beta1/zz_generated_pod_security_policy_controller.go b/apis/extensions/v1beta1/zz_generated_pod_security_policy_controller.go index 160b0489..28de91b1 100644 --- a/apis/extensions/v1beta1/zz_generated_pod_security_policy_controller.go +++ b/apis/extensions/v1beta1/zz_generated_pod_security_policy_controller.go @@ -40,7 +40,7 @@ func NewPodSecurityPolicy(namespace, name string, obj v1beta1.PodSecurityPolicy) type PodSecurityPolicyList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []v1beta1.PodSecurityPolicy + Items []v1beta1.PodSecurityPolicy `json:"items"` } type PodSecurityPolicyHandlerFunc func(key string, obj *v1beta1.PodSecurityPolicy) (runtime.Object, error) diff --git a/apis/extensions/v1beta1/zz_generated_scheme.go b/apis/extensions/v1beta1/zz_generated_scheme.go index 95c5b5cf..85ef02e8 100644 --- a/apis/extensions/v1beta1/zz_generated_scheme.go +++ b/apis/extensions/v1beta1/zz_generated_scheme.go @@ -1,6 +1,7 @@ package v1beta1 import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) @@ -36,5 +37,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &PodSecurityPolicyList{}, &IngressList{}, ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil } diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_auth_config_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_auth_config_mock_test.go new file mode 100644 index 00000000..3eca3b82 --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_auth_config_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockAuthConfigListerMockGet sync.RWMutex + lockAuthConfigListerMockList sync.RWMutex +) + +// Ensure, that AuthConfigListerMock does implement AuthConfigLister. +// If this is not the case, regenerate this file with moq. +var _ v3.AuthConfigLister = &AuthConfigListerMock{} + +// AuthConfigListerMock is a mock implementation of AuthConfigLister. +// +// func TestSomethingThatUsesAuthConfigLister(t *testing.T) { +// +// // make and configure a mocked AuthConfigLister +// mockedAuthConfigLister := &AuthConfigListerMock{ +// GetFunc: func(namespace string, name string) (*v3.AuthConfig, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.AuthConfig, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedAuthConfigLister in code that requires AuthConfigLister +// // and then make assertions. +// +// } +type AuthConfigListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.AuthConfig, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.AuthConfig, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *AuthConfigListerMock) Get(namespace string, name string) (*v3.AuthConfig, error) { + if mock.GetFunc == nil { + panic("AuthConfigListerMock.GetFunc: method is nil but AuthConfigLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockAuthConfigListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockAuthConfigListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedAuthConfigLister.GetCalls()) +func (mock *AuthConfigListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockAuthConfigListerMockGet.RLock() + calls = mock.calls.Get + lockAuthConfigListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *AuthConfigListerMock) List(namespace string, selector labels.Selector) ([]*v3.AuthConfig, error) { + if mock.ListFunc == nil { + panic("AuthConfigListerMock.ListFunc: method is nil but AuthConfigLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockAuthConfigListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockAuthConfigListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedAuthConfigLister.ListCalls()) +func (mock *AuthConfigListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockAuthConfigListerMockList.RLock() + calls = mock.calls.List + lockAuthConfigListerMockList.RUnlock() + return calls +} + +var ( + lockAuthConfigControllerMockAddClusterScopedHandler sync.RWMutex + lockAuthConfigControllerMockAddHandler sync.RWMutex + lockAuthConfigControllerMockEnqueue sync.RWMutex + lockAuthConfigControllerMockGeneric sync.RWMutex + lockAuthConfigControllerMockInformer sync.RWMutex + lockAuthConfigControllerMockLister sync.RWMutex + lockAuthConfigControllerMockStart sync.RWMutex + lockAuthConfigControllerMockSync sync.RWMutex +) + +// Ensure, that AuthConfigControllerMock does implement AuthConfigController. +// If this is not the case, regenerate this file with moq. +var _ v3.AuthConfigController = &AuthConfigControllerMock{} + +// AuthConfigControllerMock is a mock implementation of AuthConfigController. +// +// func TestSomethingThatUsesAuthConfigController(t *testing.T) { +// +// // make and configure a mocked AuthConfigController +// mockedAuthConfigController := &AuthConfigControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.AuthConfigHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.AuthConfigHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.AuthConfigLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedAuthConfigController in code that requires AuthConfigController +// // and then make assertions. +// +// } +type AuthConfigControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.AuthConfigHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.AuthConfigHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.AuthConfigLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.AuthConfigHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.AuthConfigHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *AuthConfigControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.AuthConfigHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("AuthConfigControllerMock.AddClusterScopedHandlerFunc: method is nil but AuthConfigController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.AuthConfigHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockAuthConfigControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockAuthConfigControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedAuthConfigController.AddClusterScopedHandlerCalls()) +func (mock *AuthConfigControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.AuthConfigHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.AuthConfigHandlerFunc + } + lockAuthConfigControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockAuthConfigControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *AuthConfigControllerMock) AddHandler(ctx context.Context, name string, handler v3.AuthConfigHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("AuthConfigControllerMock.AddHandlerFunc: method is nil but AuthConfigController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.AuthConfigHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockAuthConfigControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockAuthConfigControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedAuthConfigController.AddHandlerCalls()) +func (mock *AuthConfigControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.AuthConfigHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.AuthConfigHandlerFunc + } + lockAuthConfigControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockAuthConfigControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *AuthConfigControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("AuthConfigControllerMock.EnqueueFunc: method is nil but AuthConfigController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockAuthConfigControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockAuthConfigControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedAuthConfigController.EnqueueCalls()) +func (mock *AuthConfigControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockAuthConfigControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockAuthConfigControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *AuthConfigControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("AuthConfigControllerMock.GenericFunc: method is nil but AuthConfigController.Generic was just called") + } + callInfo := struct { + }{} + lockAuthConfigControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockAuthConfigControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedAuthConfigController.GenericCalls()) +func (mock *AuthConfigControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockAuthConfigControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockAuthConfigControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *AuthConfigControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("AuthConfigControllerMock.InformerFunc: method is nil but AuthConfigController.Informer was just called") + } + callInfo := struct { + }{} + lockAuthConfigControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockAuthConfigControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedAuthConfigController.InformerCalls()) +func (mock *AuthConfigControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockAuthConfigControllerMockInformer.RLock() + calls = mock.calls.Informer + lockAuthConfigControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *AuthConfigControllerMock) Lister() v3.AuthConfigLister { + if mock.ListerFunc == nil { + panic("AuthConfigControllerMock.ListerFunc: method is nil but AuthConfigController.Lister was just called") + } + callInfo := struct { + }{} + lockAuthConfigControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockAuthConfigControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedAuthConfigController.ListerCalls()) +func (mock *AuthConfigControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockAuthConfigControllerMockLister.RLock() + calls = mock.calls.Lister + lockAuthConfigControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *AuthConfigControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("AuthConfigControllerMock.StartFunc: method is nil but AuthConfigController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockAuthConfigControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockAuthConfigControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedAuthConfigController.StartCalls()) +func (mock *AuthConfigControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockAuthConfigControllerMockStart.RLock() + calls = mock.calls.Start + lockAuthConfigControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *AuthConfigControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("AuthConfigControllerMock.SyncFunc: method is nil but AuthConfigController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockAuthConfigControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockAuthConfigControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedAuthConfigController.SyncCalls()) +func (mock *AuthConfigControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockAuthConfigControllerMockSync.RLock() + calls = mock.calls.Sync + lockAuthConfigControllerMockSync.RUnlock() + return calls +} + +var ( + lockAuthConfigInterfaceMockAddClusterScopedHandler sync.RWMutex + lockAuthConfigInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockAuthConfigInterfaceMockAddHandler sync.RWMutex + lockAuthConfigInterfaceMockAddLifecycle sync.RWMutex + lockAuthConfigInterfaceMockController sync.RWMutex + lockAuthConfigInterfaceMockCreate sync.RWMutex + lockAuthConfigInterfaceMockDelete sync.RWMutex + lockAuthConfigInterfaceMockDeleteCollection sync.RWMutex + lockAuthConfigInterfaceMockDeleteNamespaced sync.RWMutex + lockAuthConfigInterfaceMockGet sync.RWMutex + lockAuthConfigInterfaceMockGetNamespaced sync.RWMutex + lockAuthConfigInterfaceMockList sync.RWMutex + lockAuthConfigInterfaceMockObjectClient sync.RWMutex + lockAuthConfigInterfaceMockUpdate sync.RWMutex + lockAuthConfigInterfaceMockWatch sync.RWMutex +) + +// Ensure, that AuthConfigInterfaceMock does implement AuthConfigInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.AuthConfigInterface = &AuthConfigInterfaceMock{} + +// AuthConfigInterfaceMock is a mock implementation of AuthConfigInterface. +// +// func TestSomethingThatUsesAuthConfigInterface(t *testing.T) { +// +// // make and configure a mocked AuthConfigInterface +// mockedAuthConfigInterface := &AuthConfigInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.AuthConfigHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.AuthConfigLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.AuthConfigHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.AuthConfigLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.AuthConfigController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.AuthConfig) (*v3.AuthConfig, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.AuthConfig, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.AuthConfig, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.AuthConfigList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.AuthConfig) (*v3.AuthConfig, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedAuthConfigInterface in code that requires AuthConfigInterface +// // and then make assertions. +// +// } +type AuthConfigInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.AuthConfigHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.AuthConfigLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.AuthConfigHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.AuthConfigLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.AuthConfigController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.AuthConfig) (*v3.AuthConfig, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.AuthConfig, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.AuthConfig, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.AuthConfigList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.AuthConfig) (*v3.AuthConfig, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.AuthConfigHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.AuthConfigLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.AuthConfigHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.AuthConfigLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.AuthConfig + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.AuthConfig + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *AuthConfigInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.AuthConfigHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("AuthConfigInterfaceMock.AddClusterScopedHandlerFunc: method is nil but AuthConfigInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.AuthConfigHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockAuthConfigInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockAuthConfigInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedAuthConfigInterface.AddClusterScopedHandlerCalls()) +func (mock *AuthConfigInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.AuthConfigHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.AuthConfigHandlerFunc + } + lockAuthConfigInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockAuthConfigInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *AuthConfigInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.AuthConfigLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("AuthConfigInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but AuthConfigInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.AuthConfigLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockAuthConfigInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockAuthConfigInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedAuthConfigInterface.AddClusterScopedLifecycleCalls()) +func (mock *AuthConfigInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.AuthConfigLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.AuthConfigLifecycle + } + lockAuthConfigInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockAuthConfigInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *AuthConfigInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.AuthConfigHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("AuthConfigInterfaceMock.AddHandlerFunc: method is nil but AuthConfigInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.AuthConfigHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockAuthConfigInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockAuthConfigInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedAuthConfigInterface.AddHandlerCalls()) +func (mock *AuthConfigInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.AuthConfigHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.AuthConfigHandlerFunc + } + lockAuthConfigInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockAuthConfigInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *AuthConfigInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.AuthConfigLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("AuthConfigInterfaceMock.AddLifecycleFunc: method is nil but AuthConfigInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.AuthConfigLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockAuthConfigInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockAuthConfigInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedAuthConfigInterface.AddLifecycleCalls()) +func (mock *AuthConfigInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.AuthConfigLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.AuthConfigLifecycle + } + lockAuthConfigInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockAuthConfigInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *AuthConfigInterfaceMock) Controller() v3.AuthConfigController { + if mock.ControllerFunc == nil { + panic("AuthConfigInterfaceMock.ControllerFunc: method is nil but AuthConfigInterface.Controller was just called") + } + callInfo := struct { + }{} + lockAuthConfigInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockAuthConfigInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedAuthConfigInterface.ControllerCalls()) +func (mock *AuthConfigInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockAuthConfigInterfaceMockController.RLock() + calls = mock.calls.Controller + lockAuthConfigInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *AuthConfigInterfaceMock) Create(in1 *v3.AuthConfig) (*v3.AuthConfig, error) { + if mock.CreateFunc == nil { + panic("AuthConfigInterfaceMock.CreateFunc: method is nil but AuthConfigInterface.Create was just called") + } + callInfo := struct { + In1 *v3.AuthConfig + }{ + In1: in1, + } + lockAuthConfigInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockAuthConfigInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedAuthConfigInterface.CreateCalls()) +func (mock *AuthConfigInterfaceMock) CreateCalls() []struct { + In1 *v3.AuthConfig +} { + var calls []struct { + In1 *v3.AuthConfig + } + lockAuthConfigInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockAuthConfigInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *AuthConfigInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("AuthConfigInterfaceMock.DeleteFunc: method is nil but AuthConfigInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockAuthConfigInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockAuthConfigInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedAuthConfigInterface.DeleteCalls()) +func (mock *AuthConfigInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockAuthConfigInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockAuthConfigInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *AuthConfigInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("AuthConfigInterfaceMock.DeleteCollectionFunc: method is nil but AuthConfigInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockAuthConfigInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockAuthConfigInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedAuthConfigInterface.DeleteCollectionCalls()) +func (mock *AuthConfigInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockAuthConfigInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockAuthConfigInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *AuthConfigInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("AuthConfigInterfaceMock.DeleteNamespacedFunc: method is nil but AuthConfigInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockAuthConfigInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockAuthConfigInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedAuthConfigInterface.DeleteNamespacedCalls()) +func (mock *AuthConfigInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockAuthConfigInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockAuthConfigInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *AuthConfigInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.AuthConfig, error) { + if mock.GetFunc == nil { + panic("AuthConfigInterfaceMock.GetFunc: method is nil but AuthConfigInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockAuthConfigInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockAuthConfigInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedAuthConfigInterface.GetCalls()) +func (mock *AuthConfigInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockAuthConfigInterfaceMockGet.RLock() + calls = mock.calls.Get + lockAuthConfigInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *AuthConfigInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.AuthConfig, error) { + if mock.GetNamespacedFunc == nil { + panic("AuthConfigInterfaceMock.GetNamespacedFunc: method is nil but AuthConfigInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockAuthConfigInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockAuthConfigInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedAuthConfigInterface.GetNamespacedCalls()) +func (mock *AuthConfigInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockAuthConfigInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockAuthConfigInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *AuthConfigInterfaceMock) List(opts v1.ListOptions) (*v3.AuthConfigList, error) { + if mock.ListFunc == nil { + panic("AuthConfigInterfaceMock.ListFunc: method is nil but AuthConfigInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockAuthConfigInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockAuthConfigInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedAuthConfigInterface.ListCalls()) +func (mock *AuthConfigInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockAuthConfigInterfaceMockList.RLock() + calls = mock.calls.List + lockAuthConfigInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *AuthConfigInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("AuthConfigInterfaceMock.ObjectClientFunc: method is nil but AuthConfigInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockAuthConfigInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockAuthConfigInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedAuthConfigInterface.ObjectClientCalls()) +func (mock *AuthConfigInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockAuthConfigInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockAuthConfigInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *AuthConfigInterfaceMock) Update(in1 *v3.AuthConfig) (*v3.AuthConfig, error) { + if mock.UpdateFunc == nil { + panic("AuthConfigInterfaceMock.UpdateFunc: method is nil but AuthConfigInterface.Update was just called") + } + callInfo := struct { + In1 *v3.AuthConfig + }{ + In1: in1, + } + lockAuthConfigInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockAuthConfigInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedAuthConfigInterface.UpdateCalls()) +func (mock *AuthConfigInterfaceMock) UpdateCalls() []struct { + In1 *v3.AuthConfig +} { + var calls []struct { + In1 *v3.AuthConfig + } + lockAuthConfigInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockAuthConfigInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *AuthConfigInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("AuthConfigInterfaceMock.WatchFunc: method is nil but AuthConfigInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockAuthConfigInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockAuthConfigInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedAuthConfigInterface.WatchCalls()) +func (mock *AuthConfigInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockAuthConfigInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockAuthConfigInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockAuthConfigsGetterMockAuthConfigs sync.RWMutex +) + +// Ensure, that AuthConfigsGetterMock does implement AuthConfigsGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.AuthConfigsGetter = &AuthConfigsGetterMock{} + +// AuthConfigsGetterMock is a mock implementation of AuthConfigsGetter. +// +// func TestSomethingThatUsesAuthConfigsGetter(t *testing.T) { +// +// // make and configure a mocked AuthConfigsGetter +// mockedAuthConfigsGetter := &AuthConfigsGetterMock{ +// AuthConfigsFunc: func(namespace string) v3.AuthConfigInterface { +// panic("mock out the AuthConfigs method") +// }, +// } +// +// // use mockedAuthConfigsGetter in code that requires AuthConfigsGetter +// // and then make assertions. +// +// } +type AuthConfigsGetterMock struct { + // AuthConfigsFunc mocks the AuthConfigs method. + AuthConfigsFunc func(namespace string) v3.AuthConfigInterface + + // calls tracks calls to the methods. + calls struct { + // AuthConfigs holds details about calls to the AuthConfigs method. + AuthConfigs []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// AuthConfigs calls AuthConfigsFunc. +func (mock *AuthConfigsGetterMock) AuthConfigs(namespace string) v3.AuthConfigInterface { + if mock.AuthConfigsFunc == nil { + panic("AuthConfigsGetterMock.AuthConfigsFunc: method is nil but AuthConfigsGetter.AuthConfigs was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockAuthConfigsGetterMockAuthConfigs.Lock() + mock.calls.AuthConfigs = append(mock.calls.AuthConfigs, callInfo) + lockAuthConfigsGetterMockAuthConfigs.Unlock() + return mock.AuthConfigsFunc(namespace) +} + +// AuthConfigsCalls gets all the calls that were made to AuthConfigs. +// Check the length with: +// len(mockedAuthConfigsGetter.AuthConfigsCalls()) +func (mock *AuthConfigsGetterMock) AuthConfigsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockAuthConfigsGetterMockAuthConfigs.RLock() + calls = mock.calls.AuthConfigs + lockAuthConfigsGetterMockAuthConfigs.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_catalog_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_catalog_mock_test.go new file mode 100644 index 00000000..8b4102fa --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_catalog_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockCatalogListerMockGet sync.RWMutex + lockCatalogListerMockList sync.RWMutex +) + +// Ensure, that CatalogListerMock does implement CatalogLister. +// If this is not the case, regenerate this file with moq. +var _ v3.CatalogLister = &CatalogListerMock{} + +// CatalogListerMock is a mock implementation of CatalogLister. +// +// func TestSomethingThatUsesCatalogLister(t *testing.T) { +// +// // make and configure a mocked CatalogLister +// mockedCatalogLister := &CatalogListerMock{ +// GetFunc: func(namespace string, name string) (*v3.Catalog, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.Catalog, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedCatalogLister in code that requires CatalogLister +// // and then make assertions. +// +// } +type CatalogListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.Catalog, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.Catalog, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *CatalogListerMock) Get(namespace string, name string) (*v3.Catalog, error) { + if mock.GetFunc == nil { + panic("CatalogListerMock.GetFunc: method is nil but CatalogLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockCatalogListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockCatalogListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedCatalogLister.GetCalls()) +func (mock *CatalogListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockCatalogListerMockGet.RLock() + calls = mock.calls.Get + lockCatalogListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *CatalogListerMock) List(namespace string, selector labels.Selector) ([]*v3.Catalog, error) { + if mock.ListFunc == nil { + panic("CatalogListerMock.ListFunc: method is nil but CatalogLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockCatalogListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockCatalogListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedCatalogLister.ListCalls()) +func (mock *CatalogListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockCatalogListerMockList.RLock() + calls = mock.calls.List + lockCatalogListerMockList.RUnlock() + return calls +} + +var ( + lockCatalogControllerMockAddClusterScopedHandler sync.RWMutex + lockCatalogControllerMockAddHandler sync.RWMutex + lockCatalogControllerMockEnqueue sync.RWMutex + lockCatalogControllerMockGeneric sync.RWMutex + lockCatalogControllerMockInformer sync.RWMutex + lockCatalogControllerMockLister sync.RWMutex + lockCatalogControllerMockStart sync.RWMutex + lockCatalogControllerMockSync sync.RWMutex +) + +// Ensure, that CatalogControllerMock does implement CatalogController. +// If this is not the case, regenerate this file with moq. +var _ v3.CatalogController = &CatalogControllerMock{} + +// CatalogControllerMock is a mock implementation of CatalogController. +// +// func TestSomethingThatUsesCatalogController(t *testing.T) { +// +// // make and configure a mocked CatalogController +// mockedCatalogController := &CatalogControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.CatalogHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.CatalogHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.CatalogLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedCatalogController in code that requires CatalogController +// // and then make assertions. +// +// } +type CatalogControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.CatalogHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.CatalogHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.CatalogLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.CatalogHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.CatalogHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *CatalogControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.CatalogHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("CatalogControllerMock.AddClusterScopedHandlerFunc: method is nil but CatalogController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.CatalogHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockCatalogControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockCatalogControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedCatalogController.AddClusterScopedHandlerCalls()) +func (mock *CatalogControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.CatalogHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.CatalogHandlerFunc + } + lockCatalogControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockCatalogControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *CatalogControllerMock) AddHandler(ctx context.Context, name string, handler v3.CatalogHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("CatalogControllerMock.AddHandlerFunc: method is nil but CatalogController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.CatalogHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockCatalogControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockCatalogControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedCatalogController.AddHandlerCalls()) +func (mock *CatalogControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.CatalogHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.CatalogHandlerFunc + } + lockCatalogControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockCatalogControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *CatalogControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("CatalogControllerMock.EnqueueFunc: method is nil but CatalogController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockCatalogControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockCatalogControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedCatalogController.EnqueueCalls()) +func (mock *CatalogControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockCatalogControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockCatalogControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *CatalogControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("CatalogControllerMock.GenericFunc: method is nil but CatalogController.Generic was just called") + } + callInfo := struct { + }{} + lockCatalogControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockCatalogControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedCatalogController.GenericCalls()) +func (mock *CatalogControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockCatalogControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockCatalogControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *CatalogControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("CatalogControllerMock.InformerFunc: method is nil but CatalogController.Informer was just called") + } + callInfo := struct { + }{} + lockCatalogControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockCatalogControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedCatalogController.InformerCalls()) +func (mock *CatalogControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockCatalogControllerMockInformer.RLock() + calls = mock.calls.Informer + lockCatalogControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *CatalogControllerMock) Lister() v3.CatalogLister { + if mock.ListerFunc == nil { + panic("CatalogControllerMock.ListerFunc: method is nil but CatalogController.Lister was just called") + } + callInfo := struct { + }{} + lockCatalogControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockCatalogControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedCatalogController.ListerCalls()) +func (mock *CatalogControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockCatalogControllerMockLister.RLock() + calls = mock.calls.Lister + lockCatalogControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *CatalogControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("CatalogControllerMock.StartFunc: method is nil but CatalogController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockCatalogControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockCatalogControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedCatalogController.StartCalls()) +func (mock *CatalogControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockCatalogControllerMockStart.RLock() + calls = mock.calls.Start + lockCatalogControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *CatalogControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("CatalogControllerMock.SyncFunc: method is nil but CatalogController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockCatalogControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockCatalogControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedCatalogController.SyncCalls()) +func (mock *CatalogControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockCatalogControllerMockSync.RLock() + calls = mock.calls.Sync + lockCatalogControllerMockSync.RUnlock() + return calls +} + +var ( + lockCatalogInterfaceMockAddClusterScopedHandler sync.RWMutex + lockCatalogInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockCatalogInterfaceMockAddHandler sync.RWMutex + lockCatalogInterfaceMockAddLifecycle sync.RWMutex + lockCatalogInterfaceMockController sync.RWMutex + lockCatalogInterfaceMockCreate sync.RWMutex + lockCatalogInterfaceMockDelete sync.RWMutex + lockCatalogInterfaceMockDeleteCollection sync.RWMutex + lockCatalogInterfaceMockDeleteNamespaced sync.RWMutex + lockCatalogInterfaceMockGet sync.RWMutex + lockCatalogInterfaceMockGetNamespaced sync.RWMutex + lockCatalogInterfaceMockList sync.RWMutex + lockCatalogInterfaceMockObjectClient sync.RWMutex + lockCatalogInterfaceMockUpdate sync.RWMutex + lockCatalogInterfaceMockWatch sync.RWMutex +) + +// Ensure, that CatalogInterfaceMock does implement CatalogInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.CatalogInterface = &CatalogInterfaceMock{} + +// CatalogInterfaceMock is a mock implementation of CatalogInterface. +// +// func TestSomethingThatUsesCatalogInterface(t *testing.T) { +// +// // make and configure a mocked CatalogInterface +// mockedCatalogInterface := &CatalogInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.CatalogHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.CatalogLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.CatalogHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.CatalogLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.CatalogController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.Catalog) (*v3.Catalog, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.Catalog, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.Catalog, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.CatalogList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.Catalog) (*v3.Catalog, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedCatalogInterface in code that requires CatalogInterface +// // and then make assertions. +// +// } +type CatalogInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.CatalogHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.CatalogLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.CatalogHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.CatalogLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.CatalogController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.Catalog) (*v3.Catalog, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.Catalog, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.Catalog, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.CatalogList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.Catalog) (*v3.Catalog, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.CatalogHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.CatalogLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.CatalogHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.CatalogLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.Catalog + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.Catalog + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *CatalogInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.CatalogHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("CatalogInterfaceMock.AddClusterScopedHandlerFunc: method is nil but CatalogInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.CatalogHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockCatalogInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockCatalogInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedCatalogInterface.AddClusterScopedHandlerCalls()) +func (mock *CatalogInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.CatalogHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.CatalogHandlerFunc + } + lockCatalogInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockCatalogInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *CatalogInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.CatalogLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("CatalogInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but CatalogInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.CatalogLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockCatalogInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockCatalogInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedCatalogInterface.AddClusterScopedLifecycleCalls()) +func (mock *CatalogInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.CatalogLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.CatalogLifecycle + } + lockCatalogInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockCatalogInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *CatalogInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.CatalogHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("CatalogInterfaceMock.AddHandlerFunc: method is nil but CatalogInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.CatalogHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockCatalogInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockCatalogInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedCatalogInterface.AddHandlerCalls()) +func (mock *CatalogInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.CatalogHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.CatalogHandlerFunc + } + lockCatalogInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockCatalogInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *CatalogInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.CatalogLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("CatalogInterfaceMock.AddLifecycleFunc: method is nil but CatalogInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.CatalogLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockCatalogInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockCatalogInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedCatalogInterface.AddLifecycleCalls()) +func (mock *CatalogInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.CatalogLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.CatalogLifecycle + } + lockCatalogInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockCatalogInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *CatalogInterfaceMock) Controller() v3.CatalogController { + if mock.ControllerFunc == nil { + panic("CatalogInterfaceMock.ControllerFunc: method is nil but CatalogInterface.Controller was just called") + } + callInfo := struct { + }{} + lockCatalogInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockCatalogInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedCatalogInterface.ControllerCalls()) +func (mock *CatalogInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockCatalogInterfaceMockController.RLock() + calls = mock.calls.Controller + lockCatalogInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *CatalogInterfaceMock) Create(in1 *v3.Catalog) (*v3.Catalog, error) { + if mock.CreateFunc == nil { + panic("CatalogInterfaceMock.CreateFunc: method is nil but CatalogInterface.Create was just called") + } + callInfo := struct { + In1 *v3.Catalog + }{ + In1: in1, + } + lockCatalogInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockCatalogInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedCatalogInterface.CreateCalls()) +func (mock *CatalogInterfaceMock) CreateCalls() []struct { + In1 *v3.Catalog +} { + var calls []struct { + In1 *v3.Catalog + } + lockCatalogInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockCatalogInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *CatalogInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("CatalogInterfaceMock.DeleteFunc: method is nil but CatalogInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockCatalogInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockCatalogInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedCatalogInterface.DeleteCalls()) +func (mock *CatalogInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockCatalogInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockCatalogInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *CatalogInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("CatalogInterfaceMock.DeleteCollectionFunc: method is nil but CatalogInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockCatalogInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockCatalogInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedCatalogInterface.DeleteCollectionCalls()) +func (mock *CatalogInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockCatalogInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockCatalogInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *CatalogInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("CatalogInterfaceMock.DeleteNamespacedFunc: method is nil but CatalogInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockCatalogInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockCatalogInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedCatalogInterface.DeleteNamespacedCalls()) +func (mock *CatalogInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockCatalogInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockCatalogInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *CatalogInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.Catalog, error) { + if mock.GetFunc == nil { + panic("CatalogInterfaceMock.GetFunc: method is nil but CatalogInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockCatalogInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockCatalogInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedCatalogInterface.GetCalls()) +func (mock *CatalogInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockCatalogInterfaceMockGet.RLock() + calls = mock.calls.Get + lockCatalogInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *CatalogInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.Catalog, error) { + if mock.GetNamespacedFunc == nil { + panic("CatalogInterfaceMock.GetNamespacedFunc: method is nil but CatalogInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockCatalogInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockCatalogInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedCatalogInterface.GetNamespacedCalls()) +func (mock *CatalogInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockCatalogInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockCatalogInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *CatalogInterfaceMock) List(opts v1.ListOptions) (*v3.CatalogList, error) { + if mock.ListFunc == nil { + panic("CatalogInterfaceMock.ListFunc: method is nil but CatalogInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockCatalogInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockCatalogInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedCatalogInterface.ListCalls()) +func (mock *CatalogInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockCatalogInterfaceMockList.RLock() + calls = mock.calls.List + lockCatalogInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *CatalogInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("CatalogInterfaceMock.ObjectClientFunc: method is nil but CatalogInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockCatalogInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockCatalogInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedCatalogInterface.ObjectClientCalls()) +func (mock *CatalogInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockCatalogInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockCatalogInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *CatalogInterfaceMock) Update(in1 *v3.Catalog) (*v3.Catalog, error) { + if mock.UpdateFunc == nil { + panic("CatalogInterfaceMock.UpdateFunc: method is nil but CatalogInterface.Update was just called") + } + callInfo := struct { + In1 *v3.Catalog + }{ + In1: in1, + } + lockCatalogInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockCatalogInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedCatalogInterface.UpdateCalls()) +func (mock *CatalogInterfaceMock) UpdateCalls() []struct { + In1 *v3.Catalog +} { + var calls []struct { + In1 *v3.Catalog + } + lockCatalogInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockCatalogInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *CatalogInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("CatalogInterfaceMock.WatchFunc: method is nil but CatalogInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockCatalogInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockCatalogInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedCatalogInterface.WatchCalls()) +func (mock *CatalogInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockCatalogInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockCatalogInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockCatalogsGetterMockCatalogs sync.RWMutex +) + +// Ensure, that CatalogsGetterMock does implement CatalogsGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.CatalogsGetter = &CatalogsGetterMock{} + +// CatalogsGetterMock is a mock implementation of CatalogsGetter. +// +// func TestSomethingThatUsesCatalogsGetter(t *testing.T) { +// +// // make and configure a mocked CatalogsGetter +// mockedCatalogsGetter := &CatalogsGetterMock{ +// CatalogsFunc: func(namespace string) v3.CatalogInterface { +// panic("mock out the Catalogs method") +// }, +// } +// +// // use mockedCatalogsGetter in code that requires CatalogsGetter +// // and then make assertions. +// +// } +type CatalogsGetterMock struct { + // CatalogsFunc mocks the Catalogs method. + CatalogsFunc func(namespace string) v3.CatalogInterface + + // calls tracks calls to the methods. + calls struct { + // Catalogs holds details about calls to the Catalogs method. + Catalogs []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// Catalogs calls CatalogsFunc. +func (mock *CatalogsGetterMock) Catalogs(namespace string) v3.CatalogInterface { + if mock.CatalogsFunc == nil { + panic("CatalogsGetterMock.CatalogsFunc: method is nil but CatalogsGetter.Catalogs was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockCatalogsGetterMockCatalogs.Lock() + mock.calls.Catalogs = append(mock.calls.Catalogs, callInfo) + lockCatalogsGetterMockCatalogs.Unlock() + return mock.CatalogsFunc(namespace) +} + +// CatalogsCalls gets all the calls that were made to Catalogs. +// Check the length with: +// len(mockedCatalogsGetter.CatalogsCalls()) +func (mock *CatalogsGetterMock) CatalogsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockCatalogsGetterMockCatalogs.RLock() + calls = mock.calls.Catalogs + lockCatalogsGetterMockCatalogs.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_catalog_template_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_catalog_template_mock_test.go new file mode 100644 index 00000000..61b570cd --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_catalog_template_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockCatalogTemplateListerMockGet sync.RWMutex + lockCatalogTemplateListerMockList sync.RWMutex +) + +// Ensure, that CatalogTemplateListerMock does implement CatalogTemplateLister. +// If this is not the case, regenerate this file with moq. +var _ v3.CatalogTemplateLister = &CatalogTemplateListerMock{} + +// CatalogTemplateListerMock is a mock implementation of CatalogTemplateLister. +// +// func TestSomethingThatUsesCatalogTemplateLister(t *testing.T) { +// +// // make and configure a mocked CatalogTemplateLister +// mockedCatalogTemplateLister := &CatalogTemplateListerMock{ +// GetFunc: func(namespace string, name string) (*v3.CatalogTemplate, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.CatalogTemplate, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedCatalogTemplateLister in code that requires CatalogTemplateLister +// // and then make assertions. +// +// } +type CatalogTemplateListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.CatalogTemplate, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.CatalogTemplate, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *CatalogTemplateListerMock) Get(namespace string, name string) (*v3.CatalogTemplate, error) { + if mock.GetFunc == nil { + panic("CatalogTemplateListerMock.GetFunc: method is nil but CatalogTemplateLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockCatalogTemplateListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockCatalogTemplateListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedCatalogTemplateLister.GetCalls()) +func (mock *CatalogTemplateListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockCatalogTemplateListerMockGet.RLock() + calls = mock.calls.Get + lockCatalogTemplateListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *CatalogTemplateListerMock) List(namespace string, selector labels.Selector) ([]*v3.CatalogTemplate, error) { + if mock.ListFunc == nil { + panic("CatalogTemplateListerMock.ListFunc: method is nil but CatalogTemplateLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockCatalogTemplateListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockCatalogTemplateListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedCatalogTemplateLister.ListCalls()) +func (mock *CatalogTemplateListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockCatalogTemplateListerMockList.RLock() + calls = mock.calls.List + lockCatalogTemplateListerMockList.RUnlock() + return calls +} + +var ( + lockCatalogTemplateControllerMockAddClusterScopedHandler sync.RWMutex + lockCatalogTemplateControllerMockAddHandler sync.RWMutex + lockCatalogTemplateControllerMockEnqueue sync.RWMutex + lockCatalogTemplateControllerMockGeneric sync.RWMutex + lockCatalogTemplateControllerMockInformer sync.RWMutex + lockCatalogTemplateControllerMockLister sync.RWMutex + lockCatalogTemplateControllerMockStart sync.RWMutex + lockCatalogTemplateControllerMockSync sync.RWMutex +) + +// Ensure, that CatalogTemplateControllerMock does implement CatalogTemplateController. +// If this is not the case, regenerate this file with moq. +var _ v3.CatalogTemplateController = &CatalogTemplateControllerMock{} + +// CatalogTemplateControllerMock is a mock implementation of CatalogTemplateController. +// +// func TestSomethingThatUsesCatalogTemplateController(t *testing.T) { +// +// // make and configure a mocked CatalogTemplateController +// mockedCatalogTemplateController := &CatalogTemplateControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.CatalogTemplateHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.CatalogTemplateHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.CatalogTemplateLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedCatalogTemplateController in code that requires CatalogTemplateController +// // and then make assertions. +// +// } +type CatalogTemplateControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.CatalogTemplateHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.CatalogTemplateHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.CatalogTemplateLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.CatalogTemplateHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.CatalogTemplateHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *CatalogTemplateControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.CatalogTemplateHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("CatalogTemplateControllerMock.AddClusterScopedHandlerFunc: method is nil but CatalogTemplateController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.CatalogTemplateHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockCatalogTemplateControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockCatalogTemplateControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedCatalogTemplateController.AddClusterScopedHandlerCalls()) +func (mock *CatalogTemplateControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.CatalogTemplateHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.CatalogTemplateHandlerFunc + } + lockCatalogTemplateControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockCatalogTemplateControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *CatalogTemplateControllerMock) AddHandler(ctx context.Context, name string, handler v3.CatalogTemplateHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("CatalogTemplateControllerMock.AddHandlerFunc: method is nil but CatalogTemplateController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.CatalogTemplateHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockCatalogTemplateControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockCatalogTemplateControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedCatalogTemplateController.AddHandlerCalls()) +func (mock *CatalogTemplateControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.CatalogTemplateHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.CatalogTemplateHandlerFunc + } + lockCatalogTemplateControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockCatalogTemplateControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *CatalogTemplateControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("CatalogTemplateControllerMock.EnqueueFunc: method is nil but CatalogTemplateController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockCatalogTemplateControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockCatalogTemplateControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedCatalogTemplateController.EnqueueCalls()) +func (mock *CatalogTemplateControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockCatalogTemplateControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockCatalogTemplateControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *CatalogTemplateControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("CatalogTemplateControllerMock.GenericFunc: method is nil but CatalogTemplateController.Generic was just called") + } + callInfo := struct { + }{} + lockCatalogTemplateControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockCatalogTemplateControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedCatalogTemplateController.GenericCalls()) +func (mock *CatalogTemplateControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockCatalogTemplateControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockCatalogTemplateControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *CatalogTemplateControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("CatalogTemplateControllerMock.InformerFunc: method is nil but CatalogTemplateController.Informer was just called") + } + callInfo := struct { + }{} + lockCatalogTemplateControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockCatalogTemplateControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedCatalogTemplateController.InformerCalls()) +func (mock *CatalogTemplateControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockCatalogTemplateControllerMockInformer.RLock() + calls = mock.calls.Informer + lockCatalogTemplateControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *CatalogTemplateControllerMock) Lister() v3.CatalogTemplateLister { + if mock.ListerFunc == nil { + panic("CatalogTemplateControllerMock.ListerFunc: method is nil but CatalogTemplateController.Lister was just called") + } + callInfo := struct { + }{} + lockCatalogTemplateControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockCatalogTemplateControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedCatalogTemplateController.ListerCalls()) +func (mock *CatalogTemplateControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockCatalogTemplateControllerMockLister.RLock() + calls = mock.calls.Lister + lockCatalogTemplateControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *CatalogTemplateControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("CatalogTemplateControllerMock.StartFunc: method is nil but CatalogTemplateController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockCatalogTemplateControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockCatalogTemplateControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedCatalogTemplateController.StartCalls()) +func (mock *CatalogTemplateControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockCatalogTemplateControllerMockStart.RLock() + calls = mock.calls.Start + lockCatalogTemplateControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *CatalogTemplateControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("CatalogTemplateControllerMock.SyncFunc: method is nil but CatalogTemplateController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockCatalogTemplateControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockCatalogTemplateControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedCatalogTemplateController.SyncCalls()) +func (mock *CatalogTemplateControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockCatalogTemplateControllerMockSync.RLock() + calls = mock.calls.Sync + lockCatalogTemplateControllerMockSync.RUnlock() + return calls +} + +var ( + lockCatalogTemplateInterfaceMockAddClusterScopedHandler sync.RWMutex + lockCatalogTemplateInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockCatalogTemplateInterfaceMockAddHandler sync.RWMutex + lockCatalogTemplateInterfaceMockAddLifecycle sync.RWMutex + lockCatalogTemplateInterfaceMockController sync.RWMutex + lockCatalogTemplateInterfaceMockCreate sync.RWMutex + lockCatalogTemplateInterfaceMockDelete sync.RWMutex + lockCatalogTemplateInterfaceMockDeleteCollection sync.RWMutex + lockCatalogTemplateInterfaceMockDeleteNamespaced sync.RWMutex + lockCatalogTemplateInterfaceMockGet sync.RWMutex + lockCatalogTemplateInterfaceMockGetNamespaced sync.RWMutex + lockCatalogTemplateInterfaceMockList sync.RWMutex + lockCatalogTemplateInterfaceMockObjectClient sync.RWMutex + lockCatalogTemplateInterfaceMockUpdate sync.RWMutex + lockCatalogTemplateInterfaceMockWatch sync.RWMutex +) + +// Ensure, that CatalogTemplateInterfaceMock does implement CatalogTemplateInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.CatalogTemplateInterface = &CatalogTemplateInterfaceMock{} + +// CatalogTemplateInterfaceMock is a mock implementation of CatalogTemplateInterface. +// +// func TestSomethingThatUsesCatalogTemplateInterface(t *testing.T) { +// +// // make and configure a mocked CatalogTemplateInterface +// mockedCatalogTemplateInterface := &CatalogTemplateInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.CatalogTemplateHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.CatalogTemplateLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.CatalogTemplateHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.CatalogTemplateLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.CatalogTemplateController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.CatalogTemplate) (*v3.CatalogTemplate, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.CatalogTemplate, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.CatalogTemplate, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.CatalogTemplateList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.CatalogTemplate) (*v3.CatalogTemplate, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedCatalogTemplateInterface in code that requires CatalogTemplateInterface +// // and then make assertions. +// +// } +type CatalogTemplateInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.CatalogTemplateHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.CatalogTemplateLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.CatalogTemplateHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.CatalogTemplateLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.CatalogTemplateController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.CatalogTemplate) (*v3.CatalogTemplate, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.CatalogTemplate, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.CatalogTemplate, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.CatalogTemplateList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.CatalogTemplate) (*v3.CatalogTemplate, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.CatalogTemplateHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.CatalogTemplateLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.CatalogTemplateHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.CatalogTemplateLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.CatalogTemplate + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.CatalogTemplate + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *CatalogTemplateInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.CatalogTemplateHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("CatalogTemplateInterfaceMock.AddClusterScopedHandlerFunc: method is nil but CatalogTemplateInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.CatalogTemplateHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockCatalogTemplateInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockCatalogTemplateInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedCatalogTemplateInterface.AddClusterScopedHandlerCalls()) +func (mock *CatalogTemplateInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.CatalogTemplateHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.CatalogTemplateHandlerFunc + } + lockCatalogTemplateInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockCatalogTemplateInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *CatalogTemplateInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.CatalogTemplateLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("CatalogTemplateInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but CatalogTemplateInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.CatalogTemplateLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockCatalogTemplateInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockCatalogTemplateInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedCatalogTemplateInterface.AddClusterScopedLifecycleCalls()) +func (mock *CatalogTemplateInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.CatalogTemplateLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.CatalogTemplateLifecycle + } + lockCatalogTemplateInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockCatalogTemplateInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *CatalogTemplateInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.CatalogTemplateHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("CatalogTemplateInterfaceMock.AddHandlerFunc: method is nil but CatalogTemplateInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.CatalogTemplateHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockCatalogTemplateInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockCatalogTemplateInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedCatalogTemplateInterface.AddHandlerCalls()) +func (mock *CatalogTemplateInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.CatalogTemplateHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.CatalogTemplateHandlerFunc + } + lockCatalogTemplateInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockCatalogTemplateInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *CatalogTemplateInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.CatalogTemplateLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("CatalogTemplateInterfaceMock.AddLifecycleFunc: method is nil but CatalogTemplateInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.CatalogTemplateLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockCatalogTemplateInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockCatalogTemplateInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedCatalogTemplateInterface.AddLifecycleCalls()) +func (mock *CatalogTemplateInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.CatalogTemplateLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.CatalogTemplateLifecycle + } + lockCatalogTemplateInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockCatalogTemplateInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *CatalogTemplateInterfaceMock) Controller() v3.CatalogTemplateController { + if mock.ControllerFunc == nil { + panic("CatalogTemplateInterfaceMock.ControllerFunc: method is nil but CatalogTemplateInterface.Controller was just called") + } + callInfo := struct { + }{} + lockCatalogTemplateInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockCatalogTemplateInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedCatalogTemplateInterface.ControllerCalls()) +func (mock *CatalogTemplateInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockCatalogTemplateInterfaceMockController.RLock() + calls = mock.calls.Controller + lockCatalogTemplateInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *CatalogTemplateInterfaceMock) Create(in1 *v3.CatalogTemplate) (*v3.CatalogTemplate, error) { + if mock.CreateFunc == nil { + panic("CatalogTemplateInterfaceMock.CreateFunc: method is nil but CatalogTemplateInterface.Create was just called") + } + callInfo := struct { + In1 *v3.CatalogTemplate + }{ + In1: in1, + } + lockCatalogTemplateInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockCatalogTemplateInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedCatalogTemplateInterface.CreateCalls()) +func (mock *CatalogTemplateInterfaceMock) CreateCalls() []struct { + In1 *v3.CatalogTemplate +} { + var calls []struct { + In1 *v3.CatalogTemplate + } + lockCatalogTemplateInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockCatalogTemplateInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *CatalogTemplateInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("CatalogTemplateInterfaceMock.DeleteFunc: method is nil but CatalogTemplateInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockCatalogTemplateInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockCatalogTemplateInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedCatalogTemplateInterface.DeleteCalls()) +func (mock *CatalogTemplateInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockCatalogTemplateInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockCatalogTemplateInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *CatalogTemplateInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("CatalogTemplateInterfaceMock.DeleteCollectionFunc: method is nil but CatalogTemplateInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockCatalogTemplateInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockCatalogTemplateInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedCatalogTemplateInterface.DeleteCollectionCalls()) +func (mock *CatalogTemplateInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockCatalogTemplateInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockCatalogTemplateInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *CatalogTemplateInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("CatalogTemplateInterfaceMock.DeleteNamespacedFunc: method is nil but CatalogTemplateInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockCatalogTemplateInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockCatalogTemplateInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedCatalogTemplateInterface.DeleteNamespacedCalls()) +func (mock *CatalogTemplateInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockCatalogTemplateInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockCatalogTemplateInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *CatalogTemplateInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.CatalogTemplate, error) { + if mock.GetFunc == nil { + panic("CatalogTemplateInterfaceMock.GetFunc: method is nil but CatalogTemplateInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockCatalogTemplateInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockCatalogTemplateInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedCatalogTemplateInterface.GetCalls()) +func (mock *CatalogTemplateInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockCatalogTemplateInterfaceMockGet.RLock() + calls = mock.calls.Get + lockCatalogTemplateInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *CatalogTemplateInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.CatalogTemplate, error) { + if mock.GetNamespacedFunc == nil { + panic("CatalogTemplateInterfaceMock.GetNamespacedFunc: method is nil but CatalogTemplateInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockCatalogTemplateInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockCatalogTemplateInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedCatalogTemplateInterface.GetNamespacedCalls()) +func (mock *CatalogTemplateInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockCatalogTemplateInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockCatalogTemplateInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *CatalogTemplateInterfaceMock) List(opts v1.ListOptions) (*v3.CatalogTemplateList, error) { + if mock.ListFunc == nil { + panic("CatalogTemplateInterfaceMock.ListFunc: method is nil but CatalogTemplateInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockCatalogTemplateInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockCatalogTemplateInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedCatalogTemplateInterface.ListCalls()) +func (mock *CatalogTemplateInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockCatalogTemplateInterfaceMockList.RLock() + calls = mock.calls.List + lockCatalogTemplateInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *CatalogTemplateInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("CatalogTemplateInterfaceMock.ObjectClientFunc: method is nil but CatalogTemplateInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockCatalogTemplateInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockCatalogTemplateInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedCatalogTemplateInterface.ObjectClientCalls()) +func (mock *CatalogTemplateInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockCatalogTemplateInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockCatalogTemplateInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *CatalogTemplateInterfaceMock) Update(in1 *v3.CatalogTemplate) (*v3.CatalogTemplate, error) { + if mock.UpdateFunc == nil { + panic("CatalogTemplateInterfaceMock.UpdateFunc: method is nil but CatalogTemplateInterface.Update was just called") + } + callInfo := struct { + In1 *v3.CatalogTemplate + }{ + In1: in1, + } + lockCatalogTemplateInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockCatalogTemplateInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedCatalogTemplateInterface.UpdateCalls()) +func (mock *CatalogTemplateInterfaceMock) UpdateCalls() []struct { + In1 *v3.CatalogTemplate +} { + var calls []struct { + In1 *v3.CatalogTemplate + } + lockCatalogTemplateInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockCatalogTemplateInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *CatalogTemplateInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("CatalogTemplateInterfaceMock.WatchFunc: method is nil but CatalogTemplateInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockCatalogTemplateInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockCatalogTemplateInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedCatalogTemplateInterface.WatchCalls()) +func (mock *CatalogTemplateInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockCatalogTemplateInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockCatalogTemplateInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockCatalogTemplatesGetterMockCatalogTemplates sync.RWMutex +) + +// Ensure, that CatalogTemplatesGetterMock does implement CatalogTemplatesGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.CatalogTemplatesGetter = &CatalogTemplatesGetterMock{} + +// CatalogTemplatesGetterMock is a mock implementation of CatalogTemplatesGetter. +// +// func TestSomethingThatUsesCatalogTemplatesGetter(t *testing.T) { +// +// // make and configure a mocked CatalogTemplatesGetter +// mockedCatalogTemplatesGetter := &CatalogTemplatesGetterMock{ +// CatalogTemplatesFunc: func(namespace string) v3.CatalogTemplateInterface { +// panic("mock out the CatalogTemplates method") +// }, +// } +// +// // use mockedCatalogTemplatesGetter in code that requires CatalogTemplatesGetter +// // and then make assertions. +// +// } +type CatalogTemplatesGetterMock struct { + // CatalogTemplatesFunc mocks the CatalogTemplates method. + CatalogTemplatesFunc func(namespace string) v3.CatalogTemplateInterface + + // calls tracks calls to the methods. + calls struct { + // CatalogTemplates holds details about calls to the CatalogTemplates method. + CatalogTemplates []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// CatalogTemplates calls CatalogTemplatesFunc. +func (mock *CatalogTemplatesGetterMock) CatalogTemplates(namespace string) v3.CatalogTemplateInterface { + if mock.CatalogTemplatesFunc == nil { + panic("CatalogTemplatesGetterMock.CatalogTemplatesFunc: method is nil but CatalogTemplatesGetter.CatalogTemplates was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockCatalogTemplatesGetterMockCatalogTemplates.Lock() + mock.calls.CatalogTemplates = append(mock.calls.CatalogTemplates, callInfo) + lockCatalogTemplatesGetterMockCatalogTemplates.Unlock() + return mock.CatalogTemplatesFunc(namespace) +} + +// CatalogTemplatesCalls gets all the calls that were made to CatalogTemplates. +// Check the length with: +// len(mockedCatalogTemplatesGetter.CatalogTemplatesCalls()) +func (mock *CatalogTemplatesGetterMock) CatalogTemplatesCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockCatalogTemplatesGetterMockCatalogTemplates.RLock() + calls = mock.calls.CatalogTemplates + lockCatalogTemplatesGetterMockCatalogTemplates.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_catalog_template_version_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_catalog_template_version_mock_test.go new file mode 100644 index 00000000..0c35213f --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_catalog_template_version_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockCatalogTemplateVersionListerMockGet sync.RWMutex + lockCatalogTemplateVersionListerMockList sync.RWMutex +) + +// Ensure, that CatalogTemplateVersionListerMock does implement CatalogTemplateVersionLister. +// If this is not the case, regenerate this file with moq. +var _ v3.CatalogTemplateVersionLister = &CatalogTemplateVersionListerMock{} + +// CatalogTemplateVersionListerMock is a mock implementation of CatalogTemplateVersionLister. +// +// func TestSomethingThatUsesCatalogTemplateVersionLister(t *testing.T) { +// +// // make and configure a mocked CatalogTemplateVersionLister +// mockedCatalogTemplateVersionLister := &CatalogTemplateVersionListerMock{ +// GetFunc: func(namespace string, name string) (*v3.CatalogTemplateVersion, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.CatalogTemplateVersion, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedCatalogTemplateVersionLister in code that requires CatalogTemplateVersionLister +// // and then make assertions. +// +// } +type CatalogTemplateVersionListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.CatalogTemplateVersion, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.CatalogTemplateVersion, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *CatalogTemplateVersionListerMock) Get(namespace string, name string) (*v3.CatalogTemplateVersion, error) { + if mock.GetFunc == nil { + panic("CatalogTemplateVersionListerMock.GetFunc: method is nil but CatalogTemplateVersionLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockCatalogTemplateVersionListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockCatalogTemplateVersionListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedCatalogTemplateVersionLister.GetCalls()) +func (mock *CatalogTemplateVersionListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockCatalogTemplateVersionListerMockGet.RLock() + calls = mock.calls.Get + lockCatalogTemplateVersionListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *CatalogTemplateVersionListerMock) List(namespace string, selector labels.Selector) ([]*v3.CatalogTemplateVersion, error) { + if mock.ListFunc == nil { + panic("CatalogTemplateVersionListerMock.ListFunc: method is nil but CatalogTemplateVersionLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockCatalogTemplateVersionListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockCatalogTemplateVersionListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedCatalogTemplateVersionLister.ListCalls()) +func (mock *CatalogTemplateVersionListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockCatalogTemplateVersionListerMockList.RLock() + calls = mock.calls.List + lockCatalogTemplateVersionListerMockList.RUnlock() + return calls +} + +var ( + lockCatalogTemplateVersionControllerMockAddClusterScopedHandler sync.RWMutex + lockCatalogTemplateVersionControllerMockAddHandler sync.RWMutex + lockCatalogTemplateVersionControllerMockEnqueue sync.RWMutex + lockCatalogTemplateVersionControllerMockGeneric sync.RWMutex + lockCatalogTemplateVersionControllerMockInformer sync.RWMutex + lockCatalogTemplateVersionControllerMockLister sync.RWMutex + lockCatalogTemplateVersionControllerMockStart sync.RWMutex + lockCatalogTemplateVersionControllerMockSync sync.RWMutex +) + +// Ensure, that CatalogTemplateVersionControllerMock does implement CatalogTemplateVersionController. +// If this is not the case, regenerate this file with moq. +var _ v3.CatalogTemplateVersionController = &CatalogTemplateVersionControllerMock{} + +// CatalogTemplateVersionControllerMock is a mock implementation of CatalogTemplateVersionController. +// +// func TestSomethingThatUsesCatalogTemplateVersionController(t *testing.T) { +// +// // make and configure a mocked CatalogTemplateVersionController +// mockedCatalogTemplateVersionController := &CatalogTemplateVersionControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.CatalogTemplateVersionHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.CatalogTemplateVersionHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.CatalogTemplateVersionLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedCatalogTemplateVersionController in code that requires CatalogTemplateVersionController +// // and then make assertions. +// +// } +type CatalogTemplateVersionControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.CatalogTemplateVersionHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.CatalogTemplateVersionHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.CatalogTemplateVersionLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.CatalogTemplateVersionHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.CatalogTemplateVersionHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *CatalogTemplateVersionControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.CatalogTemplateVersionHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("CatalogTemplateVersionControllerMock.AddClusterScopedHandlerFunc: method is nil but CatalogTemplateVersionController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.CatalogTemplateVersionHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockCatalogTemplateVersionControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockCatalogTemplateVersionControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedCatalogTemplateVersionController.AddClusterScopedHandlerCalls()) +func (mock *CatalogTemplateVersionControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.CatalogTemplateVersionHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.CatalogTemplateVersionHandlerFunc + } + lockCatalogTemplateVersionControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockCatalogTemplateVersionControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *CatalogTemplateVersionControllerMock) AddHandler(ctx context.Context, name string, handler v3.CatalogTemplateVersionHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("CatalogTemplateVersionControllerMock.AddHandlerFunc: method is nil but CatalogTemplateVersionController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.CatalogTemplateVersionHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockCatalogTemplateVersionControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockCatalogTemplateVersionControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedCatalogTemplateVersionController.AddHandlerCalls()) +func (mock *CatalogTemplateVersionControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.CatalogTemplateVersionHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.CatalogTemplateVersionHandlerFunc + } + lockCatalogTemplateVersionControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockCatalogTemplateVersionControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *CatalogTemplateVersionControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("CatalogTemplateVersionControllerMock.EnqueueFunc: method is nil but CatalogTemplateVersionController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockCatalogTemplateVersionControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockCatalogTemplateVersionControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedCatalogTemplateVersionController.EnqueueCalls()) +func (mock *CatalogTemplateVersionControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockCatalogTemplateVersionControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockCatalogTemplateVersionControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *CatalogTemplateVersionControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("CatalogTemplateVersionControllerMock.GenericFunc: method is nil but CatalogTemplateVersionController.Generic was just called") + } + callInfo := struct { + }{} + lockCatalogTemplateVersionControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockCatalogTemplateVersionControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedCatalogTemplateVersionController.GenericCalls()) +func (mock *CatalogTemplateVersionControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockCatalogTemplateVersionControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockCatalogTemplateVersionControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *CatalogTemplateVersionControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("CatalogTemplateVersionControllerMock.InformerFunc: method is nil but CatalogTemplateVersionController.Informer was just called") + } + callInfo := struct { + }{} + lockCatalogTemplateVersionControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockCatalogTemplateVersionControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedCatalogTemplateVersionController.InformerCalls()) +func (mock *CatalogTemplateVersionControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockCatalogTemplateVersionControllerMockInformer.RLock() + calls = mock.calls.Informer + lockCatalogTemplateVersionControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *CatalogTemplateVersionControllerMock) Lister() v3.CatalogTemplateVersionLister { + if mock.ListerFunc == nil { + panic("CatalogTemplateVersionControllerMock.ListerFunc: method is nil but CatalogTemplateVersionController.Lister was just called") + } + callInfo := struct { + }{} + lockCatalogTemplateVersionControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockCatalogTemplateVersionControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedCatalogTemplateVersionController.ListerCalls()) +func (mock *CatalogTemplateVersionControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockCatalogTemplateVersionControllerMockLister.RLock() + calls = mock.calls.Lister + lockCatalogTemplateVersionControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *CatalogTemplateVersionControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("CatalogTemplateVersionControllerMock.StartFunc: method is nil but CatalogTemplateVersionController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockCatalogTemplateVersionControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockCatalogTemplateVersionControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedCatalogTemplateVersionController.StartCalls()) +func (mock *CatalogTemplateVersionControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockCatalogTemplateVersionControllerMockStart.RLock() + calls = mock.calls.Start + lockCatalogTemplateVersionControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *CatalogTemplateVersionControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("CatalogTemplateVersionControllerMock.SyncFunc: method is nil but CatalogTemplateVersionController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockCatalogTemplateVersionControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockCatalogTemplateVersionControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedCatalogTemplateVersionController.SyncCalls()) +func (mock *CatalogTemplateVersionControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockCatalogTemplateVersionControllerMockSync.RLock() + calls = mock.calls.Sync + lockCatalogTemplateVersionControllerMockSync.RUnlock() + return calls +} + +var ( + lockCatalogTemplateVersionInterfaceMockAddClusterScopedHandler sync.RWMutex + lockCatalogTemplateVersionInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockCatalogTemplateVersionInterfaceMockAddHandler sync.RWMutex + lockCatalogTemplateVersionInterfaceMockAddLifecycle sync.RWMutex + lockCatalogTemplateVersionInterfaceMockController sync.RWMutex + lockCatalogTemplateVersionInterfaceMockCreate sync.RWMutex + lockCatalogTemplateVersionInterfaceMockDelete sync.RWMutex + lockCatalogTemplateVersionInterfaceMockDeleteCollection sync.RWMutex + lockCatalogTemplateVersionInterfaceMockDeleteNamespaced sync.RWMutex + lockCatalogTemplateVersionInterfaceMockGet sync.RWMutex + lockCatalogTemplateVersionInterfaceMockGetNamespaced sync.RWMutex + lockCatalogTemplateVersionInterfaceMockList sync.RWMutex + lockCatalogTemplateVersionInterfaceMockObjectClient sync.RWMutex + lockCatalogTemplateVersionInterfaceMockUpdate sync.RWMutex + lockCatalogTemplateVersionInterfaceMockWatch sync.RWMutex +) + +// Ensure, that CatalogTemplateVersionInterfaceMock does implement CatalogTemplateVersionInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.CatalogTemplateVersionInterface = &CatalogTemplateVersionInterfaceMock{} + +// CatalogTemplateVersionInterfaceMock is a mock implementation of CatalogTemplateVersionInterface. +// +// func TestSomethingThatUsesCatalogTemplateVersionInterface(t *testing.T) { +// +// // make and configure a mocked CatalogTemplateVersionInterface +// mockedCatalogTemplateVersionInterface := &CatalogTemplateVersionInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.CatalogTemplateVersionHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.CatalogTemplateVersionLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.CatalogTemplateVersionHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.CatalogTemplateVersionLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.CatalogTemplateVersionController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.CatalogTemplateVersion) (*v3.CatalogTemplateVersion, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.CatalogTemplateVersion, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.CatalogTemplateVersion, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.CatalogTemplateVersionList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.CatalogTemplateVersion) (*v3.CatalogTemplateVersion, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedCatalogTemplateVersionInterface in code that requires CatalogTemplateVersionInterface +// // and then make assertions. +// +// } +type CatalogTemplateVersionInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.CatalogTemplateVersionHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.CatalogTemplateVersionLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.CatalogTemplateVersionHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.CatalogTemplateVersionLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.CatalogTemplateVersionController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.CatalogTemplateVersion) (*v3.CatalogTemplateVersion, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.CatalogTemplateVersion, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.CatalogTemplateVersion, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.CatalogTemplateVersionList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.CatalogTemplateVersion) (*v3.CatalogTemplateVersion, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.CatalogTemplateVersionHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.CatalogTemplateVersionLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.CatalogTemplateVersionHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.CatalogTemplateVersionLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.CatalogTemplateVersion + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.CatalogTemplateVersion + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *CatalogTemplateVersionInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.CatalogTemplateVersionHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("CatalogTemplateVersionInterfaceMock.AddClusterScopedHandlerFunc: method is nil but CatalogTemplateVersionInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.CatalogTemplateVersionHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockCatalogTemplateVersionInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockCatalogTemplateVersionInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedCatalogTemplateVersionInterface.AddClusterScopedHandlerCalls()) +func (mock *CatalogTemplateVersionInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.CatalogTemplateVersionHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.CatalogTemplateVersionHandlerFunc + } + lockCatalogTemplateVersionInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockCatalogTemplateVersionInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *CatalogTemplateVersionInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.CatalogTemplateVersionLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("CatalogTemplateVersionInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but CatalogTemplateVersionInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.CatalogTemplateVersionLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockCatalogTemplateVersionInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockCatalogTemplateVersionInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedCatalogTemplateVersionInterface.AddClusterScopedLifecycleCalls()) +func (mock *CatalogTemplateVersionInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.CatalogTemplateVersionLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.CatalogTemplateVersionLifecycle + } + lockCatalogTemplateVersionInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockCatalogTemplateVersionInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *CatalogTemplateVersionInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.CatalogTemplateVersionHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("CatalogTemplateVersionInterfaceMock.AddHandlerFunc: method is nil but CatalogTemplateVersionInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.CatalogTemplateVersionHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockCatalogTemplateVersionInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockCatalogTemplateVersionInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedCatalogTemplateVersionInterface.AddHandlerCalls()) +func (mock *CatalogTemplateVersionInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.CatalogTemplateVersionHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.CatalogTemplateVersionHandlerFunc + } + lockCatalogTemplateVersionInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockCatalogTemplateVersionInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *CatalogTemplateVersionInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.CatalogTemplateVersionLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("CatalogTemplateVersionInterfaceMock.AddLifecycleFunc: method is nil but CatalogTemplateVersionInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.CatalogTemplateVersionLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockCatalogTemplateVersionInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockCatalogTemplateVersionInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedCatalogTemplateVersionInterface.AddLifecycleCalls()) +func (mock *CatalogTemplateVersionInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.CatalogTemplateVersionLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.CatalogTemplateVersionLifecycle + } + lockCatalogTemplateVersionInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockCatalogTemplateVersionInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *CatalogTemplateVersionInterfaceMock) Controller() v3.CatalogTemplateVersionController { + if mock.ControllerFunc == nil { + panic("CatalogTemplateVersionInterfaceMock.ControllerFunc: method is nil but CatalogTemplateVersionInterface.Controller was just called") + } + callInfo := struct { + }{} + lockCatalogTemplateVersionInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockCatalogTemplateVersionInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedCatalogTemplateVersionInterface.ControllerCalls()) +func (mock *CatalogTemplateVersionInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockCatalogTemplateVersionInterfaceMockController.RLock() + calls = mock.calls.Controller + lockCatalogTemplateVersionInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *CatalogTemplateVersionInterfaceMock) Create(in1 *v3.CatalogTemplateVersion) (*v3.CatalogTemplateVersion, error) { + if mock.CreateFunc == nil { + panic("CatalogTemplateVersionInterfaceMock.CreateFunc: method is nil but CatalogTemplateVersionInterface.Create was just called") + } + callInfo := struct { + In1 *v3.CatalogTemplateVersion + }{ + In1: in1, + } + lockCatalogTemplateVersionInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockCatalogTemplateVersionInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedCatalogTemplateVersionInterface.CreateCalls()) +func (mock *CatalogTemplateVersionInterfaceMock) CreateCalls() []struct { + In1 *v3.CatalogTemplateVersion +} { + var calls []struct { + In1 *v3.CatalogTemplateVersion + } + lockCatalogTemplateVersionInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockCatalogTemplateVersionInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *CatalogTemplateVersionInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("CatalogTemplateVersionInterfaceMock.DeleteFunc: method is nil but CatalogTemplateVersionInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockCatalogTemplateVersionInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockCatalogTemplateVersionInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedCatalogTemplateVersionInterface.DeleteCalls()) +func (mock *CatalogTemplateVersionInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockCatalogTemplateVersionInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockCatalogTemplateVersionInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *CatalogTemplateVersionInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("CatalogTemplateVersionInterfaceMock.DeleteCollectionFunc: method is nil but CatalogTemplateVersionInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockCatalogTemplateVersionInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockCatalogTemplateVersionInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedCatalogTemplateVersionInterface.DeleteCollectionCalls()) +func (mock *CatalogTemplateVersionInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockCatalogTemplateVersionInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockCatalogTemplateVersionInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *CatalogTemplateVersionInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("CatalogTemplateVersionInterfaceMock.DeleteNamespacedFunc: method is nil but CatalogTemplateVersionInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockCatalogTemplateVersionInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockCatalogTemplateVersionInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedCatalogTemplateVersionInterface.DeleteNamespacedCalls()) +func (mock *CatalogTemplateVersionInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockCatalogTemplateVersionInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockCatalogTemplateVersionInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *CatalogTemplateVersionInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.CatalogTemplateVersion, error) { + if mock.GetFunc == nil { + panic("CatalogTemplateVersionInterfaceMock.GetFunc: method is nil but CatalogTemplateVersionInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockCatalogTemplateVersionInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockCatalogTemplateVersionInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedCatalogTemplateVersionInterface.GetCalls()) +func (mock *CatalogTemplateVersionInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockCatalogTemplateVersionInterfaceMockGet.RLock() + calls = mock.calls.Get + lockCatalogTemplateVersionInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *CatalogTemplateVersionInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.CatalogTemplateVersion, error) { + if mock.GetNamespacedFunc == nil { + panic("CatalogTemplateVersionInterfaceMock.GetNamespacedFunc: method is nil but CatalogTemplateVersionInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockCatalogTemplateVersionInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockCatalogTemplateVersionInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedCatalogTemplateVersionInterface.GetNamespacedCalls()) +func (mock *CatalogTemplateVersionInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockCatalogTemplateVersionInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockCatalogTemplateVersionInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *CatalogTemplateVersionInterfaceMock) List(opts v1.ListOptions) (*v3.CatalogTemplateVersionList, error) { + if mock.ListFunc == nil { + panic("CatalogTemplateVersionInterfaceMock.ListFunc: method is nil but CatalogTemplateVersionInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockCatalogTemplateVersionInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockCatalogTemplateVersionInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedCatalogTemplateVersionInterface.ListCalls()) +func (mock *CatalogTemplateVersionInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockCatalogTemplateVersionInterfaceMockList.RLock() + calls = mock.calls.List + lockCatalogTemplateVersionInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *CatalogTemplateVersionInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("CatalogTemplateVersionInterfaceMock.ObjectClientFunc: method is nil but CatalogTemplateVersionInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockCatalogTemplateVersionInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockCatalogTemplateVersionInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedCatalogTemplateVersionInterface.ObjectClientCalls()) +func (mock *CatalogTemplateVersionInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockCatalogTemplateVersionInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockCatalogTemplateVersionInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *CatalogTemplateVersionInterfaceMock) Update(in1 *v3.CatalogTemplateVersion) (*v3.CatalogTemplateVersion, error) { + if mock.UpdateFunc == nil { + panic("CatalogTemplateVersionInterfaceMock.UpdateFunc: method is nil but CatalogTemplateVersionInterface.Update was just called") + } + callInfo := struct { + In1 *v3.CatalogTemplateVersion + }{ + In1: in1, + } + lockCatalogTemplateVersionInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockCatalogTemplateVersionInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedCatalogTemplateVersionInterface.UpdateCalls()) +func (mock *CatalogTemplateVersionInterfaceMock) UpdateCalls() []struct { + In1 *v3.CatalogTemplateVersion +} { + var calls []struct { + In1 *v3.CatalogTemplateVersion + } + lockCatalogTemplateVersionInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockCatalogTemplateVersionInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *CatalogTemplateVersionInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("CatalogTemplateVersionInterfaceMock.WatchFunc: method is nil but CatalogTemplateVersionInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockCatalogTemplateVersionInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockCatalogTemplateVersionInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedCatalogTemplateVersionInterface.WatchCalls()) +func (mock *CatalogTemplateVersionInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockCatalogTemplateVersionInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockCatalogTemplateVersionInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockCatalogTemplateVersionsGetterMockCatalogTemplateVersions sync.RWMutex +) + +// Ensure, that CatalogTemplateVersionsGetterMock does implement CatalogTemplateVersionsGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.CatalogTemplateVersionsGetter = &CatalogTemplateVersionsGetterMock{} + +// CatalogTemplateVersionsGetterMock is a mock implementation of CatalogTemplateVersionsGetter. +// +// func TestSomethingThatUsesCatalogTemplateVersionsGetter(t *testing.T) { +// +// // make and configure a mocked CatalogTemplateVersionsGetter +// mockedCatalogTemplateVersionsGetter := &CatalogTemplateVersionsGetterMock{ +// CatalogTemplateVersionsFunc: func(namespace string) v3.CatalogTemplateVersionInterface { +// panic("mock out the CatalogTemplateVersions method") +// }, +// } +// +// // use mockedCatalogTemplateVersionsGetter in code that requires CatalogTemplateVersionsGetter +// // and then make assertions. +// +// } +type CatalogTemplateVersionsGetterMock struct { + // CatalogTemplateVersionsFunc mocks the CatalogTemplateVersions method. + CatalogTemplateVersionsFunc func(namespace string) v3.CatalogTemplateVersionInterface + + // calls tracks calls to the methods. + calls struct { + // CatalogTemplateVersions holds details about calls to the CatalogTemplateVersions method. + CatalogTemplateVersions []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// CatalogTemplateVersions calls CatalogTemplateVersionsFunc. +func (mock *CatalogTemplateVersionsGetterMock) CatalogTemplateVersions(namespace string) v3.CatalogTemplateVersionInterface { + if mock.CatalogTemplateVersionsFunc == nil { + panic("CatalogTemplateVersionsGetterMock.CatalogTemplateVersionsFunc: method is nil but CatalogTemplateVersionsGetter.CatalogTemplateVersions was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockCatalogTemplateVersionsGetterMockCatalogTemplateVersions.Lock() + mock.calls.CatalogTemplateVersions = append(mock.calls.CatalogTemplateVersions, callInfo) + lockCatalogTemplateVersionsGetterMockCatalogTemplateVersions.Unlock() + return mock.CatalogTemplateVersionsFunc(namespace) +} + +// CatalogTemplateVersionsCalls gets all the calls that were made to CatalogTemplateVersions. +// Check the length with: +// len(mockedCatalogTemplateVersionsGetter.CatalogTemplateVersionsCalls()) +func (mock *CatalogTemplateVersionsGetterMock) CatalogTemplateVersionsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockCatalogTemplateVersionsGetterMockCatalogTemplateVersions.RLock() + calls = mock.calls.CatalogTemplateVersions + lockCatalogTemplateVersionsGetterMockCatalogTemplateVersions.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_cloud_credential_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_cloud_credential_mock_test.go new file mode 100644 index 00000000..820755d9 --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_cloud_credential_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockCloudCredentialListerMockGet sync.RWMutex + lockCloudCredentialListerMockList sync.RWMutex +) + +// Ensure, that CloudCredentialListerMock does implement CloudCredentialLister. +// If this is not the case, regenerate this file with moq. +var _ v3.CloudCredentialLister = &CloudCredentialListerMock{} + +// CloudCredentialListerMock is a mock implementation of CloudCredentialLister. +// +// func TestSomethingThatUsesCloudCredentialLister(t *testing.T) { +// +// // make and configure a mocked CloudCredentialLister +// mockedCloudCredentialLister := &CloudCredentialListerMock{ +// GetFunc: func(namespace string, name string) (*v3.CloudCredential, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.CloudCredential, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedCloudCredentialLister in code that requires CloudCredentialLister +// // and then make assertions. +// +// } +type CloudCredentialListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.CloudCredential, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.CloudCredential, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *CloudCredentialListerMock) Get(namespace string, name string) (*v3.CloudCredential, error) { + if mock.GetFunc == nil { + panic("CloudCredentialListerMock.GetFunc: method is nil but CloudCredentialLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockCloudCredentialListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockCloudCredentialListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedCloudCredentialLister.GetCalls()) +func (mock *CloudCredentialListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockCloudCredentialListerMockGet.RLock() + calls = mock.calls.Get + lockCloudCredentialListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *CloudCredentialListerMock) List(namespace string, selector labels.Selector) ([]*v3.CloudCredential, error) { + if mock.ListFunc == nil { + panic("CloudCredentialListerMock.ListFunc: method is nil but CloudCredentialLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockCloudCredentialListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockCloudCredentialListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedCloudCredentialLister.ListCalls()) +func (mock *CloudCredentialListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockCloudCredentialListerMockList.RLock() + calls = mock.calls.List + lockCloudCredentialListerMockList.RUnlock() + return calls +} + +var ( + lockCloudCredentialControllerMockAddClusterScopedHandler sync.RWMutex + lockCloudCredentialControllerMockAddHandler sync.RWMutex + lockCloudCredentialControllerMockEnqueue sync.RWMutex + lockCloudCredentialControllerMockGeneric sync.RWMutex + lockCloudCredentialControllerMockInformer sync.RWMutex + lockCloudCredentialControllerMockLister sync.RWMutex + lockCloudCredentialControllerMockStart sync.RWMutex + lockCloudCredentialControllerMockSync sync.RWMutex +) + +// Ensure, that CloudCredentialControllerMock does implement CloudCredentialController. +// If this is not the case, regenerate this file with moq. +var _ v3.CloudCredentialController = &CloudCredentialControllerMock{} + +// CloudCredentialControllerMock is a mock implementation of CloudCredentialController. +// +// func TestSomethingThatUsesCloudCredentialController(t *testing.T) { +// +// // make and configure a mocked CloudCredentialController +// mockedCloudCredentialController := &CloudCredentialControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.CloudCredentialHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.CloudCredentialHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.CloudCredentialLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedCloudCredentialController in code that requires CloudCredentialController +// // and then make assertions. +// +// } +type CloudCredentialControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.CloudCredentialHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.CloudCredentialHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.CloudCredentialLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.CloudCredentialHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.CloudCredentialHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *CloudCredentialControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.CloudCredentialHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("CloudCredentialControllerMock.AddClusterScopedHandlerFunc: method is nil but CloudCredentialController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.CloudCredentialHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockCloudCredentialControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockCloudCredentialControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedCloudCredentialController.AddClusterScopedHandlerCalls()) +func (mock *CloudCredentialControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.CloudCredentialHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.CloudCredentialHandlerFunc + } + lockCloudCredentialControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockCloudCredentialControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *CloudCredentialControllerMock) AddHandler(ctx context.Context, name string, handler v3.CloudCredentialHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("CloudCredentialControllerMock.AddHandlerFunc: method is nil but CloudCredentialController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.CloudCredentialHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockCloudCredentialControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockCloudCredentialControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedCloudCredentialController.AddHandlerCalls()) +func (mock *CloudCredentialControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.CloudCredentialHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.CloudCredentialHandlerFunc + } + lockCloudCredentialControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockCloudCredentialControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *CloudCredentialControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("CloudCredentialControllerMock.EnqueueFunc: method is nil but CloudCredentialController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockCloudCredentialControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockCloudCredentialControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedCloudCredentialController.EnqueueCalls()) +func (mock *CloudCredentialControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockCloudCredentialControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockCloudCredentialControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *CloudCredentialControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("CloudCredentialControllerMock.GenericFunc: method is nil but CloudCredentialController.Generic was just called") + } + callInfo := struct { + }{} + lockCloudCredentialControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockCloudCredentialControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedCloudCredentialController.GenericCalls()) +func (mock *CloudCredentialControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockCloudCredentialControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockCloudCredentialControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *CloudCredentialControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("CloudCredentialControllerMock.InformerFunc: method is nil but CloudCredentialController.Informer was just called") + } + callInfo := struct { + }{} + lockCloudCredentialControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockCloudCredentialControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedCloudCredentialController.InformerCalls()) +func (mock *CloudCredentialControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockCloudCredentialControllerMockInformer.RLock() + calls = mock.calls.Informer + lockCloudCredentialControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *CloudCredentialControllerMock) Lister() v3.CloudCredentialLister { + if mock.ListerFunc == nil { + panic("CloudCredentialControllerMock.ListerFunc: method is nil but CloudCredentialController.Lister was just called") + } + callInfo := struct { + }{} + lockCloudCredentialControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockCloudCredentialControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedCloudCredentialController.ListerCalls()) +func (mock *CloudCredentialControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockCloudCredentialControllerMockLister.RLock() + calls = mock.calls.Lister + lockCloudCredentialControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *CloudCredentialControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("CloudCredentialControllerMock.StartFunc: method is nil but CloudCredentialController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockCloudCredentialControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockCloudCredentialControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedCloudCredentialController.StartCalls()) +func (mock *CloudCredentialControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockCloudCredentialControllerMockStart.RLock() + calls = mock.calls.Start + lockCloudCredentialControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *CloudCredentialControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("CloudCredentialControllerMock.SyncFunc: method is nil but CloudCredentialController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockCloudCredentialControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockCloudCredentialControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedCloudCredentialController.SyncCalls()) +func (mock *CloudCredentialControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockCloudCredentialControllerMockSync.RLock() + calls = mock.calls.Sync + lockCloudCredentialControllerMockSync.RUnlock() + return calls +} + +var ( + lockCloudCredentialInterfaceMockAddClusterScopedHandler sync.RWMutex + lockCloudCredentialInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockCloudCredentialInterfaceMockAddHandler sync.RWMutex + lockCloudCredentialInterfaceMockAddLifecycle sync.RWMutex + lockCloudCredentialInterfaceMockController sync.RWMutex + lockCloudCredentialInterfaceMockCreate sync.RWMutex + lockCloudCredentialInterfaceMockDelete sync.RWMutex + lockCloudCredentialInterfaceMockDeleteCollection sync.RWMutex + lockCloudCredentialInterfaceMockDeleteNamespaced sync.RWMutex + lockCloudCredentialInterfaceMockGet sync.RWMutex + lockCloudCredentialInterfaceMockGetNamespaced sync.RWMutex + lockCloudCredentialInterfaceMockList sync.RWMutex + lockCloudCredentialInterfaceMockObjectClient sync.RWMutex + lockCloudCredentialInterfaceMockUpdate sync.RWMutex + lockCloudCredentialInterfaceMockWatch sync.RWMutex +) + +// Ensure, that CloudCredentialInterfaceMock does implement CloudCredentialInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.CloudCredentialInterface = &CloudCredentialInterfaceMock{} + +// CloudCredentialInterfaceMock is a mock implementation of CloudCredentialInterface. +// +// func TestSomethingThatUsesCloudCredentialInterface(t *testing.T) { +// +// // make and configure a mocked CloudCredentialInterface +// mockedCloudCredentialInterface := &CloudCredentialInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.CloudCredentialHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.CloudCredentialLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.CloudCredentialHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.CloudCredentialLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.CloudCredentialController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.CloudCredential) (*v3.CloudCredential, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.CloudCredential, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.CloudCredential, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.CloudCredentialList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.CloudCredential) (*v3.CloudCredential, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedCloudCredentialInterface in code that requires CloudCredentialInterface +// // and then make assertions. +// +// } +type CloudCredentialInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.CloudCredentialHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.CloudCredentialLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.CloudCredentialHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.CloudCredentialLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.CloudCredentialController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.CloudCredential) (*v3.CloudCredential, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.CloudCredential, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.CloudCredential, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.CloudCredentialList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.CloudCredential) (*v3.CloudCredential, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.CloudCredentialHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.CloudCredentialLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.CloudCredentialHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.CloudCredentialLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.CloudCredential + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.CloudCredential + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *CloudCredentialInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.CloudCredentialHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("CloudCredentialInterfaceMock.AddClusterScopedHandlerFunc: method is nil but CloudCredentialInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.CloudCredentialHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockCloudCredentialInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockCloudCredentialInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedCloudCredentialInterface.AddClusterScopedHandlerCalls()) +func (mock *CloudCredentialInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.CloudCredentialHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.CloudCredentialHandlerFunc + } + lockCloudCredentialInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockCloudCredentialInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *CloudCredentialInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.CloudCredentialLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("CloudCredentialInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but CloudCredentialInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.CloudCredentialLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockCloudCredentialInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockCloudCredentialInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedCloudCredentialInterface.AddClusterScopedLifecycleCalls()) +func (mock *CloudCredentialInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.CloudCredentialLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.CloudCredentialLifecycle + } + lockCloudCredentialInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockCloudCredentialInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *CloudCredentialInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.CloudCredentialHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("CloudCredentialInterfaceMock.AddHandlerFunc: method is nil but CloudCredentialInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.CloudCredentialHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockCloudCredentialInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockCloudCredentialInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedCloudCredentialInterface.AddHandlerCalls()) +func (mock *CloudCredentialInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.CloudCredentialHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.CloudCredentialHandlerFunc + } + lockCloudCredentialInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockCloudCredentialInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *CloudCredentialInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.CloudCredentialLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("CloudCredentialInterfaceMock.AddLifecycleFunc: method is nil but CloudCredentialInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.CloudCredentialLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockCloudCredentialInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockCloudCredentialInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedCloudCredentialInterface.AddLifecycleCalls()) +func (mock *CloudCredentialInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.CloudCredentialLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.CloudCredentialLifecycle + } + lockCloudCredentialInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockCloudCredentialInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *CloudCredentialInterfaceMock) Controller() v3.CloudCredentialController { + if mock.ControllerFunc == nil { + panic("CloudCredentialInterfaceMock.ControllerFunc: method is nil but CloudCredentialInterface.Controller was just called") + } + callInfo := struct { + }{} + lockCloudCredentialInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockCloudCredentialInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedCloudCredentialInterface.ControllerCalls()) +func (mock *CloudCredentialInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockCloudCredentialInterfaceMockController.RLock() + calls = mock.calls.Controller + lockCloudCredentialInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *CloudCredentialInterfaceMock) Create(in1 *v3.CloudCredential) (*v3.CloudCredential, error) { + if mock.CreateFunc == nil { + panic("CloudCredentialInterfaceMock.CreateFunc: method is nil but CloudCredentialInterface.Create was just called") + } + callInfo := struct { + In1 *v3.CloudCredential + }{ + In1: in1, + } + lockCloudCredentialInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockCloudCredentialInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedCloudCredentialInterface.CreateCalls()) +func (mock *CloudCredentialInterfaceMock) CreateCalls() []struct { + In1 *v3.CloudCredential +} { + var calls []struct { + In1 *v3.CloudCredential + } + lockCloudCredentialInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockCloudCredentialInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *CloudCredentialInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("CloudCredentialInterfaceMock.DeleteFunc: method is nil but CloudCredentialInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockCloudCredentialInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockCloudCredentialInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedCloudCredentialInterface.DeleteCalls()) +func (mock *CloudCredentialInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockCloudCredentialInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockCloudCredentialInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *CloudCredentialInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("CloudCredentialInterfaceMock.DeleteCollectionFunc: method is nil but CloudCredentialInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockCloudCredentialInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockCloudCredentialInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedCloudCredentialInterface.DeleteCollectionCalls()) +func (mock *CloudCredentialInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockCloudCredentialInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockCloudCredentialInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *CloudCredentialInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("CloudCredentialInterfaceMock.DeleteNamespacedFunc: method is nil but CloudCredentialInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockCloudCredentialInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockCloudCredentialInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedCloudCredentialInterface.DeleteNamespacedCalls()) +func (mock *CloudCredentialInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockCloudCredentialInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockCloudCredentialInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *CloudCredentialInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.CloudCredential, error) { + if mock.GetFunc == nil { + panic("CloudCredentialInterfaceMock.GetFunc: method is nil but CloudCredentialInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockCloudCredentialInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockCloudCredentialInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedCloudCredentialInterface.GetCalls()) +func (mock *CloudCredentialInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockCloudCredentialInterfaceMockGet.RLock() + calls = mock.calls.Get + lockCloudCredentialInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *CloudCredentialInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.CloudCredential, error) { + if mock.GetNamespacedFunc == nil { + panic("CloudCredentialInterfaceMock.GetNamespacedFunc: method is nil but CloudCredentialInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockCloudCredentialInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockCloudCredentialInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedCloudCredentialInterface.GetNamespacedCalls()) +func (mock *CloudCredentialInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockCloudCredentialInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockCloudCredentialInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *CloudCredentialInterfaceMock) List(opts v1.ListOptions) (*v3.CloudCredentialList, error) { + if mock.ListFunc == nil { + panic("CloudCredentialInterfaceMock.ListFunc: method is nil but CloudCredentialInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockCloudCredentialInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockCloudCredentialInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedCloudCredentialInterface.ListCalls()) +func (mock *CloudCredentialInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockCloudCredentialInterfaceMockList.RLock() + calls = mock.calls.List + lockCloudCredentialInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *CloudCredentialInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("CloudCredentialInterfaceMock.ObjectClientFunc: method is nil but CloudCredentialInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockCloudCredentialInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockCloudCredentialInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedCloudCredentialInterface.ObjectClientCalls()) +func (mock *CloudCredentialInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockCloudCredentialInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockCloudCredentialInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *CloudCredentialInterfaceMock) Update(in1 *v3.CloudCredential) (*v3.CloudCredential, error) { + if mock.UpdateFunc == nil { + panic("CloudCredentialInterfaceMock.UpdateFunc: method is nil but CloudCredentialInterface.Update was just called") + } + callInfo := struct { + In1 *v3.CloudCredential + }{ + In1: in1, + } + lockCloudCredentialInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockCloudCredentialInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedCloudCredentialInterface.UpdateCalls()) +func (mock *CloudCredentialInterfaceMock) UpdateCalls() []struct { + In1 *v3.CloudCredential +} { + var calls []struct { + In1 *v3.CloudCredential + } + lockCloudCredentialInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockCloudCredentialInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *CloudCredentialInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("CloudCredentialInterfaceMock.WatchFunc: method is nil but CloudCredentialInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockCloudCredentialInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockCloudCredentialInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedCloudCredentialInterface.WatchCalls()) +func (mock *CloudCredentialInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockCloudCredentialInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockCloudCredentialInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockCloudCredentialsGetterMockCloudCredentials sync.RWMutex +) + +// Ensure, that CloudCredentialsGetterMock does implement CloudCredentialsGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.CloudCredentialsGetter = &CloudCredentialsGetterMock{} + +// CloudCredentialsGetterMock is a mock implementation of CloudCredentialsGetter. +// +// func TestSomethingThatUsesCloudCredentialsGetter(t *testing.T) { +// +// // make and configure a mocked CloudCredentialsGetter +// mockedCloudCredentialsGetter := &CloudCredentialsGetterMock{ +// CloudCredentialsFunc: func(namespace string) v3.CloudCredentialInterface { +// panic("mock out the CloudCredentials method") +// }, +// } +// +// // use mockedCloudCredentialsGetter in code that requires CloudCredentialsGetter +// // and then make assertions. +// +// } +type CloudCredentialsGetterMock struct { + // CloudCredentialsFunc mocks the CloudCredentials method. + CloudCredentialsFunc func(namespace string) v3.CloudCredentialInterface + + // calls tracks calls to the methods. + calls struct { + // CloudCredentials holds details about calls to the CloudCredentials method. + CloudCredentials []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// CloudCredentials calls CloudCredentialsFunc. +func (mock *CloudCredentialsGetterMock) CloudCredentials(namespace string) v3.CloudCredentialInterface { + if mock.CloudCredentialsFunc == nil { + panic("CloudCredentialsGetterMock.CloudCredentialsFunc: method is nil but CloudCredentialsGetter.CloudCredentials was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockCloudCredentialsGetterMockCloudCredentials.Lock() + mock.calls.CloudCredentials = append(mock.calls.CloudCredentials, callInfo) + lockCloudCredentialsGetterMockCloudCredentials.Unlock() + return mock.CloudCredentialsFunc(namespace) +} + +// CloudCredentialsCalls gets all the calls that were made to CloudCredentials. +// Check the length with: +// len(mockedCloudCredentialsGetter.CloudCredentialsCalls()) +func (mock *CloudCredentialsGetterMock) CloudCredentialsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockCloudCredentialsGetterMockCloudCredentials.RLock() + calls = mock.calls.CloudCredentials + lockCloudCredentialsGetterMockCloudCredentials.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_cluster_alert_group_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_cluster_alert_group_mock_test.go new file mode 100644 index 00000000..59853950 --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_cluster_alert_group_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockClusterAlertGroupListerMockGet sync.RWMutex + lockClusterAlertGroupListerMockList sync.RWMutex +) + +// Ensure, that ClusterAlertGroupListerMock does implement ClusterAlertGroupLister. +// If this is not the case, regenerate this file with moq. +var _ v3.ClusterAlertGroupLister = &ClusterAlertGroupListerMock{} + +// ClusterAlertGroupListerMock is a mock implementation of ClusterAlertGroupLister. +// +// func TestSomethingThatUsesClusterAlertGroupLister(t *testing.T) { +// +// // make and configure a mocked ClusterAlertGroupLister +// mockedClusterAlertGroupLister := &ClusterAlertGroupListerMock{ +// GetFunc: func(namespace string, name string) (*v3.ClusterAlertGroup, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.ClusterAlertGroup, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedClusterAlertGroupLister in code that requires ClusterAlertGroupLister +// // and then make assertions. +// +// } +type ClusterAlertGroupListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.ClusterAlertGroup, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.ClusterAlertGroup, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *ClusterAlertGroupListerMock) Get(namespace string, name string) (*v3.ClusterAlertGroup, error) { + if mock.GetFunc == nil { + panic("ClusterAlertGroupListerMock.GetFunc: method is nil but ClusterAlertGroupLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockClusterAlertGroupListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockClusterAlertGroupListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedClusterAlertGroupLister.GetCalls()) +func (mock *ClusterAlertGroupListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockClusterAlertGroupListerMockGet.RLock() + calls = mock.calls.Get + lockClusterAlertGroupListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ClusterAlertGroupListerMock) List(namespace string, selector labels.Selector) ([]*v3.ClusterAlertGroup, error) { + if mock.ListFunc == nil { + panic("ClusterAlertGroupListerMock.ListFunc: method is nil but ClusterAlertGroupLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockClusterAlertGroupListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockClusterAlertGroupListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedClusterAlertGroupLister.ListCalls()) +func (mock *ClusterAlertGroupListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockClusterAlertGroupListerMockList.RLock() + calls = mock.calls.List + lockClusterAlertGroupListerMockList.RUnlock() + return calls +} + +var ( + lockClusterAlertGroupControllerMockAddClusterScopedHandler sync.RWMutex + lockClusterAlertGroupControllerMockAddHandler sync.RWMutex + lockClusterAlertGroupControllerMockEnqueue sync.RWMutex + lockClusterAlertGroupControllerMockGeneric sync.RWMutex + lockClusterAlertGroupControllerMockInformer sync.RWMutex + lockClusterAlertGroupControllerMockLister sync.RWMutex + lockClusterAlertGroupControllerMockStart sync.RWMutex + lockClusterAlertGroupControllerMockSync sync.RWMutex +) + +// Ensure, that ClusterAlertGroupControllerMock does implement ClusterAlertGroupController. +// If this is not the case, regenerate this file with moq. +var _ v3.ClusterAlertGroupController = &ClusterAlertGroupControllerMock{} + +// ClusterAlertGroupControllerMock is a mock implementation of ClusterAlertGroupController. +// +// func TestSomethingThatUsesClusterAlertGroupController(t *testing.T) { +// +// // make and configure a mocked ClusterAlertGroupController +// mockedClusterAlertGroupController := &ClusterAlertGroupControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.ClusterAlertGroupHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.ClusterAlertGroupHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.ClusterAlertGroupLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedClusterAlertGroupController in code that requires ClusterAlertGroupController +// // and then make assertions. +// +// } +type ClusterAlertGroupControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.ClusterAlertGroupHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.ClusterAlertGroupHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.ClusterAlertGroupLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.ClusterAlertGroupHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.ClusterAlertGroupHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ClusterAlertGroupControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.ClusterAlertGroupHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ClusterAlertGroupControllerMock.AddClusterScopedHandlerFunc: method is nil but ClusterAlertGroupController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ClusterAlertGroupHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockClusterAlertGroupControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockClusterAlertGroupControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedClusterAlertGroupController.AddClusterScopedHandlerCalls()) +func (mock *ClusterAlertGroupControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ClusterAlertGroupHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ClusterAlertGroupHandlerFunc + } + lockClusterAlertGroupControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockClusterAlertGroupControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ClusterAlertGroupControllerMock) AddHandler(ctx context.Context, name string, handler v3.ClusterAlertGroupHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ClusterAlertGroupControllerMock.AddHandlerFunc: method is nil but ClusterAlertGroupController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.ClusterAlertGroupHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockClusterAlertGroupControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockClusterAlertGroupControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedClusterAlertGroupController.AddHandlerCalls()) +func (mock *ClusterAlertGroupControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.ClusterAlertGroupHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.ClusterAlertGroupHandlerFunc + } + lockClusterAlertGroupControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockClusterAlertGroupControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *ClusterAlertGroupControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("ClusterAlertGroupControllerMock.EnqueueFunc: method is nil but ClusterAlertGroupController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockClusterAlertGroupControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockClusterAlertGroupControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedClusterAlertGroupController.EnqueueCalls()) +func (mock *ClusterAlertGroupControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockClusterAlertGroupControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockClusterAlertGroupControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *ClusterAlertGroupControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("ClusterAlertGroupControllerMock.GenericFunc: method is nil but ClusterAlertGroupController.Generic was just called") + } + callInfo := struct { + }{} + lockClusterAlertGroupControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockClusterAlertGroupControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedClusterAlertGroupController.GenericCalls()) +func (mock *ClusterAlertGroupControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockClusterAlertGroupControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockClusterAlertGroupControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *ClusterAlertGroupControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("ClusterAlertGroupControllerMock.InformerFunc: method is nil but ClusterAlertGroupController.Informer was just called") + } + callInfo := struct { + }{} + lockClusterAlertGroupControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockClusterAlertGroupControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedClusterAlertGroupController.InformerCalls()) +func (mock *ClusterAlertGroupControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockClusterAlertGroupControllerMockInformer.RLock() + calls = mock.calls.Informer + lockClusterAlertGroupControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *ClusterAlertGroupControllerMock) Lister() v3.ClusterAlertGroupLister { + if mock.ListerFunc == nil { + panic("ClusterAlertGroupControllerMock.ListerFunc: method is nil but ClusterAlertGroupController.Lister was just called") + } + callInfo := struct { + }{} + lockClusterAlertGroupControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockClusterAlertGroupControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedClusterAlertGroupController.ListerCalls()) +func (mock *ClusterAlertGroupControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockClusterAlertGroupControllerMockLister.RLock() + calls = mock.calls.Lister + lockClusterAlertGroupControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *ClusterAlertGroupControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("ClusterAlertGroupControllerMock.StartFunc: method is nil but ClusterAlertGroupController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockClusterAlertGroupControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockClusterAlertGroupControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedClusterAlertGroupController.StartCalls()) +func (mock *ClusterAlertGroupControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockClusterAlertGroupControllerMockStart.RLock() + calls = mock.calls.Start + lockClusterAlertGroupControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *ClusterAlertGroupControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("ClusterAlertGroupControllerMock.SyncFunc: method is nil but ClusterAlertGroupController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockClusterAlertGroupControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockClusterAlertGroupControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedClusterAlertGroupController.SyncCalls()) +func (mock *ClusterAlertGroupControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockClusterAlertGroupControllerMockSync.RLock() + calls = mock.calls.Sync + lockClusterAlertGroupControllerMockSync.RUnlock() + return calls +} + +var ( + lockClusterAlertGroupInterfaceMockAddClusterScopedHandler sync.RWMutex + lockClusterAlertGroupInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockClusterAlertGroupInterfaceMockAddHandler sync.RWMutex + lockClusterAlertGroupInterfaceMockAddLifecycle sync.RWMutex + lockClusterAlertGroupInterfaceMockController sync.RWMutex + lockClusterAlertGroupInterfaceMockCreate sync.RWMutex + lockClusterAlertGroupInterfaceMockDelete sync.RWMutex + lockClusterAlertGroupInterfaceMockDeleteCollection sync.RWMutex + lockClusterAlertGroupInterfaceMockDeleteNamespaced sync.RWMutex + lockClusterAlertGroupInterfaceMockGet sync.RWMutex + lockClusterAlertGroupInterfaceMockGetNamespaced sync.RWMutex + lockClusterAlertGroupInterfaceMockList sync.RWMutex + lockClusterAlertGroupInterfaceMockObjectClient sync.RWMutex + lockClusterAlertGroupInterfaceMockUpdate sync.RWMutex + lockClusterAlertGroupInterfaceMockWatch sync.RWMutex +) + +// Ensure, that ClusterAlertGroupInterfaceMock does implement ClusterAlertGroupInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.ClusterAlertGroupInterface = &ClusterAlertGroupInterfaceMock{} + +// ClusterAlertGroupInterfaceMock is a mock implementation of ClusterAlertGroupInterface. +// +// func TestSomethingThatUsesClusterAlertGroupInterface(t *testing.T) { +// +// // make and configure a mocked ClusterAlertGroupInterface +// mockedClusterAlertGroupInterface := &ClusterAlertGroupInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.ClusterAlertGroupHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.ClusterAlertGroupLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.ClusterAlertGroupHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.ClusterAlertGroupLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.ClusterAlertGroupController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.ClusterAlertGroup) (*v3.ClusterAlertGroup, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.ClusterAlertGroup, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.ClusterAlertGroup, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.ClusterAlertGroupList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.ClusterAlertGroup) (*v3.ClusterAlertGroup, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedClusterAlertGroupInterface in code that requires ClusterAlertGroupInterface +// // and then make assertions. +// +// } +type ClusterAlertGroupInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.ClusterAlertGroupHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.ClusterAlertGroupLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.ClusterAlertGroupHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.ClusterAlertGroupLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.ClusterAlertGroupController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.ClusterAlertGroup) (*v3.ClusterAlertGroup, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.ClusterAlertGroup, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.ClusterAlertGroup, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.ClusterAlertGroupList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.ClusterAlertGroup) (*v3.ClusterAlertGroup, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.ClusterAlertGroupHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.ClusterAlertGroupLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.ClusterAlertGroupHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.ClusterAlertGroupLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.ClusterAlertGroup + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.ClusterAlertGroup + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ClusterAlertGroupInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.ClusterAlertGroupHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ClusterAlertGroupInterfaceMock.AddClusterScopedHandlerFunc: method is nil but ClusterAlertGroupInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ClusterAlertGroupHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockClusterAlertGroupInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockClusterAlertGroupInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedClusterAlertGroupInterface.AddClusterScopedHandlerCalls()) +func (mock *ClusterAlertGroupInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ClusterAlertGroupHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ClusterAlertGroupHandlerFunc + } + lockClusterAlertGroupInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockClusterAlertGroupInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *ClusterAlertGroupInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.ClusterAlertGroupLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("ClusterAlertGroupInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but ClusterAlertGroupInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ClusterAlertGroupLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockClusterAlertGroupInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockClusterAlertGroupInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedClusterAlertGroupInterface.AddClusterScopedLifecycleCalls()) +func (mock *ClusterAlertGroupInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ClusterAlertGroupLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ClusterAlertGroupLifecycle + } + lockClusterAlertGroupInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockClusterAlertGroupInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ClusterAlertGroupInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.ClusterAlertGroupHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ClusterAlertGroupInterfaceMock.AddHandlerFunc: method is nil but ClusterAlertGroupInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.ClusterAlertGroupHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockClusterAlertGroupInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockClusterAlertGroupInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedClusterAlertGroupInterface.AddHandlerCalls()) +func (mock *ClusterAlertGroupInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.ClusterAlertGroupHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.ClusterAlertGroupHandlerFunc + } + lockClusterAlertGroupInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockClusterAlertGroupInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *ClusterAlertGroupInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.ClusterAlertGroupLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("ClusterAlertGroupInterfaceMock.AddLifecycleFunc: method is nil but ClusterAlertGroupInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.ClusterAlertGroupLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockClusterAlertGroupInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockClusterAlertGroupInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedClusterAlertGroupInterface.AddLifecycleCalls()) +func (mock *ClusterAlertGroupInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.ClusterAlertGroupLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.ClusterAlertGroupLifecycle + } + lockClusterAlertGroupInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockClusterAlertGroupInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *ClusterAlertGroupInterfaceMock) Controller() v3.ClusterAlertGroupController { + if mock.ControllerFunc == nil { + panic("ClusterAlertGroupInterfaceMock.ControllerFunc: method is nil but ClusterAlertGroupInterface.Controller was just called") + } + callInfo := struct { + }{} + lockClusterAlertGroupInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockClusterAlertGroupInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedClusterAlertGroupInterface.ControllerCalls()) +func (mock *ClusterAlertGroupInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockClusterAlertGroupInterfaceMockController.RLock() + calls = mock.calls.Controller + lockClusterAlertGroupInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *ClusterAlertGroupInterfaceMock) Create(in1 *v3.ClusterAlertGroup) (*v3.ClusterAlertGroup, error) { + if mock.CreateFunc == nil { + panic("ClusterAlertGroupInterfaceMock.CreateFunc: method is nil but ClusterAlertGroupInterface.Create was just called") + } + callInfo := struct { + In1 *v3.ClusterAlertGroup + }{ + In1: in1, + } + lockClusterAlertGroupInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockClusterAlertGroupInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedClusterAlertGroupInterface.CreateCalls()) +func (mock *ClusterAlertGroupInterfaceMock) CreateCalls() []struct { + In1 *v3.ClusterAlertGroup +} { + var calls []struct { + In1 *v3.ClusterAlertGroup + } + lockClusterAlertGroupInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockClusterAlertGroupInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *ClusterAlertGroupInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("ClusterAlertGroupInterfaceMock.DeleteFunc: method is nil but ClusterAlertGroupInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockClusterAlertGroupInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockClusterAlertGroupInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedClusterAlertGroupInterface.DeleteCalls()) +func (mock *ClusterAlertGroupInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockClusterAlertGroupInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockClusterAlertGroupInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *ClusterAlertGroupInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("ClusterAlertGroupInterfaceMock.DeleteCollectionFunc: method is nil but ClusterAlertGroupInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockClusterAlertGroupInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockClusterAlertGroupInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedClusterAlertGroupInterface.DeleteCollectionCalls()) +func (mock *ClusterAlertGroupInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockClusterAlertGroupInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockClusterAlertGroupInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *ClusterAlertGroupInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("ClusterAlertGroupInterfaceMock.DeleteNamespacedFunc: method is nil but ClusterAlertGroupInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockClusterAlertGroupInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockClusterAlertGroupInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedClusterAlertGroupInterface.DeleteNamespacedCalls()) +func (mock *ClusterAlertGroupInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockClusterAlertGroupInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockClusterAlertGroupInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *ClusterAlertGroupInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.ClusterAlertGroup, error) { + if mock.GetFunc == nil { + panic("ClusterAlertGroupInterfaceMock.GetFunc: method is nil but ClusterAlertGroupInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockClusterAlertGroupInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockClusterAlertGroupInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedClusterAlertGroupInterface.GetCalls()) +func (mock *ClusterAlertGroupInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockClusterAlertGroupInterfaceMockGet.RLock() + calls = mock.calls.Get + lockClusterAlertGroupInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *ClusterAlertGroupInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.ClusterAlertGroup, error) { + if mock.GetNamespacedFunc == nil { + panic("ClusterAlertGroupInterfaceMock.GetNamespacedFunc: method is nil but ClusterAlertGroupInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockClusterAlertGroupInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockClusterAlertGroupInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedClusterAlertGroupInterface.GetNamespacedCalls()) +func (mock *ClusterAlertGroupInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockClusterAlertGroupInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockClusterAlertGroupInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ClusterAlertGroupInterfaceMock) List(opts v1.ListOptions) (*v3.ClusterAlertGroupList, error) { + if mock.ListFunc == nil { + panic("ClusterAlertGroupInterfaceMock.ListFunc: method is nil but ClusterAlertGroupInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockClusterAlertGroupInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockClusterAlertGroupInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedClusterAlertGroupInterface.ListCalls()) +func (mock *ClusterAlertGroupInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockClusterAlertGroupInterfaceMockList.RLock() + calls = mock.calls.List + lockClusterAlertGroupInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *ClusterAlertGroupInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("ClusterAlertGroupInterfaceMock.ObjectClientFunc: method is nil but ClusterAlertGroupInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockClusterAlertGroupInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockClusterAlertGroupInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedClusterAlertGroupInterface.ObjectClientCalls()) +func (mock *ClusterAlertGroupInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockClusterAlertGroupInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockClusterAlertGroupInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *ClusterAlertGroupInterfaceMock) Update(in1 *v3.ClusterAlertGroup) (*v3.ClusterAlertGroup, error) { + if mock.UpdateFunc == nil { + panic("ClusterAlertGroupInterfaceMock.UpdateFunc: method is nil but ClusterAlertGroupInterface.Update was just called") + } + callInfo := struct { + In1 *v3.ClusterAlertGroup + }{ + In1: in1, + } + lockClusterAlertGroupInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockClusterAlertGroupInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedClusterAlertGroupInterface.UpdateCalls()) +func (mock *ClusterAlertGroupInterfaceMock) UpdateCalls() []struct { + In1 *v3.ClusterAlertGroup +} { + var calls []struct { + In1 *v3.ClusterAlertGroup + } + lockClusterAlertGroupInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockClusterAlertGroupInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *ClusterAlertGroupInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("ClusterAlertGroupInterfaceMock.WatchFunc: method is nil but ClusterAlertGroupInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockClusterAlertGroupInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockClusterAlertGroupInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedClusterAlertGroupInterface.WatchCalls()) +func (mock *ClusterAlertGroupInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockClusterAlertGroupInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockClusterAlertGroupInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockClusterAlertGroupsGetterMockClusterAlertGroups sync.RWMutex +) + +// Ensure, that ClusterAlertGroupsGetterMock does implement ClusterAlertGroupsGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.ClusterAlertGroupsGetter = &ClusterAlertGroupsGetterMock{} + +// ClusterAlertGroupsGetterMock is a mock implementation of ClusterAlertGroupsGetter. +// +// func TestSomethingThatUsesClusterAlertGroupsGetter(t *testing.T) { +// +// // make and configure a mocked ClusterAlertGroupsGetter +// mockedClusterAlertGroupsGetter := &ClusterAlertGroupsGetterMock{ +// ClusterAlertGroupsFunc: func(namespace string) v3.ClusterAlertGroupInterface { +// panic("mock out the ClusterAlertGroups method") +// }, +// } +// +// // use mockedClusterAlertGroupsGetter in code that requires ClusterAlertGroupsGetter +// // and then make assertions. +// +// } +type ClusterAlertGroupsGetterMock struct { + // ClusterAlertGroupsFunc mocks the ClusterAlertGroups method. + ClusterAlertGroupsFunc func(namespace string) v3.ClusterAlertGroupInterface + + // calls tracks calls to the methods. + calls struct { + // ClusterAlertGroups holds details about calls to the ClusterAlertGroups method. + ClusterAlertGroups []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// ClusterAlertGroups calls ClusterAlertGroupsFunc. +func (mock *ClusterAlertGroupsGetterMock) ClusterAlertGroups(namespace string) v3.ClusterAlertGroupInterface { + if mock.ClusterAlertGroupsFunc == nil { + panic("ClusterAlertGroupsGetterMock.ClusterAlertGroupsFunc: method is nil but ClusterAlertGroupsGetter.ClusterAlertGroups was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockClusterAlertGroupsGetterMockClusterAlertGroups.Lock() + mock.calls.ClusterAlertGroups = append(mock.calls.ClusterAlertGroups, callInfo) + lockClusterAlertGroupsGetterMockClusterAlertGroups.Unlock() + return mock.ClusterAlertGroupsFunc(namespace) +} + +// ClusterAlertGroupsCalls gets all the calls that were made to ClusterAlertGroups. +// Check the length with: +// len(mockedClusterAlertGroupsGetter.ClusterAlertGroupsCalls()) +func (mock *ClusterAlertGroupsGetterMock) ClusterAlertGroupsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockClusterAlertGroupsGetterMockClusterAlertGroups.RLock() + calls = mock.calls.ClusterAlertGroups + lockClusterAlertGroupsGetterMockClusterAlertGroups.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_cluster_alert_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_cluster_alert_mock_test.go new file mode 100644 index 00000000..e668203b --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_cluster_alert_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockClusterAlertListerMockGet sync.RWMutex + lockClusterAlertListerMockList sync.RWMutex +) + +// Ensure, that ClusterAlertListerMock does implement ClusterAlertLister. +// If this is not the case, regenerate this file with moq. +var _ v3.ClusterAlertLister = &ClusterAlertListerMock{} + +// ClusterAlertListerMock is a mock implementation of ClusterAlertLister. +// +// func TestSomethingThatUsesClusterAlertLister(t *testing.T) { +// +// // make and configure a mocked ClusterAlertLister +// mockedClusterAlertLister := &ClusterAlertListerMock{ +// GetFunc: func(namespace string, name string) (*v3.ClusterAlert, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.ClusterAlert, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedClusterAlertLister in code that requires ClusterAlertLister +// // and then make assertions. +// +// } +type ClusterAlertListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.ClusterAlert, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.ClusterAlert, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *ClusterAlertListerMock) Get(namespace string, name string) (*v3.ClusterAlert, error) { + if mock.GetFunc == nil { + panic("ClusterAlertListerMock.GetFunc: method is nil but ClusterAlertLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockClusterAlertListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockClusterAlertListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedClusterAlertLister.GetCalls()) +func (mock *ClusterAlertListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockClusterAlertListerMockGet.RLock() + calls = mock.calls.Get + lockClusterAlertListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ClusterAlertListerMock) List(namespace string, selector labels.Selector) ([]*v3.ClusterAlert, error) { + if mock.ListFunc == nil { + panic("ClusterAlertListerMock.ListFunc: method is nil but ClusterAlertLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockClusterAlertListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockClusterAlertListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedClusterAlertLister.ListCalls()) +func (mock *ClusterAlertListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockClusterAlertListerMockList.RLock() + calls = mock.calls.List + lockClusterAlertListerMockList.RUnlock() + return calls +} + +var ( + lockClusterAlertControllerMockAddClusterScopedHandler sync.RWMutex + lockClusterAlertControllerMockAddHandler sync.RWMutex + lockClusterAlertControllerMockEnqueue sync.RWMutex + lockClusterAlertControllerMockGeneric sync.RWMutex + lockClusterAlertControllerMockInformer sync.RWMutex + lockClusterAlertControllerMockLister sync.RWMutex + lockClusterAlertControllerMockStart sync.RWMutex + lockClusterAlertControllerMockSync sync.RWMutex +) + +// Ensure, that ClusterAlertControllerMock does implement ClusterAlertController. +// If this is not the case, regenerate this file with moq. +var _ v3.ClusterAlertController = &ClusterAlertControllerMock{} + +// ClusterAlertControllerMock is a mock implementation of ClusterAlertController. +// +// func TestSomethingThatUsesClusterAlertController(t *testing.T) { +// +// // make and configure a mocked ClusterAlertController +// mockedClusterAlertController := &ClusterAlertControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.ClusterAlertHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.ClusterAlertHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.ClusterAlertLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedClusterAlertController in code that requires ClusterAlertController +// // and then make assertions. +// +// } +type ClusterAlertControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.ClusterAlertHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.ClusterAlertHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.ClusterAlertLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.ClusterAlertHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.ClusterAlertHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ClusterAlertControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.ClusterAlertHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ClusterAlertControllerMock.AddClusterScopedHandlerFunc: method is nil but ClusterAlertController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ClusterAlertHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockClusterAlertControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockClusterAlertControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedClusterAlertController.AddClusterScopedHandlerCalls()) +func (mock *ClusterAlertControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ClusterAlertHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ClusterAlertHandlerFunc + } + lockClusterAlertControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockClusterAlertControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ClusterAlertControllerMock) AddHandler(ctx context.Context, name string, handler v3.ClusterAlertHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ClusterAlertControllerMock.AddHandlerFunc: method is nil but ClusterAlertController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.ClusterAlertHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockClusterAlertControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockClusterAlertControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedClusterAlertController.AddHandlerCalls()) +func (mock *ClusterAlertControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.ClusterAlertHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.ClusterAlertHandlerFunc + } + lockClusterAlertControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockClusterAlertControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *ClusterAlertControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("ClusterAlertControllerMock.EnqueueFunc: method is nil but ClusterAlertController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockClusterAlertControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockClusterAlertControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedClusterAlertController.EnqueueCalls()) +func (mock *ClusterAlertControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockClusterAlertControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockClusterAlertControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *ClusterAlertControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("ClusterAlertControllerMock.GenericFunc: method is nil but ClusterAlertController.Generic was just called") + } + callInfo := struct { + }{} + lockClusterAlertControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockClusterAlertControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedClusterAlertController.GenericCalls()) +func (mock *ClusterAlertControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockClusterAlertControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockClusterAlertControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *ClusterAlertControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("ClusterAlertControllerMock.InformerFunc: method is nil but ClusterAlertController.Informer was just called") + } + callInfo := struct { + }{} + lockClusterAlertControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockClusterAlertControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedClusterAlertController.InformerCalls()) +func (mock *ClusterAlertControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockClusterAlertControllerMockInformer.RLock() + calls = mock.calls.Informer + lockClusterAlertControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *ClusterAlertControllerMock) Lister() v3.ClusterAlertLister { + if mock.ListerFunc == nil { + panic("ClusterAlertControllerMock.ListerFunc: method is nil but ClusterAlertController.Lister was just called") + } + callInfo := struct { + }{} + lockClusterAlertControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockClusterAlertControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedClusterAlertController.ListerCalls()) +func (mock *ClusterAlertControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockClusterAlertControllerMockLister.RLock() + calls = mock.calls.Lister + lockClusterAlertControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *ClusterAlertControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("ClusterAlertControllerMock.StartFunc: method is nil but ClusterAlertController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockClusterAlertControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockClusterAlertControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedClusterAlertController.StartCalls()) +func (mock *ClusterAlertControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockClusterAlertControllerMockStart.RLock() + calls = mock.calls.Start + lockClusterAlertControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *ClusterAlertControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("ClusterAlertControllerMock.SyncFunc: method is nil but ClusterAlertController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockClusterAlertControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockClusterAlertControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedClusterAlertController.SyncCalls()) +func (mock *ClusterAlertControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockClusterAlertControllerMockSync.RLock() + calls = mock.calls.Sync + lockClusterAlertControllerMockSync.RUnlock() + return calls +} + +var ( + lockClusterAlertInterfaceMockAddClusterScopedHandler sync.RWMutex + lockClusterAlertInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockClusterAlertInterfaceMockAddHandler sync.RWMutex + lockClusterAlertInterfaceMockAddLifecycle sync.RWMutex + lockClusterAlertInterfaceMockController sync.RWMutex + lockClusterAlertInterfaceMockCreate sync.RWMutex + lockClusterAlertInterfaceMockDelete sync.RWMutex + lockClusterAlertInterfaceMockDeleteCollection sync.RWMutex + lockClusterAlertInterfaceMockDeleteNamespaced sync.RWMutex + lockClusterAlertInterfaceMockGet sync.RWMutex + lockClusterAlertInterfaceMockGetNamespaced sync.RWMutex + lockClusterAlertInterfaceMockList sync.RWMutex + lockClusterAlertInterfaceMockObjectClient sync.RWMutex + lockClusterAlertInterfaceMockUpdate sync.RWMutex + lockClusterAlertInterfaceMockWatch sync.RWMutex +) + +// Ensure, that ClusterAlertInterfaceMock does implement ClusterAlertInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.ClusterAlertInterface = &ClusterAlertInterfaceMock{} + +// ClusterAlertInterfaceMock is a mock implementation of ClusterAlertInterface. +// +// func TestSomethingThatUsesClusterAlertInterface(t *testing.T) { +// +// // make and configure a mocked ClusterAlertInterface +// mockedClusterAlertInterface := &ClusterAlertInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.ClusterAlertHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.ClusterAlertLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.ClusterAlertHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.ClusterAlertLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.ClusterAlertController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.ClusterAlert) (*v3.ClusterAlert, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.ClusterAlert, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.ClusterAlert, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.ClusterAlertList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.ClusterAlert) (*v3.ClusterAlert, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedClusterAlertInterface in code that requires ClusterAlertInterface +// // and then make assertions. +// +// } +type ClusterAlertInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.ClusterAlertHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.ClusterAlertLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.ClusterAlertHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.ClusterAlertLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.ClusterAlertController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.ClusterAlert) (*v3.ClusterAlert, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.ClusterAlert, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.ClusterAlert, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.ClusterAlertList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.ClusterAlert) (*v3.ClusterAlert, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.ClusterAlertHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.ClusterAlertLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.ClusterAlertHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.ClusterAlertLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.ClusterAlert + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.ClusterAlert + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ClusterAlertInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.ClusterAlertHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ClusterAlertInterfaceMock.AddClusterScopedHandlerFunc: method is nil but ClusterAlertInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ClusterAlertHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockClusterAlertInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockClusterAlertInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedClusterAlertInterface.AddClusterScopedHandlerCalls()) +func (mock *ClusterAlertInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ClusterAlertHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ClusterAlertHandlerFunc + } + lockClusterAlertInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockClusterAlertInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *ClusterAlertInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.ClusterAlertLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("ClusterAlertInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but ClusterAlertInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ClusterAlertLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockClusterAlertInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockClusterAlertInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedClusterAlertInterface.AddClusterScopedLifecycleCalls()) +func (mock *ClusterAlertInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ClusterAlertLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ClusterAlertLifecycle + } + lockClusterAlertInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockClusterAlertInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ClusterAlertInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.ClusterAlertHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ClusterAlertInterfaceMock.AddHandlerFunc: method is nil but ClusterAlertInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.ClusterAlertHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockClusterAlertInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockClusterAlertInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedClusterAlertInterface.AddHandlerCalls()) +func (mock *ClusterAlertInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.ClusterAlertHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.ClusterAlertHandlerFunc + } + lockClusterAlertInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockClusterAlertInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *ClusterAlertInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.ClusterAlertLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("ClusterAlertInterfaceMock.AddLifecycleFunc: method is nil but ClusterAlertInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.ClusterAlertLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockClusterAlertInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockClusterAlertInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedClusterAlertInterface.AddLifecycleCalls()) +func (mock *ClusterAlertInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.ClusterAlertLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.ClusterAlertLifecycle + } + lockClusterAlertInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockClusterAlertInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *ClusterAlertInterfaceMock) Controller() v3.ClusterAlertController { + if mock.ControllerFunc == nil { + panic("ClusterAlertInterfaceMock.ControllerFunc: method is nil but ClusterAlertInterface.Controller was just called") + } + callInfo := struct { + }{} + lockClusterAlertInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockClusterAlertInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedClusterAlertInterface.ControllerCalls()) +func (mock *ClusterAlertInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockClusterAlertInterfaceMockController.RLock() + calls = mock.calls.Controller + lockClusterAlertInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *ClusterAlertInterfaceMock) Create(in1 *v3.ClusterAlert) (*v3.ClusterAlert, error) { + if mock.CreateFunc == nil { + panic("ClusterAlertInterfaceMock.CreateFunc: method is nil but ClusterAlertInterface.Create was just called") + } + callInfo := struct { + In1 *v3.ClusterAlert + }{ + In1: in1, + } + lockClusterAlertInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockClusterAlertInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedClusterAlertInterface.CreateCalls()) +func (mock *ClusterAlertInterfaceMock) CreateCalls() []struct { + In1 *v3.ClusterAlert +} { + var calls []struct { + In1 *v3.ClusterAlert + } + lockClusterAlertInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockClusterAlertInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *ClusterAlertInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("ClusterAlertInterfaceMock.DeleteFunc: method is nil but ClusterAlertInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockClusterAlertInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockClusterAlertInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedClusterAlertInterface.DeleteCalls()) +func (mock *ClusterAlertInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockClusterAlertInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockClusterAlertInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *ClusterAlertInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("ClusterAlertInterfaceMock.DeleteCollectionFunc: method is nil but ClusterAlertInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockClusterAlertInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockClusterAlertInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedClusterAlertInterface.DeleteCollectionCalls()) +func (mock *ClusterAlertInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockClusterAlertInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockClusterAlertInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *ClusterAlertInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("ClusterAlertInterfaceMock.DeleteNamespacedFunc: method is nil but ClusterAlertInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockClusterAlertInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockClusterAlertInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedClusterAlertInterface.DeleteNamespacedCalls()) +func (mock *ClusterAlertInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockClusterAlertInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockClusterAlertInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *ClusterAlertInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.ClusterAlert, error) { + if mock.GetFunc == nil { + panic("ClusterAlertInterfaceMock.GetFunc: method is nil but ClusterAlertInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockClusterAlertInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockClusterAlertInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedClusterAlertInterface.GetCalls()) +func (mock *ClusterAlertInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockClusterAlertInterfaceMockGet.RLock() + calls = mock.calls.Get + lockClusterAlertInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *ClusterAlertInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.ClusterAlert, error) { + if mock.GetNamespacedFunc == nil { + panic("ClusterAlertInterfaceMock.GetNamespacedFunc: method is nil but ClusterAlertInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockClusterAlertInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockClusterAlertInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedClusterAlertInterface.GetNamespacedCalls()) +func (mock *ClusterAlertInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockClusterAlertInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockClusterAlertInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ClusterAlertInterfaceMock) List(opts v1.ListOptions) (*v3.ClusterAlertList, error) { + if mock.ListFunc == nil { + panic("ClusterAlertInterfaceMock.ListFunc: method is nil but ClusterAlertInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockClusterAlertInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockClusterAlertInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedClusterAlertInterface.ListCalls()) +func (mock *ClusterAlertInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockClusterAlertInterfaceMockList.RLock() + calls = mock.calls.List + lockClusterAlertInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *ClusterAlertInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("ClusterAlertInterfaceMock.ObjectClientFunc: method is nil but ClusterAlertInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockClusterAlertInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockClusterAlertInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedClusterAlertInterface.ObjectClientCalls()) +func (mock *ClusterAlertInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockClusterAlertInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockClusterAlertInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *ClusterAlertInterfaceMock) Update(in1 *v3.ClusterAlert) (*v3.ClusterAlert, error) { + if mock.UpdateFunc == nil { + panic("ClusterAlertInterfaceMock.UpdateFunc: method is nil but ClusterAlertInterface.Update was just called") + } + callInfo := struct { + In1 *v3.ClusterAlert + }{ + In1: in1, + } + lockClusterAlertInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockClusterAlertInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedClusterAlertInterface.UpdateCalls()) +func (mock *ClusterAlertInterfaceMock) UpdateCalls() []struct { + In1 *v3.ClusterAlert +} { + var calls []struct { + In1 *v3.ClusterAlert + } + lockClusterAlertInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockClusterAlertInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *ClusterAlertInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("ClusterAlertInterfaceMock.WatchFunc: method is nil but ClusterAlertInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockClusterAlertInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockClusterAlertInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedClusterAlertInterface.WatchCalls()) +func (mock *ClusterAlertInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockClusterAlertInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockClusterAlertInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockClusterAlertsGetterMockClusterAlerts sync.RWMutex +) + +// Ensure, that ClusterAlertsGetterMock does implement ClusterAlertsGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.ClusterAlertsGetter = &ClusterAlertsGetterMock{} + +// ClusterAlertsGetterMock is a mock implementation of ClusterAlertsGetter. +// +// func TestSomethingThatUsesClusterAlertsGetter(t *testing.T) { +// +// // make and configure a mocked ClusterAlertsGetter +// mockedClusterAlertsGetter := &ClusterAlertsGetterMock{ +// ClusterAlertsFunc: func(namespace string) v3.ClusterAlertInterface { +// panic("mock out the ClusterAlerts method") +// }, +// } +// +// // use mockedClusterAlertsGetter in code that requires ClusterAlertsGetter +// // and then make assertions. +// +// } +type ClusterAlertsGetterMock struct { + // ClusterAlertsFunc mocks the ClusterAlerts method. + ClusterAlertsFunc func(namespace string) v3.ClusterAlertInterface + + // calls tracks calls to the methods. + calls struct { + // ClusterAlerts holds details about calls to the ClusterAlerts method. + ClusterAlerts []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// ClusterAlerts calls ClusterAlertsFunc. +func (mock *ClusterAlertsGetterMock) ClusterAlerts(namespace string) v3.ClusterAlertInterface { + if mock.ClusterAlertsFunc == nil { + panic("ClusterAlertsGetterMock.ClusterAlertsFunc: method is nil but ClusterAlertsGetter.ClusterAlerts was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockClusterAlertsGetterMockClusterAlerts.Lock() + mock.calls.ClusterAlerts = append(mock.calls.ClusterAlerts, callInfo) + lockClusterAlertsGetterMockClusterAlerts.Unlock() + return mock.ClusterAlertsFunc(namespace) +} + +// ClusterAlertsCalls gets all the calls that were made to ClusterAlerts. +// Check the length with: +// len(mockedClusterAlertsGetter.ClusterAlertsCalls()) +func (mock *ClusterAlertsGetterMock) ClusterAlertsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockClusterAlertsGetterMockClusterAlerts.RLock() + calls = mock.calls.ClusterAlerts + lockClusterAlertsGetterMockClusterAlerts.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_cluster_alert_rule_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_cluster_alert_rule_mock_test.go new file mode 100644 index 00000000..75ae2b9e --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_cluster_alert_rule_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockClusterAlertRuleListerMockGet sync.RWMutex + lockClusterAlertRuleListerMockList sync.RWMutex +) + +// Ensure, that ClusterAlertRuleListerMock does implement ClusterAlertRuleLister. +// If this is not the case, regenerate this file with moq. +var _ v3.ClusterAlertRuleLister = &ClusterAlertRuleListerMock{} + +// ClusterAlertRuleListerMock is a mock implementation of ClusterAlertRuleLister. +// +// func TestSomethingThatUsesClusterAlertRuleLister(t *testing.T) { +// +// // make and configure a mocked ClusterAlertRuleLister +// mockedClusterAlertRuleLister := &ClusterAlertRuleListerMock{ +// GetFunc: func(namespace string, name string) (*v3.ClusterAlertRule, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.ClusterAlertRule, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedClusterAlertRuleLister in code that requires ClusterAlertRuleLister +// // and then make assertions. +// +// } +type ClusterAlertRuleListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.ClusterAlertRule, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.ClusterAlertRule, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *ClusterAlertRuleListerMock) Get(namespace string, name string) (*v3.ClusterAlertRule, error) { + if mock.GetFunc == nil { + panic("ClusterAlertRuleListerMock.GetFunc: method is nil but ClusterAlertRuleLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockClusterAlertRuleListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockClusterAlertRuleListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedClusterAlertRuleLister.GetCalls()) +func (mock *ClusterAlertRuleListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockClusterAlertRuleListerMockGet.RLock() + calls = mock.calls.Get + lockClusterAlertRuleListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ClusterAlertRuleListerMock) List(namespace string, selector labels.Selector) ([]*v3.ClusterAlertRule, error) { + if mock.ListFunc == nil { + panic("ClusterAlertRuleListerMock.ListFunc: method is nil but ClusterAlertRuleLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockClusterAlertRuleListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockClusterAlertRuleListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedClusterAlertRuleLister.ListCalls()) +func (mock *ClusterAlertRuleListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockClusterAlertRuleListerMockList.RLock() + calls = mock.calls.List + lockClusterAlertRuleListerMockList.RUnlock() + return calls +} + +var ( + lockClusterAlertRuleControllerMockAddClusterScopedHandler sync.RWMutex + lockClusterAlertRuleControllerMockAddHandler sync.RWMutex + lockClusterAlertRuleControllerMockEnqueue sync.RWMutex + lockClusterAlertRuleControllerMockGeneric sync.RWMutex + lockClusterAlertRuleControllerMockInformer sync.RWMutex + lockClusterAlertRuleControllerMockLister sync.RWMutex + lockClusterAlertRuleControllerMockStart sync.RWMutex + lockClusterAlertRuleControllerMockSync sync.RWMutex +) + +// Ensure, that ClusterAlertRuleControllerMock does implement ClusterAlertRuleController. +// If this is not the case, regenerate this file with moq. +var _ v3.ClusterAlertRuleController = &ClusterAlertRuleControllerMock{} + +// ClusterAlertRuleControllerMock is a mock implementation of ClusterAlertRuleController. +// +// func TestSomethingThatUsesClusterAlertRuleController(t *testing.T) { +// +// // make and configure a mocked ClusterAlertRuleController +// mockedClusterAlertRuleController := &ClusterAlertRuleControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.ClusterAlertRuleHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.ClusterAlertRuleHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.ClusterAlertRuleLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedClusterAlertRuleController in code that requires ClusterAlertRuleController +// // and then make assertions. +// +// } +type ClusterAlertRuleControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.ClusterAlertRuleHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.ClusterAlertRuleHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.ClusterAlertRuleLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.ClusterAlertRuleHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.ClusterAlertRuleHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ClusterAlertRuleControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.ClusterAlertRuleHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ClusterAlertRuleControllerMock.AddClusterScopedHandlerFunc: method is nil but ClusterAlertRuleController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ClusterAlertRuleHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockClusterAlertRuleControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockClusterAlertRuleControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedClusterAlertRuleController.AddClusterScopedHandlerCalls()) +func (mock *ClusterAlertRuleControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ClusterAlertRuleHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ClusterAlertRuleHandlerFunc + } + lockClusterAlertRuleControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockClusterAlertRuleControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ClusterAlertRuleControllerMock) AddHandler(ctx context.Context, name string, handler v3.ClusterAlertRuleHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ClusterAlertRuleControllerMock.AddHandlerFunc: method is nil but ClusterAlertRuleController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.ClusterAlertRuleHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockClusterAlertRuleControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockClusterAlertRuleControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedClusterAlertRuleController.AddHandlerCalls()) +func (mock *ClusterAlertRuleControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.ClusterAlertRuleHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.ClusterAlertRuleHandlerFunc + } + lockClusterAlertRuleControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockClusterAlertRuleControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *ClusterAlertRuleControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("ClusterAlertRuleControllerMock.EnqueueFunc: method is nil but ClusterAlertRuleController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockClusterAlertRuleControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockClusterAlertRuleControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedClusterAlertRuleController.EnqueueCalls()) +func (mock *ClusterAlertRuleControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockClusterAlertRuleControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockClusterAlertRuleControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *ClusterAlertRuleControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("ClusterAlertRuleControllerMock.GenericFunc: method is nil but ClusterAlertRuleController.Generic was just called") + } + callInfo := struct { + }{} + lockClusterAlertRuleControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockClusterAlertRuleControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedClusterAlertRuleController.GenericCalls()) +func (mock *ClusterAlertRuleControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockClusterAlertRuleControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockClusterAlertRuleControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *ClusterAlertRuleControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("ClusterAlertRuleControllerMock.InformerFunc: method is nil but ClusterAlertRuleController.Informer was just called") + } + callInfo := struct { + }{} + lockClusterAlertRuleControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockClusterAlertRuleControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedClusterAlertRuleController.InformerCalls()) +func (mock *ClusterAlertRuleControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockClusterAlertRuleControllerMockInformer.RLock() + calls = mock.calls.Informer + lockClusterAlertRuleControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *ClusterAlertRuleControllerMock) Lister() v3.ClusterAlertRuleLister { + if mock.ListerFunc == nil { + panic("ClusterAlertRuleControllerMock.ListerFunc: method is nil but ClusterAlertRuleController.Lister was just called") + } + callInfo := struct { + }{} + lockClusterAlertRuleControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockClusterAlertRuleControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedClusterAlertRuleController.ListerCalls()) +func (mock *ClusterAlertRuleControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockClusterAlertRuleControllerMockLister.RLock() + calls = mock.calls.Lister + lockClusterAlertRuleControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *ClusterAlertRuleControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("ClusterAlertRuleControllerMock.StartFunc: method is nil but ClusterAlertRuleController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockClusterAlertRuleControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockClusterAlertRuleControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedClusterAlertRuleController.StartCalls()) +func (mock *ClusterAlertRuleControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockClusterAlertRuleControllerMockStart.RLock() + calls = mock.calls.Start + lockClusterAlertRuleControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *ClusterAlertRuleControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("ClusterAlertRuleControllerMock.SyncFunc: method is nil but ClusterAlertRuleController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockClusterAlertRuleControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockClusterAlertRuleControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedClusterAlertRuleController.SyncCalls()) +func (mock *ClusterAlertRuleControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockClusterAlertRuleControllerMockSync.RLock() + calls = mock.calls.Sync + lockClusterAlertRuleControllerMockSync.RUnlock() + return calls +} + +var ( + lockClusterAlertRuleInterfaceMockAddClusterScopedHandler sync.RWMutex + lockClusterAlertRuleInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockClusterAlertRuleInterfaceMockAddHandler sync.RWMutex + lockClusterAlertRuleInterfaceMockAddLifecycle sync.RWMutex + lockClusterAlertRuleInterfaceMockController sync.RWMutex + lockClusterAlertRuleInterfaceMockCreate sync.RWMutex + lockClusterAlertRuleInterfaceMockDelete sync.RWMutex + lockClusterAlertRuleInterfaceMockDeleteCollection sync.RWMutex + lockClusterAlertRuleInterfaceMockDeleteNamespaced sync.RWMutex + lockClusterAlertRuleInterfaceMockGet sync.RWMutex + lockClusterAlertRuleInterfaceMockGetNamespaced sync.RWMutex + lockClusterAlertRuleInterfaceMockList sync.RWMutex + lockClusterAlertRuleInterfaceMockObjectClient sync.RWMutex + lockClusterAlertRuleInterfaceMockUpdate sync.RWMutex + lockClusterAlertRuleInterfaceMockWatch sync.RWMutex +) + +// Ensure, that ClusterAlertRuleInterfaceMock does implement ClusterAlertRuleInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.ClusterAlertRuleInterface = &ClusterAlertRuleInterfaceMock{} + +// ClusterAlertRuleInterfaceMock is a mock implementation of ClusterAlertRuleInterface. +// +// func TestSomethingThatUsesClusterAlertRuleInterface(t *testing.T) { +// +// // make and configure a mocked ClusterAlertRuleInterface +// mockedClusterAlertRuleInterface := &ClusterAlertRuleInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.ClusterAlertRuleHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.ClusterAlertRuleLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.ClusterAlertRuleHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.ClusterAlertRuleLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.ClusterAlertRuleController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.ClusterAlertRule) (*v3.ClusterAlertRule, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.ClusterAlertRule, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.ClusterAlertRule, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.ClusterAlertRuleList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.ClusterAlertRule) (*v3.ClusterAlertRule, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedClusterAlertRuleInterface in code that requires ClusterAlertRuleInterface +// // and then make assertions. +// +// } +type ClusterAlertRuleInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.ClusterAlertRuleHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.ClusterAlertRuleLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.ClusterAlertRuleHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.ClusterAlertRuleLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.ClusterAlertRuleController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.ClusterAlertRule) (*v3.ClusterAlertRule, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.ClusterAlertRule, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.ClusterAlertRule, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.ClusterAlertRuleList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.ClusterAlertRule) (*v3.ClusterAlertRule, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.ClusterAlertRuleHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.ClusterAlertRuleLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.ClusterAlertRuleHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.ClusterAlertRuleLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.ClusterAlertRule + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.ClusterAlertRule + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ClusterAlertRuleInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.ClusterAlertRuleHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ClusterAlertRuleInterfaceMock.AddClusterScopedHandlerFunc: method is nil but ClusterAlertRuleInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ClusterAlertRuleHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockClusterAlertRuleInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockClusterAlertRuleInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedClusterAlertRuleInterface.AddClusterScopedHandlerCalls()) +func (mock *ClusterAlertRuleInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ClusterAlertRuleHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ClusterAlertRuleHandlerFunc + } + lockClusterAlertRuleInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockClusterAlertRuleInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *ClusterAlertRuleInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.ClusterAlertRuleLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("ClusterAlertRuleInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but ClusterAlertRuleInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ClusterAlertRuleLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockClusterAlertRuleInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockClusterAlertRuleInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedClusterAlertRuleInterface.AddClusterScopedLifecycleCalls()) +func (mock *ClusterAlertRuleInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ClusterAlertRuleLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ClusterAlertRuleLifecycle + } + lockClusterAlertRuleInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockClusterAlertRuleInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ClusterAlertRuleInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.ClusterAlertRuleHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ClusterAlertRuleInterfaceMock.AddHandlerFunc: method is nil but ClusterAlertRuleInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.ClusterAlertRuleHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockClusterAlertRuleInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockClusterAlertRuleInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedClusterAlertRuleInterface.AddHandlerCalls()) +func (mock *ClusterAlertRuleInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.ClusterAlertRuleHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.ClusterAlertRuleHandlerFunc + } + lockClusterAlertRuleInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockClusterAlertRuleInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *ClusterAlertRuleInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.ClusterAlertRuleLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("ClusterAlertRuleInterfaceMock.AddLifecycleFunc: method is nil but ClusterAlertRuleInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.ClusterAlertRuleLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockClusterAlertRuleInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockClusterAlertRuleInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedClusterAlertRuleInterface.AddLifecycleCalls()) +func (mock *ClusterAlertRuleInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.ClusterAlertRuleLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.ClusterAlertRuleLifecycle + } + lockClusterAlertRuleInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockClusterAlertRuleInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *ClusterAlertRuleInterfaceMock) Controller() v3.ClusterAlertRuleController { + if mock.ControllerFunc == nil { + panic("ClusterAlertRuleInterfaceMock.ControllerFunc: method is nil but ClusterAlertRuleInterface.Controller was just called") + } + callInfo := struct { + }{} + lockClusterAlertRuleInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockClusterAlertRuleInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedClusterAlertRuleInterface.ControllerCalls()) +func (mock *ClusterAlertRuleInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockClusterAlertRuleInterfaceMockController.RLock() + calls = mock.calls.Controller + lockClusterAlertRuleInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *ClusterAlertRuleInterfaceMock) Create(in1 *v3.ClusterAlertRule) (*v3.ClusterAlertRule, error) { + if mock.CreateFunc == nil { + panic("ClusterAlertRuleInterfaceMock.CreateFunc: method is nil but ClusterAlertRuleInterface.Create was just called") + } + callInfo := struct { + In1 *v3.ClusterAlertRule + }{ + In1: in1, + } + lockClusterAlertRuleInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockClusterAlertRuleInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedClusterAlertRuleInterface.CreateCalls()) +func (mock *ClusterAlertRuleInterfaceMock) CreateCalls() []struct { + In1 *v3.ClusterAlertRule +} { + var calls []struct { + In1 *v3.ClusterAlertRule + } + lockClusterAlertRuleInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockClusterAlertRuleInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *ClusterAlertRuleInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("ClusterAlertRuleInterfaceMock.DeleteFunc: method is nil but ClusterAlertRuleInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockClusterAlertRuleInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockClusterAlertRuleInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedClusterAlertRuleInterface.DeleteCalls()) +func (mock *ClusterAlertRuleInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockClusterAlertRuleInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockClusterAlertRuleInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *ClusterAlertRuleInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("ClusterAlertRuleInterfaceMock.DeleteCollectionFunc: method is nil but ClusterAlertRuleInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockClusterAlertRuleInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockClusterAlertRuleInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedClusterAlertRuleInterface.DeleteCollectionCalls()) +func (mock *ClusterAlertRuleInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockClusterAlertRuleInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockClusterAlertRuleInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *ClusterAlertRuleInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("ClusterAlertRuleInterfaceMock.DeleteNamespacedFunc: method is nil but ClusterAlertRuleInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockClusterAlertRuleInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockClusterAlertRuleInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedClusterAlertRuleInterface.DeleteNamespacedCalls()) +func (mock *ClusterAlertRuleInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockClusterAlertRuleInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockClusterAlertRuleInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *ClusterAlertRuleInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.ClusterAlertRule, error) { + if mock.GetFunc == nil { + panic("ClusterAlertRuleInterfaceMock.GetFunc: method is nil but ClusterAlertRuleInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockClusterAlertRuleInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockClusterAlertRuleInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedClusterAlertRuleInterface.GetCalls()) +func (mock *ClusterAlertRuleInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockClusterAlertRuleInterfaceMockGet.RLock() + calls = mock.calls.Get + lockClusterAlertRuleInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *ClusterAlertRuleInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.ClusterAlertRule, error) { + if mock.GetNamespacedFunc == nil { + panic("ClusterAlertRuleInterfaceMock.GetNamespacedFunc: method is nil but ClusterAlertRuleInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockClusterAlertRuleInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockClusterAlertRuleInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedClusterAlertRuleInterface.GetNamespacedCalls()) +func (mock *ClusterAlertRuleInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockClusterAlertRuleInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockClusterAlertRuleInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ClusterAlertRuleInterfaceMock) List(opts v1.ListOptions) (*v3.ClusterAlertRuleList, error) { + if mock.ListFunc == nil { + panic("ClusterAlertRuleInterfaceMock.ListFunc: method is nil but ClusterAlertRuleInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockClusterAlertRuleInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockClusterAlertRuleInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedClusterAlertRuleInterface.ListCalls()) +func (mock *ClusterAlertRuleInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockClusterAlertRuleInterfaceMockList.RLock() + calls = mock.calls.List + lockClusterAlertRuleInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *ClusterAlertRuleInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("ClusterAlertRuleInterfaceMock.ObjectClientFunc: method is nil but ClusterAlertRuleInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockClusterAlertRuleInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockClusterAlertRuleInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedClusterAlertRuleInterface.ObjectClientCalls()) +func (mock *ClusterAlertRuleInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockClusterAlertRuleInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockClusterAlertRuleInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *ClusterAlertRuleInterfaceMock) Update(in1 *v3.ClusterAlertRule) (*v3.ClusterAlertRule, error) { + if mock.UpdateFunc == nil { + panic("ClusterAlertRuleInterfaceMock.UpdateFunc: method is nil but ClusterAlertRuleInterface.Update was just called") + } + callInfo := struct { + In1 *v3.ClusterAlertRule + }{ + In1: in1, + } + lockClusterAlertRuleInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockClusterAlertRuleInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedClusterAlertRuleInterface.UpdateCalls()) +func (mock *ClusterAlertRuleInterfaceMock) UpdateCalls() []struct { + In1 *v3.ClusterAlertRule +} { + var calls []struct { + In1 *v3.ClusterAlertRule + } + lockClusterAlertRuleInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockClusterAlertRuleInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *ClusterAlertRuleInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("ClusterAlertRuleInterfaceMock.WatchFunc: method is nil but ClusterAlertRuleInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockClusterAlertRuleInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockClusterAlertRuleInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedClusterAlertRuleInterface.WatchCalls()) +func (mock *ClusterAlertRuleInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockClusterAlertRuleInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockClusterAlertRuleInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockClusterAlertRulesGetterMockClusterAlertRules sync.RWMutex +) + +// Ensure, that ClusterAlertRulesGetterMock does implement ClusterAlertRulesGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.ClusterAlertRulesGetter = &ClusterAlertRulesGetterMock{} + +// ClusterAlertRulesGetterMock is a mock implementation of ClusterAlertRulesGetter. +// +// func TestSomethingThatUsesClusterAlertRulesGetter(t *testing.T) { +// +// // make and configure a mocked ClusterAlertRulesGetter +// mockedClusterAlertRulesGetter := &ClusterAlertRulesGetterMock{ +// ClusterAlertRulesFunc: func(namespace string) v3.ClusterAlertRuleInterface { +// panic("mock out the ClusterAlertRules method") +// }, +// } +// +// // use mockedClusterAlertRulesGetter in code that requires ClusterAlertRulesGetter +// // and then make assertions. +// +// } +type ClusterAlertRulesGetterMock struct { + // ClusterAlertRulesFunc mocks the ClusterAlertRules method. + ClusterAlertRulesFunc func(namespace string) v3.ClusterAlertRuleInterface + + // calls tracks calls to the methods. + calls struct { + // ClusterAlertRules holds details about calls to the ClusterAlertRules method. + ClusterAlertRules []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// ClusterAlertRules calls ClusterAlertRulesFunc. +func (mock *ClusterAlertRulesGetterMock) ClusterAlertRules(namespace string) v3.ClusterAlertRuleInterface { + if mock.ClusterAlertRulesFunc == nil { + panic("ClusterAlertRulesGetterMock.ClusterAlertRulesFunc: method is nil but ClusterAlertRulesGetter.ClusterAlertRules was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockClusterAlertRulesGetterMockClusterAlertRules.Lock() + mock.calls.ClusterAlertRules = append(mock.calls.ClusterAlertRules, callInfo) + lockClusterAlertRulesGetterMockClusterAlertRules.Unlock() + return mock.ClusterAlertRulesFunc(namespace) +} + +// ClusterAlertRulesCalls gets all the calls that were made to ClusterAlertRules. +// Check the length with: +// len(mockedClusterAlertRulesGetter.ClusterAlertRulesCalls()) +func (mock *ClusterAlertRulesGetterMock) ClusterAlertRulesCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockClusterAlertRulesGetterMockClusterAlertRules.RLock() + calls = mock.calls.ClusterAlertRules + lockClusterAlertRulesGetterMockClusterAlertRules.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_cluster_catalog_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_cluster_catalog_mock_test.go new file mode 100644 index 00000000..d0eaeaaf --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_cluster_catalog_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockClusterCatalogListerMockGet sync.RWMutex + lockClusterCatalogListerMockList sync.RWMutex +) + +// Ensure, that ClusterCatalogListerMock does implement ClusterCatalogLister. +// If this is not the case, regenerate this file with moq. +var _ v3.ClusterCatalogLister = &ClusterCatalogListerMock{} + +// ClusterCatalogListerMock is a mock implementation of ClusterCatalogLister. +// +// func TestSomethingThatUsesClusterCatalogLister(t *testing.T) { +// +// // make and configure a mocked ClusterCatalogLister +// mockedClusterCatalogLister := &ClusterCatalogListerMock{ +// GetFunc: func(namespace string, name string) (*v3.ClusterCatalog, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.ClusterCatalog, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedClusterCatalogLister in code that requires ClusterCatalogLister +// // and then make assertions. +// +// } +type ClusterCatalogListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.ClusterCatalog, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.ClusterCatalog, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *ClusterCatalogListerMock) Get(namespace string, name string) (*v3.ClusterCatalog, error) { + if mock.GetFunc == nil { + panic("ClusterCatalogListerMock.GetFunc: method is nil but ClusterCatalogLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockClusterCatalogListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockClusterCatalogListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedClusterCatalogLister.GetCalls()) +func (mock *ClusterCatalogListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockClusterCatalogListerMockGet.RLock() + calls = mock.calls.Get + lockClusterCatalogListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ClusterCatalogListerMock) List(namespace string, selector labels.Selector) ([]*v3.ClusterCatalog, error) { + if mock.ListFunc == nil { + panic("ClusterCatalogListerMock.ListFunc: method is nil but ClusterCatalogLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockClusterCatalogListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockClusterCatalogListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedClusterCatalogLister.ListCalls()) +func (mock *ClusterCatalogListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockClusterCatalogListerMockList.RLock() + calls = mock.calls.List + lockClusterCatalogListerMockList.RUnlock() + return calls +} + +var ( + lockClusterCatalogControllerMockAddClusterScopedHandler sync.RWMutex + lockClusterCatalogControllerMockAddHandler sync.RWMutex + lockClusterCatalogControllerMockEnqueue sync.RWMutex + lockClusterCatalogControllerMockGeneric sync.RWMutex + lockClusterCatalogControllerMockInformer sync.RWMutex + lockClusterCatalogControllerMockLister sync.RWMutex + lockClusterCatalogControllerMockStart sync.RWMutex + lockClusterCatalogControllerMockSync sync.RWMutex +) + +// Ensure, that ClusterCatalogControllerMock does implement ClusterCatalogController. +// If this is not the case, regenerate this file with moq. +var _ v3.ClusterCatalogController = &ClusterCatalogControllerMock{} + +// ClusterCatalogControllerMock is a mock implementation of ClusterCatalogController. +// +// func TestSomethingThatUsesClusterCatalogController(t *testing.T) { +// +// // make and configure a mocked ClusterCatalogController +// mockedClusterCatalogController := &ClusterCatalogControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.ClusterCatalogHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.ClusterCatalogHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.ClusterCatalogLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedClusterCatalogController in code that requires ClusterCatalogController +// // and then make assertions. +// +// } +type ClusterCatalogControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.ClusterCatalogHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.ClusterCatalogHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.ClusterCatalogLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.ClusterCatalogHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.ClusterCatalogHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ClusterCatalogControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.ClusterCatalogHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ClusterCatalogControllerMock.AddClusterScopedHandlerFunc: method is nil but ClusterCatalogController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ClusterCatalogHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockClusterCatalogControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockClusterCatalogControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedClusterCatalogController.AddClusterScopedHandlerCalls()) +func (mock *ClusterCatalogControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ClusterCatalogHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ClusterCatalogHandlerFunc + } + lockClusterCatalogControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockClusterCatalogControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ClusterCatalogControllerMock) AddHandler(ctx context.Context, name string, handler v3.ClusterCatalogHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ClusterCatalogControllerMock.AddHandlerFunc: method is nil but ClusterCatalogController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.ClusterCatalogHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockClusterCatalogControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockClusterCatalogControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedClusterCatalogController.AddHandlerCalls()) +func (mock *ClusterCatalogControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.ClusterCatalogHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.ClusterCatalogHandlerFunc + } + lockClusterCatalogControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockClusterCatalogControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *ClusterCatalogControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("ClusterCatalogControllerMock.EnqueueFunc: method is nil but ClusterCatalogController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockClusterCatalogControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockClusterCatalogControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedClusterCatalogController.EnqueueCalls()) +func (mock *ClusterCatalogControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockClusterCatalogControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockClusterCatalogControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *ClusterCatalogControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("ClusterCatalogControllerMock.GenericFunc: method is nil but ClusterCatalogController.Generic was just called") + } + callInfo := struct { + }{} + lockClusterCatalogControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockClusterCatalogControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedClusterCatalogController.GenericCalls()) +func (mock *ClusterCatalogControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockClusterCatalogControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockClusterCatalogControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *ClusterCatalogControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("ClusterCatalogControllerMock.InformerFunc: method is nil but ClusterCatalogController.Informer was just called") + } + callInfo := struct { + }{} + lockClusterCatalogControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockClusterCatalogControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedClusterCatalogController.InformerCalls()) +func (mock *ClusterCatalogControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockClusterCatalogControllerMockInformer.RLock() + calls = mock.calls.Informer + lockClusterCatalogControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *ClusterCatalogControllerMock) Lister() v3.ClusterCatalogLister { + if mock.ListerFunc == nil { + panic("ClusterCatalogControllerMock.ListerFunc: method is nil but ClusterCatalogController.Lister was just called") + } + callInfo := struct { + }{} + lockClusterCatalogControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockClusterCatalogControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedClusterCatalogController.ListerCalls()) +func (mock *ClusterCatalogControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockClusterCatalogControllerMockLister.RLock() + calls = mock.calls.Lister + lockClusterCatalogControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *ClusterCatalogControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("ClusterCatalogControllerMock.StartFunc: method is nil but ClusterCatalogController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockClusterCatalogControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockClusterCatalogControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedClusterCatalogController.StartCalls()) +func (mock *ClusterCatalogControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockClusterCatalogControllerMockStart.RLock() + calls = mock.calls.Start + lockClusterCatalogControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *ClusterCatalogControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("ClusterCatalogControllerMock.SyncFunc: method is nil but ClusterCatalogController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockClusterCatalogControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockClusterCatalogControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedClusterCatalogController.SyncCalls()) +func (mock *ClusterCatalogControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockClusterCatalogControllerMockSync.RLock() + calls = mock.calls.Sync + lockClusterCatalogControllerMockSync.RUnlock() + return calls +} + +var ( + lockClusterCatalogInterfaceMockAddClusterScopedHandler sync.RWMutex + lockClusterCatalogInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockClusterCatalogInterfaceMockAddHandler sync.RWMutex + lockClusterCatalogInterfaceMockAddLifecycle sync.RWMutex + lockClusterCatalogInterfaceMockController sync.RWMutex + lockClusterCatalogInterfaceMockCreate sync.RWMutex + lockClusterCatalogInterfaceMockDelete sync.RWMutex + lockClusterCatalogInterfaceMockDeleteCollection sync.RWMutex + lockClusterCatalogInterfaceMockDeleteNamespaced sync.RWMutex + lockClusterCatalogInterfaceMockGet sync.RWMutex + lockClusterCatalogInterfaceMockGetNamespaced sync.RWMutex + lockClusterCatalogInterfaceMockList sync.RWMutex + lockClusterCatalogInterfaceMockObjectClient sync.RWMutex + lockClusterCatalogInterfaceMockUpdate sync.RWMutex + lockClusterCatalogInterfaceMockWatch sync.RWMutex +) + +// Ensure, that ClusterCatalogInterfaceMock does implement ClusterCatalogInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.ClusterCatalogInterface = &ClusterCatalogInterfaceMock{} + +// ClusterCatalogInterfaceMock is a mock implementation of ClusterCatalogInterface. +// +// func TestSomethingThatUsesClusterCatalogInterface(t *testing.T) { +// +// // make and configure a mocked ClusterCatalogInterface +// mockedClusterCatalogInterface := &ClusterCatalogInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.ClusterCatalogHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.ClusterCatalogLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.ClusterCatalogHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.ClusterCatalogLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.ClusterCatalogController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.ClusterCatalog) (*v3.ClusterCatalog, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.ClusterCatalog, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.ClusterCatalog, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.ClusterCatalogList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.ClusterCatalog) (*v3.ClusterCatalog, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedClusterCatalogInterface in code that requires ClusterCatalogInterface +// // and then make assertions. +// +// } +type ClusterCatalogInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.ClusterCatalogHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.ClusterCatalogLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.ClusterCatalogHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.ClusterCatalogLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.ClusterCatalogController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.ClusterCatalog) (*v3.ClusterCatalog, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.ClusterCatalog, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.ClusterCatalog, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.ClusterCatalogList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.ClusterCatalog) (*v3.ClusterCatalog, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.ClusterCatalogHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.ClusterCatalogLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.ClusterCatalogHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.ClusterCatalogLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.ClusterCatalog + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.ClusterCatalog + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ClusterCatalogInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.ClusterCatalogHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ClusterCatalogInterfaceMock.AddClusterScopedHandlerFunc: method is nil but ClusterCatalogInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ClusterCatalogHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockClusterCatalogInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockClusterCatalogInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedClusterCatalogInterface.AddClusterScopedHandlerCalls()) +func (mock *ClusterCatalogInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ClusterCatalogHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ClusterCatalogHandlerFunc + } + lockClusterCatalogInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockClusterCatalogInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *ClusterCatalogInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.ClusterCatalogLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("ClusterCatalogInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but ClusterCatalogInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ClusterCatalogLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockClusterCatalogInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockClusterCatalogInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedClusterCatalogInterface.AddClusterScopedLifecycleCalls()) +func (mock *ClusterCatalogInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ClusterCatalogLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ClusterCatalogLifecycle + } + lockClusterCatalogInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockClusterCatalogInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ClusterCatalogInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.ClusterCatalogHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ClusterCatalogInterfaceMock.AddHandlerFunc: method is nil but ClusterCatalogInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.ClusterCatalogHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockClusterCatalogInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockClusterCatalogInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedClusterCatalogInterface.AddHandlerCalls()) +func (mock *ClusterCatalogInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.ClusterCatalogHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.ClusterCatalogHandlerFunc + } + lockClusterCatalogInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockClusterCatalogInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *ClusterCatalogInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.ClusterCatalogLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("ClusterCatalogInterfaceMock.AddLifecycleFunc: method is nil but ClusterCatalogInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.ClusterCatalogLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockClusterCatalogInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockClusterCatalogInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedClusterCatalogInterface.AddLifecycleCalls()) +func (mock *ClusterCatalogInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.ClusterCatalogLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.ClusterCatalogLifecycle + } + lockClusterCatalogInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockClusterCatalogInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *ClusterCatalogInterfaceMock) Controller() v3.ClusterCatalogController { + if mock.ControllerFunc == nil { + panic("ClusterCatalogInterfaceMock.ControllerFunc: method is nil but ClusterCatalogInterface.Controller was just called") + } + callInfo := struct { + }{} + lockClusterCatalogInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockClusterCatalogInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedClusterCatalogInterface.ControllerCalls()) +func (mock *ClusterCatalogInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockClusterCatalogInterfaceMockController.RLock() + calls = mock.calls.Controller + lockClusterCatalogInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *ClusterCatalogInterfaceMock) Create(in1 *v3.ClusterCatalog) (*v3.ClusterCatalog, error) { + if mock.CreateFunc == nil { + panic("ClusterCatalogInterfaceMock.CreateFunc: method is nil but ClusterCatalogInterface.Create was just called") + } + callInfo := struct { + In1 *v3.ClusterCatalog + }{ + In1: in1, + } + lockClusterCatalogInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockClusterCatalogInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedClusterCatalogInterface.CreateCalls()) +func (mock *ClusterCatalogInterfaceMock) CreateCalls() []struct { + In1 *v3.ClusterCatalog +} { + var calls []struct { + In1 *v3.ClusterCatalog + } + lockClusterCatalogInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockClusterCatalogInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *ClusterCatalogInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("ClusterCatalogInterfaceMock.DeleteFunc: method is nil but ClusterCatalogInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockClusterCatalogInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockClusterCatalogInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedClusterCatalogInterface.DeleteCalls()) +func (mock *ClusterCatalogInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockClusterCatalogInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockClusterCatalogInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *ClusterCatalogInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("ClusterCatalogInterfaceMock.DeleteCollectionFunc: method is nil but ClusterCatalogInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockClusterCatalogInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockClusterCatalogInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedClusterCatalogInterface.DeleteCollectionCalls()) +func (mock *ClusterCatalogInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockClusterCatalogInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockClusterCatalogInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *ClusterCatalogInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("ClusterCatalogInterfaceMock.DeleteNamespacedFunc: method is nil but ClusterCatalogInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockClusterCatalogInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockClusterCatalogInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedClusterCatalogInterface.DeleteNamespacedCalls()) +func (mock *ClusterCatalogInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockClusterCatalogInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockClusterCatalogInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *ClusterCatalogInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.ClusterCatalog, error) { + if mock.GetFunc == nil { + panic("ClusterCatalogInterfaceMock.GetFunc: method is nil but ClusterCatalogInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockClusterCatalogInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockClusterCatalogInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedClusterCatalogInterface.GetCalls()) +func (mock *ClusterCatalogInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockClusterCatalogInterfaceMockGet.RLock() + calls = mock.calls.Get + lockClusterCatalogInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *ClusterCatalogInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.ClusterCatalog, error) { + if mock.GetNamespacedFunc == nil { + panic("ClusterCatalogInterfaceMock.GetNamespacedFunc: method is nil but ClusterCatalogInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockClusterCatalogInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockClusterCatalogInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedClusterCatalogInterface.GetNamespacedCalls()) +func (mock *ClusterCatalogInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockClusterCatalogInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockClusterCatalogInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ClusterCatalogInterfaceMock) List(opts v1.ListOptions) (*v3.ClusterCatalogList, error) { + if mock.ListFunc == nil { + panic("ClusterCatalogInterfaceMock.ListFunc: method is nil but ClusterCatalogInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockClusterCatalogInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockClusterCatalogInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedClusterCatalogInterface.ListCalls()) +func (mock *ClusterCatalogInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockClusterCatalogInterfaceMockList.RLock() + calls = mock.calls.List + lockClusterCatalogInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *ClusterCatalogInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("ClusterCatalogInterfaceMock.ObjectClientFunc: method is nil but ClusterCatalogInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockClusterCatalogInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockClusterCatalogInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedClusterCatalogInterface.ObjectClientCalls()) +func (mock *ClusterCatalogInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockClusterCatalogInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockClusterCatalogInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *ClusterCatalogInterfaceMock) Update(in1 *v3.ClusterCatalog) (*v3.ClusterCatalog, error) { + if mock.UpdateFunc == nil { + panic("ClusterCatalogInterfaceMock.UpdateFunc: method is nil but ClusterCatalogInterface.Update was just called") + } + callInfo := struct { + In1 *v3.ClusterCatalog + }{ + In1: in1, + } + lockClusterCatalogInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockClusterCatalogInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedClusterCatalogInterface.UpdateCalls()) +func (mock *ClusterCatalogInterfaceMock) UpdateCalls() []struct { + In1 *v3.ClusterCatalog +} { + var calls []struct { + In1 *v3.ClusterCatalog + } + lockClusterCatalogInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockClusterCatalogInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *ClusterCatalogInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("ClusterCatalogInterfaceMock.WatchFunc: method is nil but ClusterCatalogInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockClusterCatalogInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockClusterCatalogInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedClusterCatalogInterface.WatchCalls()) +func (mock *ClusterCatalogInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockClusterCatalogInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockClusterCatalogInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockClusterCatalogsGetterMockClusterCatalogs sync.RWMutex +) + +// Ensure, that ClusterCatalogsGetterMock does implement ClusterCatalogsGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.ClusterCatalogsGetter = &ClusterCatalogsGetterMock{} + +// ClusterCatalogsGetterMock is a mock implementation of ClusterCatalogsGetter. +// +// func TestSomethingThatUsesClusterCatalogsGetter(t *testing.T) { +// +// // make and configure a mocked ClusterCatalogsGetter +// mockedClusterCatalogsGetter := &ClusterCatalogsGetterMock{ +// ClusterCatalogsFunc: func(namespace string) v3.ClusterCatalogInterface { +// panic("mock out the ClusterCatalogs method") +// }, +// } +// +// // use mockedClusterCatalogsGetter in code that requires ClusterCatalogsGetter +// // and then make assertions. +// +// } +type ClusterCatalogsGetterMock struct { + // ClusterCatalogsFunc mocks the ClusterCatalogs method. + ClusterCatalogsFunc func(namespace string) v3.ClusterCatalogInterface + + // calls tracks calls to the methods. + calls struct { + // ClusterCatalogs holds details about calls to the ClusterCatalogs method. + ClusterCatalogs []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// ClusterCatalogs calls ClusterCatalogsFunc. +func (mock *ClusterCatalogsGetterMock) ClusterCatalogs(namespace string) v3.ClusterCatalogInterface { + if mock.ClusterCatalogsFunc == nil { + panic("ClusterCatalogsGetterMock.ClusterCatalogsFunc: method is nil but ClusterCatalogsGetter.ClusterCatalogs was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockClusterCatalogsGetterMockClusterCatalogs.Lock() + mock.calls.ClusterCatalogs = append(mock.calls.ClusterCatalogs, callInfo) + lockClusterCatalogsGetterMockClusterCatalogs.Unlock() + return mock.ClusterCatalogsFunc(namespace) +} + +// ClusterCatalogsCalls gets all the calls that were made to ClusterCatalogs. +// Check the length with: +// len(mockedClusterCatalogsGetter.ClusterCatalogsCalls()) +func (mock *ClusterCatalogsGetterMock) ClusterCatalogsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockClusterCatalogsGetterMockClusterCatalogs.RLock() + calls = mock.calls.ClusterCatalogs + lockClusterCatalogsGetterMockClusterCatalogs.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_cluster_logging_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_cluster_logging_mock_test.go new file mode 100644 index 00000000..535dd219 --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_cluster_logging_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockClusterLoggingListerMockGet sync.RWMutex + lockClusterLoggingListerMockList sync.RWMutex +) + +// Ensure, that ClusterLoggingListerMock does implement ClusterLoggingLister. +// If this is not the case, regenerate this file with moq. +var _ v3.ClusterLoggingLister = &ClusterLoggingListerMock{} + +// ClusterLoggingListerMock is a mock implementation of ClusterLoggingLister. +// +// func TestSomethingThatUsesClusterLoggingLister(t *testing.T) { +// +// // make and configure a mocked ClusterLoggingLister +// mockedClusterLoggingLister := &ClusterLoggingListerMock{ +// GetFunc: func(namespace string, name string) (*v3.ClusterLogging, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.ClusterLogging, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedClusterLoggingLister in code that requires ClusterLoggingLister +// // and then make assertions. +// +// } +type ClusterLoggingListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.ClusterLogging, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.ClusterLogging, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *ClusterLoggingListerMock) Get(namespace string, name string) (*v3.ClusterLogging, error) { + if mock.GetFunc == nil { + panic("ClusterLoggingListerMock.GetFunc: method is nil but ClusterLoggingLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockClusterLoggingListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockClusterLoggingListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedClusterLoggingLister.GetCalls()) +func (mock *ClusterLoggingListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockClusterLoggingListerMockGet.RLock() + calls = mock.calls.Get + lockClusterLoggingListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ClusterLoggingListerMock) List(namespace string, selector labels.Selector) ([]*v3.ClusterLogging, error) { + if mock.ListFunc == nil { + panic("ClusterLoggingListerMock.ListFunc: method is nil but ClusterLoggingLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockClusterLoggingListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockClusterLoggingListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedClusterLoggingLister.ListCalls()) +func (mock *ClusterLoggingListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockClusterLoggingListerMockList.RLock() + calls = mock.calls.List + lockClusterLoggingListerMockList.RUnlock() + return calls +} + +var ( + lockClusterLoggingControllerMockAddClusterScopedHandler sync.RWMutex + lockClusterLoggingControllerMockAddHandler sync.RWMutex + lockClusterLoggingControllerMockEnqueue sync.RWMutex + lockClusterLoggingControllerMockGeneric sync.RWMutex + lockClusterLoggingControllerMockInformer sync.RWMutex + lockClusterLoggingControllerMockLister sync.RWMutex + lockClusterLoggingControllerMockStart sync.RWMutex + lockClusterLoggingControllerMockSync sync.RWMutex +) + +// Ensure, that ClusterLoggingControllerMock does implement ClusterLoggingController. +// If this is not the case, regenerate this file with moq. +var _ v3.ClusterLoggingController = &ClusterLoggingControllerMock{} + +// ClusterLoggingControllerMock is a mock implementation of ClusterLoggingController. +// +// func TestSomethingThatUsesClusterLoggingController(t *testing.T) { +// +// // make and configure a mocked ClusterLoggingController +// mockedClusterLoggingController := &ClusterLoggingControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.ClusterLoggingHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.ClusterLoggingHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.ClusterLoggingLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedClusterLoggingController in code that requires ClusterLoggingController +// // and then make assertions. +// +// } +type ClusterLoggingControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.ClusterLoggingHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.ClusterLoggingHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.ClusterLoggingLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.ClusterLoggingHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.ClusterLoggingHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ClusterLoggingControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.ClusterLoggingHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ClusterLoggingControllerMock.AddClusterScopedHandlerFunc: method is nil but ClusterLoggingController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ClusterLoggingHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockClusterLoggingControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockClusterLoggingControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedClusterLoggingController.AddClusterScopedHandlerCalls()) +func (mock *ClusterLoggingControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ClusterLoggingHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ClusterLoggingHandlerFunc + } + lockClusterLoggingControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockClusterLoggingControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ClusterLoggingControllerMock) AddHandler(ctx context.Context, name string, handler v3.ClusterLoggingHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ClusterLoggingControllerMock.AddHandlerFunc: method is nil but ClusterLoggingController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.ClusterLoggingHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockClusterLoggingControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockClusterLoggingControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedClusterLoggingController.AddHandlerCalls()) +func (mock *ClusterLoggingControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.ClusterLoggingHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.ClusterLoggingHandlerFunc + } + lockClusterLoggingControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockClusterLoggingControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *ClusterLoggingControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("ClusterLoggingControllerMock.EnqueueFunc: method is nil but ClusterLoggingController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockClusterLoggingControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockClusterLoggingControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedClusterLoggingController.EnqueueCalls()) +func (mock *ClusterLoggingControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockClusterLoggingControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockClusterLoggingControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *ClusterLoggingControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("ClusterLoggingControllerMock.GenericFunc: method is nil but ClusterLoggingController.Generic was just called") + } + callInfo := struct { + }{} + lockClusterLoggingControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockClusterLoggingControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedClusterLoggingController.GenericCalls()) +func (mock *ClusterLoggingControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockClusterLoggingControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockClusterLoggingControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *ClusterLoggingControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("ClusterLoggingControllerMock.InformerFunc: method is nil but ClusterLoggingController.Informer was just called") + } + callInfo := struct { + }{} + lockClusterLoggingControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockClusterLoggingControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedClusterLoggingController.InformerCalls()) +func (mock *ClusterLoggingControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockClusterLoggingControllerMockInformer.RLock() + calls = mock.calls.Informer + lockClusterLoggingControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *ClusterLoggingControllerMock) Lister() v3.ClusterLoggingLister { + if mock.ListerFunc == nil { + panic("ClusterLoggingControllerMock.ListerFunc: method is nil but ClusterLoggingController.Lister was just called") + } + callInfo := struct { + }{} + lockClusterLoggingControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockClusterLoggingControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedClusterLoggingController.ListerCalls()) +func (mock *ClusterLoggingControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockClusterLoggingControllerMockLister.RLock() + calls = mock.calls.Lister + lockClusterLoggingControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *ClusterLoggingControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("ClusterLoggingControllerMock.StartFunc: method is nil but ClusterLoggingController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockClusterLoggingControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockClusterLoggingControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedClusterLoggingController.StartCalls()) +func (mock *ClusterLoggingControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockClusterLoggingControllerMockStart.RLock() + calls = mock.calls.Start + lockClusterLoggingControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *ClusterLoggingControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("ClusterLoggingControllerMock.SyncFunc: method is nil but ClusterLoggingController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockClusterLoggingControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockClusterLoggingControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedClusterLoggingController.SyncCalls()) +func (mock *ClusterLoggingControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockClusterLoggingControllerMockSync.RLock() + calls = mock.calls.Sync + lockClusterLoggingControllerMockSync.RUnlock() + return calls +} + +var ( + lockClusterLoggingInterfaceMockAddClusterScopedHandler sync.RWMutex + lockClusterLoggingInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockClusterLoggingInterfaceMockAddHandler sync.RWMutex + lockClusterLoggingInterfaceMockAddLifecycle sync.RWMutex + lockClusterLoggingInterfaceMockController sync.RWMutex + lockClusterLoggingInterfaceMockCreate sync.RWMutex + lockClusterLoggingInterfaceMockDelete sync.RWMutex + lockClusterLoggingInterfaceMockDeleteCollection sync.RWMutex + lockClusterLoggingInterfaceMockDeleteNamespaced sync.RWMutex + lockClusterLoggingInterfaceMockGet sync.RWMutex + lockClusterLoggingInterfaceMockGetNamespaced sync.RWMutex + lockClusterLoggingInterfaceMockList sync.RWMutex + lockClusterLoggingInterfaceMockObjectClient sync.RWMutex + lockClusterLoggingInterfaceMockUpdate sync.RWMutex + lockClusterLoggingInterfaceMockWatch sync.RWMutex +) + +// Ensure, that ClusterLoggingInterfaceMock does implement ClusterLoggingInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.ClusterLoggingInterface = &ClusterLoggingInterfaceMock{} + +// ClusterLoggingInterfaceMock is a mock implementation of ClusterLoggingInterface. +// +// func TestSomethingThatUsesClusterLoggingInterface(t *testing.T) { +// +// // make and configure a mocked ClusterLoggingInterface +// mockedClusterLoggingInterface := &ClusterLoggingInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.ClusterLoggingHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.ClusterLoggingLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.ClusterLoggingHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.ClusterLoggingLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.ClusterLoggingController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.ClusterLogging) (*v3.ClusterLogging, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.ClusterLogging, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.ClusterLogging, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.ClusterLoggingList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.ClusterLogging) (*v3.ClusterLogging, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedClusterLoggingInterface in code that requires ClusterLoggingInterface +// // and then make assertions. +// +// } +type ClusterLoggingInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.ClusterLoggingHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.ClusterLoggingLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.ClusterLoggingHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.ClusterLoggingLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.ClusterLoggingController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.ClusterLogging) (*v3.ClusterLogging, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.ClusterLogging, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.ClusterLogging, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.ClusterLoggingList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.ClusterLogging) (*v3.ClusterLogging, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.ClusterLoggingHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.ClusterLoggingLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.ClusterLoggingHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.ClusterLoggingLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.ClusterLogging + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.ClusterLogging + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ClusterLoggingInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.ClusterLoggingHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ClusterLoggingInterfaceMock.AddClusterScopedHandlerFunc: method is nil but ClusterLoggingInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ClusterLoggingHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockClusterLoggingInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockClusterLoggingInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedClusterLoggingInterface.AddClusterScopedHandlerCalls()) +func (mock *ClusterLoggingInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ClusterLoggingHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ClusterLoggingHandlerFunc + } + lockClusterLoggingInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockClusterLoggingInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *ClusterLoggingInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.ClusterLoggingLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("ClusterLoggingInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but ClusterLoggingInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ClusterLoggingLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockClusterLoggingInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockClusterLoggingInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedClusterLoggingInterface.AddClusterScopedLifecycleCalls()) +func (mock *ClusterLoggingInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ClusterLoggingLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ClusterLoggingLifecycle + } + lockClusterLoggingInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockClusterLoggingInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ClusterLoggingInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.ClusterLoggingHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ClusterLoggingInterfaceMock.AddHandlerFunc: method is nil but ClusterLoggingInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.ClusterLoggingHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockClusterLoggingInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockClusterLoggingInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedClusterLoggingInterface.AddHandlerCalls()) +func (mock *ClusterLoggingInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.ClusterLoggingHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.ClusterLoggingHandlerFunc + } + lockClusterLoggingInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockClusterLoggingInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *ClusterLoggingInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.ClusterLoggingLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("ClusterLoggingInterfaceMock.AddLifecycleFunc: method is nil but ClusterLoggingInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.ClusterLoggingLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockClusterLoggingInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockClusterLoggingInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedClusterLoggingInterface.AddLifecycleCalls()) +func (mock *ClusterLoggingInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.ClusterLoggingLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.ClusterLoggingLifecycle + } + lockClusterLoggingInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockClusterLoggingInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *ClusterLoggingInterfaceMock) Controller() v3.ClusterLoggingController { + if mock.ControllerFunc == nil { + panic("ClusterLoggingInterfaceMock.ControllerFunc: method is nil but ClusterLoggingInterface.Controller was just called") + } + callInfo := struct { + }{} + lockClusterLoggingInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockClusterLoggingInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedClusterLoggingInterface.ControllerCalls()) +func (mock *ClusterLoggingInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockClusterLoggingInterfaceMockController.RLock() + calls = mock.calls.Controller + lockClusterLoggingInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *ClusterLoggingInterfaceMock) Create(in1 *v3.ClusterLogging) (*v3.ClusterLogging, error) { + if mock.CreateFunc == nil { + panic("ClusterLoggingInterfaceMock.CreateFunc: method is nil but ClusterLoggingInterface.Create was just called") + } + callInfo := struct { + In1 *v3.ClusterLogging + }{ + In1: in1, + } + lockClusterLoggingInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockClusterLoggingInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedClusterLoggingInterface.CreateCalls()) +func (mock *ClusterLoggingInterfaceMock) CreateCalls() []struct { + In1 *v3.ClusterLogging +} { + var calls []struct { + In1 *v3.ClusterLogging + } + lockClusterLoggingInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockClusterLoggingInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *ClusterLoggingInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("ClusterLoggingInterfaceMock.DeleteFunc: method is nil but ClusterLoggingInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockClusterLoggingInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockClusterLoggingInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedClusterLoggingInterface.DeleteCalls()) +func (mock *ClusterLoggingInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockClusterLoggingInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockClusterLoggingInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *ClusterLoggingInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("ClusterLoggingInterfaceMock.DeleteCollectionFunc: method is nil but ClusterLoggingInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockClusterLoggingInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockClusterLoggingInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedClusterLoggingInterface.DeleteCollectionCalls()) +func (mock *ClusterLoggingInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockClusterLoggingInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockClusterLoggingInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *ClusterLoggingInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("ClusterLoggingInterfaceMock.DeleteNamespacedFunc: method is nil but ClusterLoggingInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockClusterLoggingInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockClusterLoggingInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedClusterLoggingInterface.DeleteNamespacedCalls()) +func (mock *ClusterLoggingInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockClusterLoggingInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockClusterLoggingInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *ClusterLoggingInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.ClusterLogging, error) { + if mock.GetFunc == nil { + panic("ClusterLoggingInterfaceMock.GetFunc: method is nil but ClusterLoggingInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockClusterLoggingInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockClusterLoggingInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedClusterLoggingInterface.GetCalls()) +func (mock *ClusterLoggingInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockClusterLoggingInterfaceMockGet.RLock() + calls = mock.calls.Get + lockClusterLoggingInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *ClusterLoggingInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.ClusterLogging, error) { + if mock.GetNamespacedFunc == nil { + panic("ClusterLoggingInterfaceMock.GetNamespacedFunc: method is nil but ClusterLoggingInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockClusterLoggingInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockClusterLoggingInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedClusterLoggingInterface.GetNamespacedCalls()) +func (mock *ClusterLoggingInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockClusterLoggingInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockClusterLoggingInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ClusterLoggingInterfaceMock) List(opts v1.ListOptions) (*v3.ClusterLoggingList, error) { + if mock.ListFunc == nil { + panic("ClusterLoggingInterfaceMock.ListFunc: method is nil but ClusterLoggingInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockClusterLoggingInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockClusterLoggingInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedClusterLoggingInterface.ListCalls()) +func (mock *ClusterLoggingInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockClusterLoggingInterfaceMockList.RLock() + calls = mock.calls.List + lockClusterLoggingInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *ClusterLoggingInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("ClusterLoggingInterfaceMock.ObjectClientFunc: method is nil but ClusterLoggingInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockClusterLoggingInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockClusterLoggingInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedClusterLoggingInterface.ObjectClientCalls()) +func (mock *ClusterLoggingInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockClusterLoggingInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockClusterLoggingInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *ClusterLoggingInterfaceMock) Update(in1 *v3.ClusterLogging) (*v3.ClusterLogging, error) { + if mock.UpdateFunc == nil { + panic("ClusterLoggingInterfaceMock.UpdateFunc: method is nil but ClusterLoggingInterface.Update was just called") + } + callInfo := struct { + In1 *v3.ClusterLogging + }{ + In1: in1, + } + lockClusterLoggingInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockClusterLoggingInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedClusterLoggingInterface.UpdateCalls()) +func (mock *ClusterLoggingInterfaceMock) UpdateCalls() []struct { + In1 *v3.ClusterLogging +} { + var calls []struct { + In1 *v3.ClusterLogging + } + lockClusterLoggingInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockClusterLoggingInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *ClusterLoggingInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("ClusterLoggingInterfaceMock.WatchFunc: method is nil but ClusterLoggingInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockClusterLoggingInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockClusterLoggingInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedClusterLoggingInterface.WatchCalls()) +func (mock *ClusterLoggingInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockClusterLoggingInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockClusterLoggingInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockClusterLoggingsGetterMockClusterLoggings sync.RWMutex +) + +// Ensure, that ClusterLoggingsGetterMock does implement ClusterLoggingsGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.ClusterLoggingsGetter = &ClusterLoggingsGetterMock{} + +// ClusterLoggingsGetterMock is a mock implementation of ClusterLoggingsGetter. +// +// func TestSomethingThatUsesClusterLoggingsGetter(t *testing.T) { +// +// // make and configure a mocked ClusterLoggingsGetter +// mockedClusterLoggingsGetter := &ClusterLoggingsGetterMock{ +// ClusterLoggingsFunc: func(namespace string) v3.ClusterLoggingInterface { +// panic("mock out the ClusterLoggings method") +// }, +// } +// +// // use mockedClusterLoggingsGetter in code that requires ClusterLoggingsGetter +// // and then make assertions. +// +// } +type ClusterLoggingsGetterMock struct { + // ClusterLoggingsFunc mocks the ClusterLoggings method. + ClusterLoggingsFunc func(namespace string) v3.ClusterLoggingInterface + + // calls tracks calls to the methods. + calls struct { + // ClusterLoggings holds details about calls to the ClusterLoggings method. + ClusterLoggings []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// ClusterLoggings calls ClusterLoggingsFunc. +func (mock *ClusterLoggingsGetterMock) ClusterLoggings(namespace string) v3.ClusterLoggingInterface { + if mock.ClusterLoggingsFunc == nil { + panic("ClusterLoggingsGetterMock.ClusterLoggingsFunc: method is nil but ClusterLoggingsGetter.ClusterLoggings was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockClusterLoggingsGetterMockClusterLoggings.Lock() + mock.calls.ClusterLoggings = append(mock.calls.ClusterLoggings, callInfo) + lockClusterLoggingsGetterMockClusterLoggings.Unlock() + return mock.ClusterLoggingsFunc(namespace) +} + +// ClusterLoggingsCalls gets all the calls that were made to ClusterLoggings. +// Check the length with: +// len(mockedClusterLoggingsGetter.ClusterLoggingsCalls()) +func (mock *ClusterLoggingsGetterMock) ClusterLoggingsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockClusterLoggingsGetterMockClusterLoggings.RLock() + calls = mock.calls.ClusterLoggings + lockClusterLoggingsGetterMockClusterLoggings.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_cluster_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_cluster_mock_test.go new file mode 100644 index 00000000..6a15dba4 --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_cluster_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockClusterListerMockGet sync.RWMutex + lockClusterListerMockList sync.RWMutex +) + +// Ensure, that ClusterListerMock does implement ClusterLister. +// If this is not the case, regenerate this file with moq. +var _ v3.ClusterLister = &ClusterListerMock{} + +// ClusterListerMock is a mock implementation of ClusterLister. +// +// func TestSomethingThatUsesClusterLister(t *testing.T) { +// +// // make and configure a mocked ClusterLister +// mockedClusterLister := &ClusterListerMock{ +// GetFunc: func(namespace string, name string) (*v3.Cluster, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.Cluster, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedClusterLister in code that requires ClusterLister +// // and then make assertions. +// +// } +type ClusterListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.Cluster, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.Cluster, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *ClusterListerMock) Get(namespace string, name string) (*v3.Cluster, error) { + if mock.GetFunc == nil { + panic("ClusterListerMock.GetFunc: method is nil but ClusterLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockClusterListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockClusterListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedClusterLister.GetCalls()) +func (mock *ClusterListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockClusterListerMockGet.RLock() + calls = mock.calls.Get + lockClusterListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ClusterListerMock) List(namespace string, selector labels.Selector) ([]*v3.Cluster, error) { + if mock.ListFunc == nil { + panic("ClusterListerMock.ListFunc: method is nil but ClusterLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockClusterListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockClusterListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedClusterLister.ListCalls()) +func (mock *ClusterListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockClusterListerMockList.RLock() + calls = mock.calls.List + lockClusterListerMockList.RUnlock() + return calls +} + +var ( + lockClusterControllerMockAddClusterScopedHandler sync.RWMutex + lockClusterControllerMockAddHandler sync.RWMutex + lockClusterControllerMockEnqueue sync.RWMutex + lockClusterControllerMockGeneric sync.RWMutex + lockClusterControllerMockInformer sync.RWMutex + lockClusterControllerMockLister sync.RWMutex + lockClusterControllerMockStart sync.RWMutex + lockClusterControllerMockSync sync.RWMutex +) + +// Ensure, that ClusterControllerMock does implement ClusterController. +// If this is not the case, regenerate this file with moq. +var _ v3.ClusterController = &ClusterControllerMock{} + +// ClusterControllerMock is a mock implementation of ClusterController. +// +// func TestSomethingThatUsesClusterController(t *testing.T) { +// +// // make and configure a mocked ClusterController +// mockedClusterController := &ClusterControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.ClusterHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.ClusterHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.ClusterLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedClusterController in code that requires ClusterController +// // and then make assertions. +// +// } +type ClusterControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.ClusterHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.ClusterHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.ClusterLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.ClusterHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.ClusterHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ClusterControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.ClusterHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ClusterControllerMock.AddClusterScopedHandlerFunc: method is nil but ClusterController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ClusterHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockClusterControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockClusterControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedClusterController.AddClusterScopedHandlerCalls()) +func (mock *ClusterControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ClusterHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ClusterHandlerFunc + } + lockClusterControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockClusterControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ClusterControllerMock) AddHandler(ctx context.Context, name string, handler v3.ClusterHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ClusterControllerMock.AddHandlerFunc: method is nil but ClusterController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.ClusterHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockClusterControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockClusterControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedClusterController.AddHandlerCalls()) +func (mock *ClusterControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.ClusterHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.ClusterHandlerFunc + } + lockClusterControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockClusterControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *ClusterControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("ClusterControllerMock.EnqueueFunc: method is nil but ClusterController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockClusterControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockClusterControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedClusterController.EnqueueCalls()) +func (mock *ClusterControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockClusterControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockClusterControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *ClusterControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("ClusterControllerMock.GenericFunc: method is nil but ClusterController.Generic was just called") + } + callInfo := struct { + }{} + lockClusterControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockClusterControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedClusterController.GenericCalls()) +func (mock *ClusterControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockClusterControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockClusterControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *ClusterControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("ClusterControllerMock.InformerFunc: method is nil but ClusterController.Informer was just called") + } + callInfo := struct { + }{} + lockClusterControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockClusterControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedClusterController.InformerCalls()) +func (mock *ClusterControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockClusterControllerMockInformer.RLock() + calls = mock.calls.Informer + lockClusterControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *ClusterControllerMock) Lister() v3.ClusterLister { + if mock.ListerFunc == nil { + panic("ClusterControllerMock.ListerFunc: method is nil but ClusterController.Lister was just called") + } + callInfo := struct { + }{} + lockClusterControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockClusterControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedClusterController.ListerCalls()) +func (mock *ClusterControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockClusterControllerMockLister.RLock() + calls = mock.calls.Lister + lockClusterControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *ClusterControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("ClusterControllerMock.StartFunc: method is nil but ClusterController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockClusterControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockClusterControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedClusterController.StartCalls()) +func (mock *ClusterControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockClusterControllerMockStart.RLock() + calls = mock.calls.Start + lockClusterControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *ClusterControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("ClusterControllerMock.SyncFunc: method is nil but ClusterController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockClusterControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockClusterControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedClusterController.SyncCalls()) +func (mock *ClusterControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockClusterControllerMockSync.RLock() + calls = mock.calls.Sync + lockClusterControllerMockSync.RUnlock() + return calls +} + +var ( + lockClusterInterfaceMockAddClusterScopedHandler sync.RWMutex + lockClusterInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockClusterInterfaceMockAddHandler sync.RWMutex + lockClusterInterfaceMockAddLifecycle sync.RWMutex + lockClusterInterfaceMockController sync.RWMutex + lockClusterInterfaceMockCreate sync.RWMutex + lockClusterInterfaceMockDelete sync.RWMutex + lockClusterInterfaceMockDeleteCollection sync.RWMutex + lockClusterInterfaceMockDeleteNamespaced sync.RWMutex + lockClusterInterfaceMockGet sync.RWMutex + lockClusterInterfaceMockGetNamespaced sync.RWMutex + lockClusterInterfaceMockList sync.RWMutex + lockClusterInterfaceMockObjectClient sync.RWMutex + lockClusterInterfaceMockUpdate sync.RWMutex + lockClusterInterfaceMockWatch sync.RWMutex +) + +// Ensure, that ClusterInterfaceMock does implement ClusterInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.ClusterInterface = &ClusterInterfaceMock{} + +// ClusterInterfaceMock is a mock implementation of ClusterInterface. +// +// func TestSomethingThatUsesClusterInterface(t *testing.T) { +// +// // make and configure a mocked ClusterInterface +// mockedClusterInterface := &ClusterInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.ClusterHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.ClusterLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.ClusterHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.ClusterLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.ClusterController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.Cluster) (*v3.Cluster, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.Cluster, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.Cluster, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.ClusterList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.Cluster) (*v3.Cluster, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedClusterInterface in code that requires ClusterInterface +// // and then make assertions. +// +// } +type ClusterInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.ClusterHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.ClusterLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.ClusterHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.ClusterLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.ClusterController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.Cluster) (*v3.Cluster, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.Cluster, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.Cluster, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.ClusterList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.Cluster) (*v3.Cluster, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.ClusterHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.ClusterLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.ClusterHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.ClusterLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.Cluster + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.Cluster + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ClusterInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.ClusterHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ClusterInterfaceMock.AddClusterScopedHandlerFunc: method is nil but ClusterInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ClusterHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockClusterInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockClusterInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedClusterInterface.AddClusterScopedHandlerCalls()) +func (mock *ClusterInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ClusterHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ClusterHandlerFunc + } + lockClusterInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockClusterInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *ClusterInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.ClusterLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("ClusterInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but ClusterInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ClusterLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockClusterInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockClusterInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedClusterInterface.AddClusterScopedLifecycleCalls()) +func (mock *ClusterInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ClusterLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ClusterLifecycle + } + lockClusterInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockClusterInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ClusterInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.ClusterHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ClusterInterfaceMock.AddHandlerFunc: method is nil but ClusterInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.ClusterHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockClusterInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockClusterInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedClusterInterface.AddHandlerCalls()) +func (mock *ClusterInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.ClusterHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.ClusterHandlerFunc + } + lockClusterInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockClusterInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *ClusterInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.ClusterLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("ClusterInterfaceMock.AddLifecycleFunc: method is nil but ClusterInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.ClusterLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockClusterInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockClusterInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedClusterInterface.AddLifecycleCalls()) +func (mock *ClusterInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.ClusterLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.ClusterLifecycle + } + lockClusterInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockClusterInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *ClusterInterfaceMock) Controller() v3.ClusterController { + if mock.ControllerFunc == nil { + panic("ClusterInterfaceMock.ControllerFunc: method is nil but ClusterInterface.Controller was just called") + } + callInfo := struct { + }{} + lockClusterInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockClusterInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedClusterInterface.ControllerCalls()) +func (mock *ClusterInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockClusterInterfaceMockController.RLock() + calls = mock.calls.Controller + lockClusterInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *ClusterInterfaceMock) Create(in1 *v3.Cluster) (*v3.Cluster, error) { + if mock.CreateFunc == nil { + panic("ClusterInterfaceMock.CreateFunc: method is nil but ClusterInterface.Create was just called") + } + callInfo := struct { + In1 *v3.Cluster + }{ + In1: in1, + } + lockClusterInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockClusterInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedClusterInterface.CreateCalls()) +func (mock *ClusterInterfaceMock) CreateCalls() []struct { + In1 *v3.Cluster +} { + var calls []struct { + In1 *v3.Cluster + } + lockClusterInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockClusterInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *ClusterInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("ClusterInterfaceMock.DeleteFunc: method is nil but ClusterInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockClusterInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockClusterInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedClusterInterface.DeleteCalls()) +func (mock *ClusterInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockClusterInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockClusterInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *ClusterInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("ClusterInterfaceMock.DeleteCollectionFunc: method is nil but ClusterInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockClusterInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockClusterInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedClusterInterface.DeleteCollectionCalls()) +func (mock *ClusterInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockClusterInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockClusterInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *ClusterInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("ClusterInterfaceMock.DeleteNamespacedFunc: method is nil but ClusterInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockClusterInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockClusterInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedClusterInterface.DeleteNamespacedCalls()) +func (mock *ClusterInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockClusterInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockClusterInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *ClusterInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.Cluster, error) { + if mock.GetFunc == nil { + panic("ClusterInterfaceMock.GetFunc: method is nil but ClusterInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockClusterInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockClusterInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedClusterInterface.GetCalls()) +func (mock *ClusterInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockClusterInterfaceMockGet.RLock() + calls = mock.calls.Get + lockClusterInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *ClusterInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.Cluster, error) { + if mock.GetNamespacedFunc == nil { + panic("ClusterInterfaceMock.GetNamespacedFunc: method is nil but ClusterInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockClusterInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockClusterInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedClusterInterface.GetNamespacedCalls()) +func (mock *ClusterInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockClusterInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockClusterInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ClusterInterfaceMock) List(opts v1.ListOptions) (*v3.ClusterList, error) { + if mock.ListFunc == nil { + panic("ClusterInterfaceMock.ListFunc: method is nil but ClusterInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockClusterInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockClusterInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedClusterInterface.ListCalls()) +func (mock *ClusterInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockClusterInterfaceMockList.RLock() + calls = mock.calls.List + lockClusterInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *ClusterInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("ClusterInterfaceMock.ObjectClientFunc: method is nil but ClusterInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockClusterInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockClusterInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedClusterInterface.ObjectClientCalls()) +func (mock *ClusterInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockClusterInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockClusterInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *ClusterInterfaceMock) Update(in1 *v3.Cluster) (*v3.Cluster, error) { + if mock.UpdateFunc == nil { + panic("ClusterInterfaceMock.UpdateFunc: method is nil but ClusterInterface.Update was just called") + } + callInfo := struct { + In1 *v3.Cluster + }{ + In1: in1, + } + lockClusterInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockClusterInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedClusterInterface.UpdateCalls()) +func (mock *ClusterInterfaceMock) UpdateCalls() []struct { + In1 *v3.Cluster +} { + var calls []struct { + In1 *v3.Cluster + } + lockClusterInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockClusterInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *ClusterInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("ClusterInterfaceMock.WatchFunc: method is nil but ClusterInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockClusterInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockClusterInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedClusterInterface.WatchCalls()) +func (mock *ClusterInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockClusterInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockClusterInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockClustersGetterMockClusters sync.RWMutex +) + +// Ensure, that ClustersGetterMock does implement ClustersGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.ClustersGetter = &ClustersGetterMock{} + +// ClustersGetterMock is a mock implementation of ClustersGetter. +// +// func TestSomethingThatUsesClustersGetter(t *testing.T) { +// +// // make and configure a mocked ClustersGetter +// mockedClustersGetter := &ClustersGetterMock{ +// ClustersFunc: func(namespace string) v3.ClusterInterface { +// panic("mock out the Clusters method") +// }, +// } +// +// // use mockedClustersGetter in code that requires ClustersGetter +// // and then make assertions. +// +// } +type ClustersGetterMock struct { + // ClustersFunc mocks the Clusters method. + ClustersFunc func(namespace string) v3.ClusterInterface + + // calls tracks calls to the methods. + calls struct { + // Clusters holds details about calls to the Clusters method. + Clusters []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// Clusters calls ClustersFunc. +func (mock *ClustersGetterMock) Clusters(namespace string) v3.ClusterInterface { + if mock.ClustersFunc == nil { + panic("ClustersGetterMock.ClustersFunc: method is nil but ClustersGetter.Clusters was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockClustersGetterMockClusters.Lock() + mock.calls.Clusters = append(mock.calls.Clusters, callInfo) + lockClustersGetterMockClusters.Unlock() + return mock.ClustersFunc(namespace) +} + +// ClustersCalls gets all the calls that were made to Clusters. +// Check the length with: +// len(mockedClustersGetter.ClustersCalls()) +func (mock *ClustersGetterMock) ClustersCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockClustersGetterMockClusters.RLock() + calls = mock.calls.Clusters + lockClustersGetterMockClusters.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_cluster_monitor_graph_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_cluster_monitor_graph_mock_test.go new file mode 100644 index 00000000..ff721edc --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_cluster_monitor_graph_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockClusterMonitorGraphListerMockGet sync.RWMutex + lockClusterMonitorGraphListerMockList sync.RWMutex +) + +// Ensure, that ClusterMonitorGraphListerMock does implement ClusterMonitorGraphLister. +// If this is not the case, regenerate this file with moq. +var _ v3.ClusterMonitorGraphLister = &ClusterMonitorGraphListerMock{} + +// ClusterMonitorGraphListerMock is a mock implementation of ClusterMonitorGraphLister. +// +// func TestSomethingThatUsesClusterMonitorGraphLister(t *testing.T) { +// +// // make and configure a mocked ClusterMonitorGraphLister +// mockedClusterMonitorGraphLister := &ClusterMonitorGraphListerMock{ +// GetFunc: func(namespace string, name string) (*v3.ClusterMonitorGraph, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.ClusterMonitorGraph, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedClusterMonitorGraphLister in code that requires ClusterMonitorGraphLister +// // and then make assertions. +// +// } +type ClusterMonitorGraphListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.ClusterMonitorGraph, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.ClusterMonitorGraph, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *ClusterMonitorGraphListerMock) Get(namespace string, name string) (*v3.ClusterMonitorGraph, error) { + if mock.GetFunc == nil { + panic("ClusterMonitorGraphListerMock.GetFunc: method is nil but ClusterMonitorGraphLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockClusterMonitorGraphListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockClusterMonitorGraphListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedClusterMonitorGraphLister.GetCalls()) +func (mock *ClusterMonitorGraphListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockClusterMonitorGraphListerMockGet.RLock() + calls = mock.calls.Get + lockClusterMonitorGraphListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ClusterMonitorGraphListerMock) List(namespace string, selector labels.Selector) ([]*v3.ClusterMonitorGraph, error) { + if mock.ListFunc == nil { + panic("ClusterMonitorGraphListerMock.ListFunc: method is nil but ClusterMonitorGraphLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockClusterMonitorGraphListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockClusterMonitorGraphListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedClusterMonitorGraphLister.ListCalls()) +func (mock *ClusterMonitorGraphListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockClusterMonitorGraphListerMockList.RLock() + calls = mock.calls.List + lockClusterMonitorGraphListerMockList.RUnlock() + return calls +} + +var ( + lockClusterMonitorGraphControllerMockAddClusterScopedHandler sync.RWMutex + lockClusterMonitorGraphControllerMockAddHandler sync.RWMutex + lockClusterMonitorGraphControllerMockEnqueue sync.RWMutex + lockClusterMonitorGraphControllerMockGeneric sync.RWMutex + lockClusterMonitorGraphControllerMockInformer sync.RWMutex + lockClusterMonitorGraphControllerMockLister sync.RWMutex + lockClusterMonitorGraphControllerMockStart sync.RWMutex + lockClusterMonitorGraphControllerMockSync sync.RWMutex +) + +// Ensure, that ClusterMonitorGraphControllerMock does implement ClusterMonitorGraphController. +// If this is not the case, regenerate this file with moq. +var _ v3.ClusterMonitorGraphController = &ClusterMonitorGraphControllerMock{} + +// ClusterMonitorGraphControllerMock is a mock implementation of ClusterMonitorGraphController. +// +// func TestSomethingThatUsesClusterMonitorGraphController(t *testing.T) { +// +// // make and configure a mocked ClusterMonitorGraphController +// mockedClusterMonitorGraphController := &ClusterMonitorGraphControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.ClusterMonitorGraphHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.ClusterMonitorGraphHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.ClusterMonitorGraphLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedClusterMonitorGraphController in code that requires ClusterMonitorGraphController +// // and then make assertions. +// +// } +type ClusterMonitorGraphControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.ClusterMonitorGraphHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.ClusterMonitorGraphHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.ClusterMonitorGraphLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.ClusterMonitorGraphHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.ClusterMonitorGraphHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ClusterMonitorGraphControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.ClusterMonitorGraphHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ClusterMonitorGraphControllerMock.AddClusterScopedHandlerFunc: method is nil but ClusterMonitorGraphController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ClusterMonitorGraphHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockClusterMonitorGraphControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockClusterMonitorGraphControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedClusterMonitorGraphController.AddClusterScopedHandlerCalls()) +func (mock *ClusterMonitorGraphControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ClusterMonitorGraphHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ClusterMonitorGraphHandlerFunc + } + lockClusterMonitorGraphControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockClusterMonitorGraphControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ClusterMonitorGraphControllerMock) AddHandler(ctx context.Context, name string, handler v3.ClusterMonitorGraphHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ClusterMonitorGraphControllerMock.AddHandlerFunc: method is nil but ClusterMonitorGraphController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.ClusterMonitorGraphHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockClusterMonitorGraphControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockClusterMonitorGraphControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedClusterMonitorGraphController.AddHandlerCalls()) +func (mock *ClusterMonitorGraphControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.ClusterMonitorGraphHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.ClusterMonitorGraphHandlerFunc + } + lockClusterMonitorGraphControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockClusterMonitorGraphControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *ClusterMonitorGraphControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("ClusterMonitorGraphControllerMock.EnqueueFunc: method is nil but ClusterMonitorGraphController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockClusterMonitorGraphControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockClusterMonitorGraphControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedClusterMonitorGraphController.EnqueueCalls()) +func (mock *ClusterMonitorGraphControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockClusterMonitorGraphControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockClusterMonitorGraphControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *ClusterMonitorGraphControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("ClusterMonitorGraphControllerMock.GenericFunc: method is nil but ClusterMonitorGraphController.Generic was just called") + } + callInfo := struct { + }{} + lockClusterMonitorGraphControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockClusterMonitorGraphControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedClusterMonitorGraphController.GenericCalls()) +func (mock *ClusterMonitorGraphControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockClusterMonitorGraphControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockClusterMonitorGraphControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *ClusterMonitorGraphControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("ClusterMonitorGraphControllerMock.InformerFunc: method is nil but ClusterMonitorGraphController.Informer was just called") + } + callInfo := struct { + }{} + lockClusterMonitorGraphControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockClusterMonitorGraphControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedClusterMonitorGraphController.InformerCalls()) +func (mock *ClusterMonitorGraphControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockClusterMonitorGraphControllerMockInformer.RLock() + calls = mock.calls.Informer + lockClusterMonitorGraphControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *ClusterMonitorGraphControllerMock) Lister() v3.ClusterMonitorGraphLister { + if mock.ListerFunc == nil { + panic("ClusterMonitorGraphControllerMock.ListerFunc: method is nil but ClusterMonitorGraphController.Lister was just called") + } + callInfo := struct { + }{} + lockClusterMonitorGraphControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockClusterMonitorGraphControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedClusterMonitorGraphController.ListerCalls()) +func (mock *ClusterMonitorGraphControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockClusterMonitorGraphControllerMockLister.RLock() + calls = mock.calls.Lister + lockClusterMonitorGraphControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *ClusterMonitorGraphControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("ClusterMonitorGraphControllerMock.StartFunc: method is nil but ClusterMonitorGraphController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockClusterMonitorGraphControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockClusterMonitorGraphControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedClusterMonitorGraphController.StartCalls()) +func (mock *ClusterMonitorGraphControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockClusterMonitorGraphControllerMockStart.RLock() + calls = mock.calls.Start + lockClusterMonitorGraphControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *ClusterMonitorGraphControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("ClusterMonitorGraphControllerMock.SyncFunc: method is nil but ClusterMonitorGraphController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockClusterMonitorGraphControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockClusterMonitorGraphControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedClusterMonitorGraphController.SyncCalls()) +func (mock *ClusterMonitorGraphControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockClusterMonitorGraphControllerMockSync.RLock() + calls = mock.calls.Sync + lockClusterMonitorGraphControllerMockSync.RUnlock() + return calls +} + +var ( + lockClusterMonitorGraphInterfaceMockAddClusterScopedHandler sync.RWMutex + lockClusterMonitorGraphInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockClusterMonitorGraphInterfaceMockAddHandler sync.RWMutex + lockClusterMonitorGraphInterfaceMockAddLifecycle sync.RWMutex + lockClusterMonitorGraphInterfaceMockController sync.RWMutex + lockClusterMonitorGraphInterfaceMockCreate sync.RWMutex + lockClusterMonitorGraphInterfaceMockDelete sync.RWMutex + lockClusterMonitorGraphInterfaceMockDeleteCollection sync.RWMutex + lockClusterMonitorGraphInterfaceMockDeleteNamespaced sync.RWMutex + lockClusterMonitorGraphInterfaceMockGet sync.RWMutex + lockClusterMonitorGraphInterfaceMockGetNamespaced sync.RWMutex + lockClusterMonitorGraphInterfaceMockList sync.RWMutex + lockClusterMonitorGraphInterfaceMockObjectClient sync.RWMutex + lockClusterMonitorGraphInterfaceMockUpdate sync.RWMutex + lockClusterMonitorGraphInterfaceMockWatch sync.RWMutex +) + +// Ensure, that ClusterMonitorGraphInterfaceMock does implement ClusterMonitorGraphInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.ClusterMonitorGraphInterface = &ClusterMonitorGraphInterfaceMock{} + +// ClusterMonitorGraphInterfaceMock is a mock implementation of ClusterMonitorGraphInterface. +// +// func TestSomethingThatUsesClusterMonitorGraphInterface(t *testing.T) { +// +// // make and configure a mocked ClusterMonitorGraphInterface +// mockedClusterMonitorGraphInterface := &ClusterMonitorGraphInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.ClusterMonitorGraphHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.ClusterMonitorGraphLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.ClusterMonitorGraphHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.ClusterMonitorGraphLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.ClusterMonitorGraphController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.ClusterMonitorGraph) (*v3.ClusterMonitorGraph, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.ClusterMonitorGraph, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.ClusterMonitorGraph, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.ClusterMonitorGraphList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.ClusterMonitorGraph) (*v3.ClusterMonitorGraph, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedClusterMonitorGraphInterface in code that requires ClusterMonitorGraphInterface +// // and then make assertions. +// +// } +type ClusterMonitorGraphInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.ClusterMonitorGraphHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.ClusterMonitorGraphLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.ClusterMonitorGraphHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.ClusterMonitorGraphLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.ClusterMonitorGraphController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.ClusterMonitorGraph) (*v3.ClusterMonitorGraph, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.ClusterMonitorGraph, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.ClusterMonitorGraph, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.ClusterMonitorGraphList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.ClusterMonitorGraph) (*v3.ClusterMonitorGraph, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.ClusterMonitorGraphHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.ClusterMonitorGraphLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.ClusterMonitorGraphHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.ClusterMonitorGraphLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.ClusterMonitorGraph + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.ClusterMonitorGraph + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ClusterMonitorGraphInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.ClusterMonitorGraphHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ClusterMonitorGraphInterfaceMock.AddClusterScopedHandlerFunc: method is nil but ClusterMonitorGraphInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ClusterMonitorGraphHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockClusterMonitorGraphInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockClusterMonitorGraphInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedClusterMonitorGraphInterface.AddClusterScopedHandlerCalls()) +func (mock *ClusterMonitorGraphInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ClusterMonitorGraphHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ClusterMonitorGraphHandlerFunc + } + lockClusterMonitorGraphInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockClusterMonitorGraphInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *ClusterMonitorGraphInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.ClusterMonitorGraphLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("ClusterMonitorGraphInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but ClusterMonitorGraphInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ClusterMonitorGraphLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockClusterMonitorGraphInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockClusterMonitorGraphInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedClusterMonitorGraphInterface.AddClusterScopedLifecycleCalls()) +func (mock *ClusterMonitorGraphInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ClusterMonitorGraphLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ClusterMonitorGraphLifecycle + } + lockClusterMonitorGraphInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockClusterMonitorGraphInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ClusterMonitorGraphInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.ClusterMonitorGraphHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ClusterMonitorGraphInterfaceMock.AddHandlerFunc: method is nil but ClusterMonitorGraphInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.ClusterMonitorGraphHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockClusterMonitorGraphInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockClusterMonitorGraphInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedClusterMonitorGraphInterface.AddHandlerCalls()) +func (mock *ClusterMonitorGraphInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.ClusterMonitorGraphHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.ClusterMonitorGraphHandlerFunc + } + lockClusterMonitorGraphInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockClusterMonitorGraphInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *ClusterMonitorGraphInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.ClusterMonitorGraphLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("ClusterMonitorGraphInterfaceMock.AddLifecycleFunc: method is nil but ClusterMonitorGraphInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.ClusterMonitorGraphLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockClusterMonitorGraphInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockClusterMonitorGraphInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedClusterMonitorGraphInterface.AddLifecycleCalls()) +func (mock *ClusterMonitorGraphInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.ClusterMonitorGraphLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.ClusterMonitorGraphLifecycle + } + lockClusterMonitorGraphInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockClusterMonitorGraphInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *ClusterMonitorGraphInterfaceMock) Controller() v3.ClusterMonitorGraphController { + if mock.ControllerFunc == nil { + panic("ClusterMonitorGraphInterfaceMock.ControllerFunc: method is nil but ClusterMonitorGraphInterface.Controller was just called") + } + callInfo := struct { + }{} + lockClusterMonitorGraphInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockClusterMonitorGraphInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedClusterMonitorGraphInterface.ControllerCalls()) +func (mock *ClusterMonitorGraphInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockClusterMonitorGraphInterfaceMockController.RLock() + calls = mock.calls.Controller + lockClusterMonitorGraphInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *ClusterMonitorGraphInterfaceMock) Create(in1 *v3.ClusterMonitorGraph) (*v3.ClusterMonitorGraph, error) { + if mock.CreateFunc == nil { + panic("ClusterMonitorGraphInterfaceMock.CreateFunc: method is nil but ClusterMonitorGraphInterface.Create was just called") + } + callInfo := struct { + In1 *v3.ClusterMonitorGraph + }{ + In1: in1, + } + lockClusterMonitorGraphInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockClusterMonitorGraphInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedClusterMonitorGraphInterface.CreateCalls()) +func (mock *ClusterMonitorGraphInterfaceMock) CreateCalls() []struct { + In1 *v3.ClusterMonitorGraph +} { + var calls []struct { + In1 *v3.ClusterMonitorGraph + } + lockClusterMonitorGraphInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockClusterMonitorGraphInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *ClusterMonitorGraphInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("ClusterMonitorGraphInterfaceMock.DeleteFunc: method is nil but ClusterMonitorGraphInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockClusterMonitorGraphInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockClusterMonitorGraphInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedClusterMonitorGraphInterface.DeleteCalls()) +func (mock *ClusterMonitorGraphInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockClusterMonitorGraphInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockClusterMonitorGraphInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *ClusterMonitorGraphInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("ClusterMonitorGraphInterfaceMock.DeleteCollectionFunc: method is nil but ClusterMonitorGraphInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockClusterMonitorGraphInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockClusterMonitorGraphInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedClusterMonitorGraphInterface.DeleteCollectionCalls()) +func (mock *ClusterMonitorGraphInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockClusterMonitorGraphInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockClusterMonitorGraphInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *ClusterMonitorGraphInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("ClusterMonitorGraphInterfaceMock.DeleteNamespacedFunc: method is nil but ClusterMonitorGraphInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockClusterMonitorGraphInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockClusterMonitorGraphInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedClusterMonitorGraphInterface.DeleteNamespacedCalls()) +func (mock *ClusterMonitorGraphInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockClusterMonitorGraphInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockClusterMonitorGraphInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *ClusterMonitorGraphInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.ClusterMonitorGraph, error) { + if mock.GetFunc == nil { + panic("ClusterMonitorGraphInterfaceMock.GetFunc: method is nil but ClusterMonitorGraphInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockClusterMonitorGraphInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockClusterMonitorGraphInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedClusterMonitorGraphInterface.GetCalls()) +func (mock *ClusterMonitorGraphInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockClusterMonitorGraphInterfaceMockGet.RLock() + calls = mock.calls.Get + lockClusterMonitorGraphInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *ClusterMonitorGraphInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.ClusterMonitorGraph, error) { + if mock.GetNamespacedFunc == nil { + panic("ClusterMonitorGraphInterfaceMock.GetNamespacedFunc: method is nil but ClusterMonitorGraphInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockClusterMonitorGraphInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockClusterMonitorGraphInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedClusterMonitorGraphInterface.GetNamespacedCalls()) +func (mock *ClusterMonitorGraphInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockClusterMonitorGraphInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockClusterMonitorGraphInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ClusterMonitorGraphInterfaceMock) List(opts v1.ListOptions) (*v3.ClusterMonitorGraphList, error) { + if mock.ListFunc == nil { + panic("ClusterMonitorGraphInterfaceMock.ListFunc: method is nil but ClusterMonitorGraphInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockClusterMonitorGraphInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockClusterMonitorGraphInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedClusterMonitorGraphInterface.ListCalls()) +func (mock *ClusterMonitorGraphInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockClusterMonitorGraphInterfaceMockList.RLock() + calls = mock.calls.List + lockClusterMonitorGraphInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *ClusterMonitorGraphInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("ClusterMonitorGraphInterfaceMock.ObjectClientFunc: method is nil but ClusterMonitorGraphInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockClusterMonitorGraphInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockClusterMonitorGraphInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedClusterMonitorGraphInterface.ObjectClientCalls()) +func (mock *ClusterMonitorGraphInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockClusterMonitorGraphInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockClusterMonitorGraphInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *ClusterMonitorGraphInterfaceMock) Update(in1 *v3.ClusterMonitorGraph) (*v3.ClusterMonitorGraph, error) { + if mock.UpdateFunc == nil { + panic("ClusterMonitorGraphInterfaceMock.UpdateFunc: method is nil but ClusterMonitorGraphInterface.Update was just called") + } + callInfo := struct { + In1 *v3.ClusterMonitorGraph + }{ + In1: in1, + } + lockClusterMonitorGraphInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockClusterMonitorGraphInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedClusterMonitorGraphInterface.UpdateCalls()) +func (mock *ClusterMonitorGraphInterfaceMock) UpdateCalls() []struct { + In1 *v3.ClusterMonitorGraph +} { + var calls []struct { + In1 *v3.ClusterMonitorGraph + } + lockClusterMonitorGraphInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockClusterMonitorGraphInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *ClusterMonitorGraphInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("ClusterMonitorGraphInterfaceMock.WatchFunc: method is nil but ClusterMonitorGraphInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockClusterMonitorGraphInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockClusterMonitorGraphInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedClusterMonitorGraphInterface.WatchCalls()) +func (mock *ClusterMonitorGraphInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockClusterMonitorGraphInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockClusterMonitorGraphInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockClusterMonitorGraphsGetterMockClusterMonitorGraphs sync.RWMutex +) + +// Ensure, that ClusterMonitorGraphsGetterMock does implement ClusterMonitorGraphsGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.ClusterMonitorGraphsGetter = &ClusterMonitorGraphsGetterMock{} + +// ClusterMonitorGraphsGetterMock is a mock implementation of ClusterMonitorGraphsGetter. +// +// func TestSomethingThatUsesClusterMonitorGraphsGetter(t *testing.T) { +// +// // make and configure a mocked ClusterMonitorGraphsGetter +// mockedClusterMonitorGraphsGetter := &ClusterMonitorGraphsGetterMock{ +// ClusterMonitorGraphsFunc: func(namespace string) v3.ClusterMonitorGraphInterface { +// panic("mock out the ClusterMonitorGraphs method") +// }, +// } +// +// // use mockedClusterMonitorGraphsGetter in code that requires ClusterMonitorGraphsGetter +// // and then make assertions. +// +// } +type ClusterMonitorGraphsGetterMock struct { + // ClusterMonitorGraphsFunc mocks the ClusterMonitorGraphs method. + ClusterMonitorGraphsFunc func(namespace string) v3.ClusterMonitorGraphInterface + + // calls tracks calls to the methods. + calls struct { + // ClusterMonitorGraphs holds details about calls to the ClusterMonitorGraphs method. + ClusterMonitorGraphs []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// ClusterMonitorGraphs calls ClusterMonitorGraphsFunc. +func (mock *ClusterMonitorGraphsGetterMock) ClusterMonitorGraphs(namespace string) v3.ClusterMonitorGraphInterface { + if mock.ClusterMonitorGraphsFunc == nil { + panic("ClusterMonitorGraphsGetterMock.ClusterMonitorGraphsFunc: method is nil but ClusterMonitorGraphsGetter.ClusterMonitorGraphs was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockClusterMonitorGraphsGetterMockClusterMonitorGraphs.Lock() + mock.calls.ClusterMonitorGraphs = append(mock.calls.ClusterMonitorGraphs, callInfo) + lockClusterMonitorGraphsGetterMockClusterMonitorGraphs.Unlock() + return mock.ClusterMonitorGraphsFunc(namespace) +} + +// ClusterMonitorGraphsCalls gets all the calls that were made to ClusterMonitorGraphs. +// Check the length with: +// len(mockedClusterMonitorGraphsGetter.ClusterMonitorGraphsCalls()) +func (mock *ClusterMonitorGraphsGetterMock) ClusterMonitorGraphsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockClusterMonitorGraphsGetterMockClusterMonitorGraphs.RLock() + calls = mock.calls.ClusterMonitorGraphs + lockClusterMonitorGraphsGetterMockClusterMonitorGraphs.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_cluster_registration_token_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_cluster_registration_token_mock_test.go new file mode 100644 index 00000000..da277cb9 --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_cluster_registration_token_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockClusterRegistrationTokenListerMockGet sync.RWMutex + lockClusterRegistrationTokenListerMockList sync.RWMutex +) + +// Ensure, that ClusterRegistrationTokenListerMock does implement ClusterRegistrationTokenLister. +// If this is not the case, regenerate this file with moq. +var _ v3.ClusterRegistrationTokenLister = &ClusterRegistrationTokenListerMock{} + +// ClusterRegistrationTokenListerMock is a mock implementation of ClusterRegistrationTokenLister. +// +// func TestSomethingThatUsesClusterRegistrationTokenLister(t *testing.T) { +// +// // make and configure a mocked ClusterRegistrationTokenLister +// mockedClusterRegistrationTokenLister := &ClusterRegistrationTokenListerMock{ +// GetFunc: func(namespace string, name string) (*v3.ClusterRegistrationToken, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.ClusterRegistrationToken, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedClusterRegistrationTokenLister in code that requires ClusterRegistrationTokenLister +// // and then make assertions. +// +// } +type ClusterRegistrationTokenListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.ClusterRegistrationToken, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.ClusterRegistrationToken, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *ClusterRegistrationTokenListerMock) Get(namespace string, name string) (*v3.ClusterRegistrationToken, error) { + if mock.GetFunc == nil { + panic("ClusterRegistrationTokenListerMock.GetFunc: method is nil but ClusterRegistrationTokenLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockClusterRegistrationTokenListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockClusterRegistrationTokenListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedClusterRegistrationTokenLister.GetCalls()) +func (mock *ClusterRegistrationTokenListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockClusterRegistrationTokenListerMockGet.RLock() + calls = mock.calls.Get + lockClusterRegistrationTokenListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ClusterRegistrationTokenListerMock) List(namespace string, selector labels.Selector) ([]*v3.ClusterRegistrationToken, error) { + if mock.ListFunc == nil { + panic("ClusterRegistrationTokenListerMock.ListFunc: method is nil but ClusterRegistrationTokenLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockClusterRegistrationTokenListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockClusterRegistrationTokenListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedClusterRegistrationTokenLister.ListCalls()) +func (mock *ClusterRegistrationTokenListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockClusterRegistrationTokenListerMockList.RLock() + calls = mock.calls.List + lockClusterRegistrationTokenListerMockList.RUnlock() + return calls +} + +var ( + lockClusterRegistrationTokenControllerMockAddClusterScopedHandler sync.RWMutex + lockClusterRegistrationTokenControllerMockAddHandler sync.RWMutex + lockClusterRegistrationTokenControllerMockEnqueue sync.RWMutex + lockClusterRegistrationTokenControllerMockGeneric sync.RWMutex + lockClusterRegistrationTokenControllerMockInformer sync.RWMutex + lockClusterRegistrationTokenControllerMockLister sync.RWMutex + lockClusterRegistrationTokenControllerMockStart sync.RWMutex + lockClusterRegistrationTokenControllerMockSync sync.RWMutex +) + +// Ensure, that ClusterRegistrationTokenControllerMock does implement ClusterRegistrationTokenController. +// If this is not the case, regenerate this file with moq. +var _ v3.ClusterRegistrationTokenController = &ClusterRegistrationTokenControllerMock{} + +// ClusterRegistrationTokenControllerMock is a mock implementation of ClusterRegistrationTokenController. +// +// func TestSomethingThatUsesClusterRegistrationTokenController(t *testing.T) { +// +// // make and configure a mocked ClusterRegistrationTokenController +// mockedClusterRegistrationTokenController := &ClusterRegistrationTokenControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.ClusterRegistrationTokenHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.ClusterRegistrationTokenHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.ClusterRegistrationTokenLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedClusterRegistrationTokenController in code that requires ClusterRegistrationTokenController +// // and then make assertions. +// +// } +type ClusterRegistrationTokenControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.ClusterRegistrationTokenHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.ClusterRegistrationTokenHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.ClusterRegistrationTokenLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.ClusterRegistrationTokenHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.ClusterRegistrationTokenHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ClusterRegistrationTokenControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.ClusterRegistrationTokenHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ClusterRegistrationTokenControllerMock.AddClusterScopedHandlerFunc: method is nil but ClusterRegistrationTokenController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ClusterRegistrationTokenHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockClusterRegistrationTokenControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockClusterRegistrationTokenControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedClusterRegistrationTokenController.AddClusterScopedHandlerCalls()) +func (mock *ClusterRegistrationTokenControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ClusterRegistrationTokenHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ClusterRegistrationTokenHandlerFunc + } + lockClusterRegistrationTokenControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockClusterRegistrationTokenControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ClusterRegistrationTokenControllerMock) AddHandler(ctx context.Context, name string, handler v3.ClusterRegistrationTokenHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ClusterRegistrationTokenControllerMock.AddHandlerFunc: method is nil but ClusterRegistrationTokenController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.ClusterRegistrationTokenHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockClusterRegistrationTokenControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockClusterRegistrationTokenControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedClusterRegistrationTokenController.AddHandlerCalls()) +func (mock *ClusterRegistrationTokenControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.ClusterRegistrationTokenHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.ClusterRegistrationTokenHandlerFunc + } + lockClusterRegistrationTokenControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockClusterRegistrationTokenControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *ClusterRegistrationTokenControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("ClusterRegistrationTokenControllerMock.EnqueueFunc: method is nil but ClusterRegistrationTokenController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockClusterRegistrationTokenControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockClusterRegistrationTokenControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedClusterRegistrationTokenController.EnqueueCalls()) +func (mock *ClusterRegistrationTokenControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockClusterRegistrationTokenControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockClusterRegistrationTokenControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *ClusterRegistrationTokenControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("ClusterRegistrationTokenControllerMock.GenericFunc: method is nil but ClusterRegistrationTokenController.Generic was just called") + } + callInfo := struct { + }{} + lockClusterRegistrationTokenControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockClusterRegistrationTokenControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedClusterRegistrationTokenController.GenericCalls()) +func (mock *ClusterRegistrationTokenControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockClusterRegistrationTokenControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockClusterRegistrationTokenControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *ClusterRegistrationTokenControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("ClusterRegistrationTokenControllerMock.InformerFunc: method is nil but ClusterRegistrationTokenController.Informer was just called") + } + callInfo := struct { + }{} + lockClusterRegistrationTokenControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockClusterRegistrationTokenControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedClusterRegistrationTokenController.InformerCalls()) +func (mock *ClusterRegistrationTokenControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockClusterRegistrationTokenControllerMockInformer.RLock() + calls = mock.calls.Informer + lockClusterRegistrationTokenControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *ClusterRegistrationTokenControllerMock) Lister() v3.ClusterRegistrationTokenLister { + if mock.ListerFunc == nil { + panic("ClusterRegistrationTokenControllerMock.ListerFunc: method is nil but ClusterRegistrationTokenController.Lister was just called") + } + callInfo := struct { + }{} + lockClusterRegistrationTokenControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockClusterRegistrationTokenControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedClusterRegistrationTokenController.ListerCalls()) +func (mock *ClusterRegistrationTokenControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockClusterRegistrationTokenControllerMockLister.RLock() + calls = mock.calls.Lister + lockClusterRegistrationTokenControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *ClusterRegistrationTokenControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("ClusterRegistrationTokenControllerMock.StartFunc: method is nil but ClusterRegistrationTokenController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockClusterRegistrationTokenControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockClusterRegistrationTokenControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedClusterRegistrationTokenController.StartCalls()) +func (mock *ClusterRegistrationTokenControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockClusterRegistrationTokenControllerMockStart.RLock() + calls = mock.calls.Start + lockClusterRegistrationTokenControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *ClusterRegistrationTokenControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("ClusterRegistrationTokenControllerMock.SyncFunc: method is nil but ClusterRegistrationTokenController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockClusterRegistrationTokenControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockClusterRegistrationTokenControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedClusterRegistrationTokenController.SyncCalls()) +func (mock *ClusterRegistrationTokenControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockClusterRegistrationTokenControllerMockSync.RLock() + calls = mock.calls.Sync + lockClusterRegistrationTokenControllerMockSync.RUnlock() + return calls +} + +var ( + lockClusterRegistrationTokenInterfaceMockAddClusterScopedHandler sync.RWMutex + lockClusterRegistrationTokenInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockClusterRegistrationTokenInterfaceMockAddHandler sync.RWMutex + lockClusterRegistrationTokenInterfaceMockAddLifecycle sync.RWMutex + lockClusterRegistrationTokenInterfaceMockController sync.RWMutex + lockClusterRegistrationTokenInterfaceMockCreate sync.RWMutex + lockClusterRegistrationTokenInterfaceMockDelete sync.RWMutex + lockClusterRegistrationTokenInterfaceMockDeleteCollection sync.RWMutex + lockClusterRegistrationTokenInterfaceMockDeleteNamespaced sync.RWMutex + lockClusterRegistrationTokenInterfaceMockGet sync.RWMutex + lockClusterRegistrationTokenInterfaceMockGetNamespaced sync.RWMutex + lockClusterRegistrationTokenInterfaceMockList sync.RWMutex + lockClusterRegistrationTokenInterfaceMockObjectClient sync.RWMutex + lockClusterRegistrationTokenInterfaceMockUpdate sync.RWMutex + lockClusterRegistrationTokenInterfaceMockWatch sync.RWMutex +) + +// Ensure, that ClusterRegistrationTokenInterfaceMock does implement ClusterRegistrationTokenInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.ClusterRegistrationTokenInterface = &ClusterRegistrationTokenInterfaceMock{} + +// ClusterRegistrationTokenInterfaceMock is a mock implementation of ClusterRegistrationTokenInterface. +// +// func TestSomethingThatUsesClusterRegistrationTokenInterface(t *testing.T) { +// +// // make and configure a mocked ClusterRegistrationTokenInterface +// mockedClusterRegistrationTokenInterface := &ClusterRegistrationTokenInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.ClusterRegistrationTokenHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.ClusterRegistrationTokenLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.ClusterRegistrationTokenHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.ClusterRegistrationTokenLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.ClusterRegistrationTokenController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.ClusterRegistrationToken) (*v3.ClusterRegistrationToken, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.ClusterRegistrationToken, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.ClusterRegistrationToken, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.ClusterRegistrationTokenList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.ClusterRegistrationToken) (*v3.ClusterRegistrationToken, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedClusterRegistrationTokenInterface in code that requires ClusterRegistrationTokenInterface +// // and then make assertions. +// +// } +type ClusterRegistrationTokenInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.ClusterRegistrationTokenHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.ClusterRegistrationTokenLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.ClusterRegistrationTokenHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.ClusterRegistrationTokenLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.ClusterRegistrationTokenController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.ClusterRegistrationToken) (*v3.ClusterRegistrationToken, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.ClusterRegistrationToken, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.ClusterRegistrationToken, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.ClusterRegistrationTokenList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.ClusterRegistrationToken) (*v3.ClusterRegistrationToken, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.ClusterRegistrationTokenHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.ClusterRegistrationTokenLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.ClusterRegistrationTokenHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.ClusterRegistrationTokenLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.ClusterRegistrationToken + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.ClusterRegistrationToken + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ClusterRegistrationTokenInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.ClusterRegistrationTokenHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ClusterRegistrationTokenInterfaceMock.AddClusterScopedHandlerFunc: method is nil but ClusterRegistrationTokenInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ClusterRegistrationTokenHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockClusterRegistrationTokenInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockClusterRegistrationTokenInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedClusterRegistrationTokenInterface.AddClusterScopedHandlerCalls()) +func (mock *ClusterRegistrationTokenInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ClusterRegistrationTokenHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ClusterRegistrationTokenHandlerFunc + } + lockClusterRegistrationTokenInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockClusterRegistrationTokenInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *ClusterRegistrationTokenInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.ClusterRegistrationTokenLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("ClusterRegistrationTokenInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but ClusterRegistrationTokenInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ClusterRegistrationTokenLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockClusterRegistrationTokenInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockClusterRegistrationTokenInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedClusterRegistrationTokenInterface.AddClusterScopedLifecycleCalls()) +func (mock *ClusterRegistrationTokenInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ClusterRegistrationTokenLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ClusterRegistrationTokenLifecycle + } + lockClusterRegistrationTokenInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockClusterRegistrationTokenInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ClusterRegistrationTokenInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.ClusterRegistrationTokenHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ClusterRegistrationTokenInterfaceMock.AddHandlerFunc: method is nil but ClusterRegistrationTokenInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.ClusterRegistrationTokenHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockClusterRegistrationTokenInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockClusterRegistrationTokenInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedClusterRegistrationTokenInterface.AddHandlerCalls()) +func (mock *ClusterRegistrationTokenInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.ClusterRegistrationTokenHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.ClusterRegistrationTokenHandlerFunc + } + lockClusterRegistrationTokenInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockClusterRegistrationTokenInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *ClusterRegistrationTokenInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.ClusterRegistrationTokenLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("ClusterRegistrationTokenInterfaceMock.AddLifecycleFunc: method is nil but ClusterRegistrationTokenInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.ClusterRegistrationTokenLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockClusterRegistrationTokenInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockClusterRegistrationTokenInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedClusterRegistrationTokenInterface.AddLifecycleCalls()) +func (mock *ClusterRegistrationTokenInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.ClusterRegistrationTokenLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.ClusterRegistrationTokenLifecycle + } + lockClusterRegistrationTokenInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockClusterRegistrationTokenInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *ClusterRegistrationTokenInterfaceMock) Controller() v3.ClusterRegistrationTokenController { + if mock.ControllerFunc == nil { + panic("ClusterRegistrationTokenInterfaceMock.ControllerFunc: method is nil but ClusterRegistrationTokenInterface.Controller was just called") + } + callInfo := struct { + }{} + lockClusterRegistrationTokenInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockClusterRegistrationTokenInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedClusterRegistrationTokenInterface.ControllerCalls()) +func (mock *ClusterRegistrationTokenInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockClusterRegistrationTokenInterfaceMockController.RLock() + calls = mock.calls.Controller + lockClusterRegistrationTokenInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *ClusterRegistrationTokenInterfaceMock) Create(in1 *v3.ClusterRegistrationToken) (*v3.ClusterRegistrationToken, error) { + if mock.CreateFunc == nil { + panic("ClusterRegistrationTokenInterfaceMock.CreateFunc: method is nil but ClusterRegistrationTokenInterface.Create was just called") + } + callInfo := struct { + In1 *v3.ClusterRegistrationToken + }{ + In1: in1, + } + lockClusterRegistrationTokenInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockClusterRegistrationTokenInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedClusterRegistrationTokenInterface.CreateCalls()) +func (mock *ClusterRegistrationTokenInterfaceMock) CreateCalls() []struct { + In1 *v3.ClusterRegistrationToken +} { + var calls []struct { + In1 *v3.ClusterRegistrationToken + } + lockClusterRegistrationTokenInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockClusterRegistrationTokenInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *ClusterRegistrationTokenInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("ClusterRegistrationTokenInterfaceMock.DeleteFunc: method is nil but ClusterRegistrationTokenInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockClusterRegistrationTokenInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockClusterRegistrationTokenInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedClusterRegistrationTokenInterface.DeleteCalls()) +func (mock *ClusterRegistrationTokenInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockClusterRegistrationTokenInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockClusterRegistrationTokenInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *ClusterRegistrationTokenInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("ClusterRegistrationTokenInterfaceMock.DeleteCollectionFunc: method is nil but ClusterRegistrationTokenInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockClusterRegistrationTokenInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockClusterRegistrationTokenInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedClusterRegistrationTokenInterface.DeleteCollectionCalls()) +func (mock *ClusterRegistrationTokenInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockClusterRegistrationTokenInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockClusterRegistrationTokenInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *ClusterRegistrationTokenInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("ClusterRegistrationTokenInterfaceMock.DeleteNamespacedFunc: method is nil but ClusterRegistrationTokenInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockClusterRegistrationTokenInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockClusterRegistrationTokenInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedClusterRegistrationTokenInterface.DeleteNamespacedCalls()) +func (mock *ClusterRegistrationTokenInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockClusterRegistrationTokenInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockClusterRegistrationTokenInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *ClusterRegistrationTokenInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.ClusterRegistrationToken, error) { + if mock.GetFunc == nil { + panic("ClusterRegistrationTokenInterfaceMock.GetFunc: method is nil but ClusterRegistrationTokenInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockClusterRegistrationTokenInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockClusterRegistrationTokenInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedClusterRegistrationTokenInterface.GetCalls()) +func (mock *ClusterRegistrationTokenInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockClusterRegistrationTokenInterfaceMockGet.RLock() + calls = mock.calls.Get + lockClusterRegistrationTokenInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *ClusterRegistrationTokenInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.ClusterRegistrationToken, error) { + if mock.GetNamespacedFunc == nil { + panic("ClusterRegistrationTokenInterfaceMock.GetNamespacedFunc: method is nil but ClusterRegistrationTokenInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockClusterRegistrationTokenInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockClusterRegistrationTokenInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedClusterRegistrationTokenInterface.GetNamespacedCalls()) +func (mock *ClusterRegistrationTokenInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockClusterRegistrationTokenInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockClusterRegistrationTokenInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ClusterRegistrationTokenInterfaceMock) List(opts v1.ListOptions) (*v3.ClusterRegistrationTokenList, error) { + if mock.ListFunc == nil { + panic("ClusterRegistrationTokenInterfaceMock.ListFunc: method is nil but ClusterRegistrationTokenInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockClusterRegistrationTokenInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockClusterRegistrationTokenInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedClusterRegistrationTokenInterface.ListCalls()) +func (mock *ClusterRegistrationTokenInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockClusterRegistrationTokenInterfaceMockList.RLock() + calls = mock.calls.List + lockClusterRegistrationTokenInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *ClusterRegistrationTokenInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("ClusterRegistrationTokenInterfaceMock.ObjectClientFunc: method is nil but ClusterRegistrationTokenInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockClusterRegistrationTokenInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockClusterRegistrationTokenInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedClusterRegistrationTokenInterface.ObjectClientCalls()) +func (mock *ClusterRegistrationTokenInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockClusterRegistrationTokenInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockClusterRegistrationTokenInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *ClusterRegistrationTokenInterfaceMock) Update(in1 *v3.ClusterRegistrationToken) (*v3.ClusterRegistrationToken, error) { + if mock.UpdateFunc == nil { + panic("ClusterRegistrationTokenInterfaceMock.UpdateFunc: method is nil but ClusterRegistrationTokenInterface.Update was just called") + } + callInfo := struct { + In1 *v3.ClusterRegistrationToken + }{ + In1: in1, + } + lockClusterRegistrationTokenInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockClusterRegistrationTokenInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedClusterRegistrationTokenInterface.UpdateCalls()) +func (mock *ClusterRegistrationTokenInterfaceMock) UpdateCalls() []struct { + In1 *v3.ClusterRegistrationToken +} { + var calls []struct { + In1 *v3.ClusterRegistrationToken + } + lockClusterRegistrationTokenInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockClusterRegistrationTokenInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *ClusterRegistrationTokenInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("ClusterRegistrationTokenInterfaceMock.WatchFunc: method is nil but ClusterRegistrationTokenInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockClusterRegistrationTokenInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockClusterRegistrationTokenInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedClusterRegistrationTokenInterface.WatchCalls()) +func (mock *ClusterRegistrationTokenInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockClusterRegistrationTokenInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockClusterRegistrationTokenInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockClusterRegistrationTokensGetterMockClusterRegistrationTokens sync.RWMutex +) + +// Ensure, that ClusterRegistrationTokensGetterMock does implement ClusterRegistrationTokensGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.ClusterRegistrationTokensGetter = &ClusterRegistrationTokensGetterMock{} + +// ClusterRegistrationTokensGetterMock is a mock implementation of ClusterRegistrationTokensGetter. +// +// func TestSomethingThatUsesClusterRegistrationTokensGetter(t *testing.T) { +// +// // make and configure a mocked ClusterRegistrationTokensGetter +// mockedClusterRegistrationTokensGetter := &ClusterRegistrationTokensGetterMock{ +// ClusterRegistrationTokensFunc: func(namespace string) v3.ClusterRegistrationTokenInterface { +// panic("mock out the ClusterRegistrationTokens method") +// }, +// } +// +// // use mockedClusterRegistrationTokensGetter in code that requires ClusterRegistrationTokensGetter +// // and then make assertions. +// +// } +type ClusterRegistrationTokensGetterMock struct { + // ClusterRegistrationTokensFunc mocks the ClusterRegistrationTokens method. + ClusterRegistrationTokensFunc func(namespace string) v3.ClusterRegistrationTokenInterface + + // calls tracks calls to the methods. + calls struct { + // ClusterRegistrationTokens holds details about calls to the ClusterRegistrationTokens method. + ClusterRegistrationTokens []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// ClusterRegistrationTokens calls ClusterRegistrationTokensFunc. +func (mock *ClusterRegistrationTokensGetterMock) ClusterRegistrationTokens(namespace string) v3.ClusterRegistrationTokenInterface { + if mock.ClusterRegistrationTokensFunc == nil { + panic("ClusterRegistrationTokensGetterMock.ClusterRegistrationTokensFunc: method is nil but ClusterRegistrationTokensGetter.ClusterRegistrationTokens was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockClusterRegistrationTokensGetterMockClusterRegistrationTokens.Lock() + mock.calls.ClusterRegistrationTokens = append(mock.calls.ClusterRegistrationTokens, callInfo) + lockClusterRegistrationTokensGetterMockClusterRegistrationTokens.Unlock() + return mock.ClusterRegistrationTokensFunc(namespace) +} + +// ClusterRegistrationTokensCalls gets all the calls that were made to ClusterRegistrationTokens. +// Check the length with: +// len(mockedClusterRegistrationTokensGetter.ClusterRegistrationTokensCalls()) +func (mock *ClusterRegistrationTokensGetterMock) ClusterRegistrationTokensCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockClusterRegistrationTokensGetterMockClusterRegistrationTokens.RLock() + calls = mock.calls.ClusterRegistrationTokens + lockClusterRegistrationTokensGetterMockClusterRegistrationTokens.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_cluster_role_template_binding_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_cluster_role_template_binding_mock_test.go new file mode 100644 index 00000000..28dbd3fd --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_cluster_role_template_binding_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockClusterRoleTemplateBindingListerMockGet sync.RWMutex + lockClusterRoleTemplateBindingListerMockList sync.RWMutex +) + +// Ensure, that ClusterRoleTemplateBindingListerMock does implement ClusterRoleTemplateBindingLister. +// If this is not the case, regenerate this file with moq. +var _ v3.ClusterRoleTemplateBindingLister = &ClusterRoleTemplateBindingListerMock{} + +// ClusterRoleTemplateBindingListerMock is a mock implementation of ClusterRoleTemplateBindingLister. +// +// func TestSomethingThatUsesClusterRoleTemplateBindingLister(t *testing.T) { +// +// // make and configure a mocked ClusterRoleTemplateBindingLister +// mockedClusterRoleTemplateBindingLister := &ClusterRoleTemplateBindingListerMock{ +// GetFunc: func(namespace string, name string) (*v3.ClusterRoleTemplateBinding, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.ClusterRoleTemplateBinding, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedClusterRoleTemplateBindingLister in code that requires ClusterRoleTemplateBindingLister +// // and then make assertions. +// +// } +type ClusterRoleTemplateBindingListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.ClusterRoleTemplateBinding, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.ClusterRoleTemplateBinding, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *ClusterRoleTemplateBindingListerMock) Get(namespace string, name string) (*v3.ClusterRoleTemplateBinding, error) { + if mock.GetFunc == nil { + panic("ClusterRoleTemplateBindingListerMock.GetFunc: method is nil but ClusterRoleTemplateBindingLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockClusterRoleTemplateBindingListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockClusterRoleTemplateBindingListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedClusterRoleTemplateBindingLister.GetCalls()) +func (mock *ClusterRoleTemplateBindingListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockClusterRoleTemplateBindingListerMockGet.RLock() + calls = mock.calls.Get + lockClusterRoleTemplateBindingListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ClusterRoleTemplateBindingListerMock) List(namespace string, selector labels.Selector) ([]*v3.ClusterRoleTemplateBinding, error) { + if mock.ListFunc == nil { + panic("ClusterRoleTemplateBindingListerMock.ListFunc: method is nil but ClusterRoleTemplateBindingLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockClusterRoleTemplateBindingListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockClusterRoleTemplateBindingListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedClusterRoleTemplateBindingLister.ListCalls()) +func (mock *ClusterRoleTemplateBindingListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockClusterRoleTemplateBindingListerMockList.RLock() + calls = mock.calls.List + lockClusterRoleTemplateBindingListerMockList.RUnlock() + return calls +} + +var ( + lockClusterRoleTemplateBindingControllerMockAddClusterScopedHandler sync.RWMutex + lockClusterRoleTemplateBindingControllerMockAddHandler sync.RWMutex + lockClusterRoleTemplateBindingControllerMockEnqueue sync.RWMutex + lockClusterRoleTemplateBindingControllerMockGeneric sync.RWMutex + lockClusterRoleTemplateBindingControllerMockInformer sync.RWMutex + lockClusterRoleTemplateBindingControllerMockLister sync.RWMutex + lockClusterRoleTemplateBindingControllerMockStart sync.RWMutex + lockClusterRoleTemplateBindingControllerMockSync sync.RWMutex +) + +// Ensure, that ClusterRoleTemplateBindingControllerMock does implement ClusterRoleTemplateBindingController. +// If this is not the case, regenerate this file with moq. +var _ v3.ClusterRoleTemplateBindingController = &ClusterRoleTemplateBindingControllerMock{} + +// ClusterRoleTemplateBindingControllerMock is a mock implementation of ClusterRoleTemplateBindingController. +// +// func TestSomethingThatUsesClusterRoleTemplateBindingController(t *testing.T) { +// +// // make and configure a mocked ClusterRoleTemplateBindingController +// mockedClusterRoleTemplateBindingController := &ClusterRoleTemplateBindingControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.ClusterRoleTemplateBindingHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.ClusterRoleTemplateBindingHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.ClusterRoleTemplateBindingLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedClusterRoleTemplateBindingController in code that requires ClusterRoleTemplateBindingController +// // and then make assertions. +// +// } +type ClusterRoleTemplateBindingControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.ClusterRoleTemplateBindingHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.ClusterRoleTemplateBindingHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.ClusterRoleTemplateBindingLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.ClusterRoleTemplateBindingHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.ClusterRoleTemplateBindingHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ClusterRoleTemplateBindingControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.ClusterRoleTemplateBindingHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ClusterRoleTemplateBindingControllerMock.AddClusterScopedHandlerFunc: method is nil but ClusterRoleTemplateBindingController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ClusterRoleTemplateBindingHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockClusterRoleTemplateBindingControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockClusterRoleTemplateBindingControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedClusterRoleTemplateBindingController.AddClusterScopedHandlerCalls()) +func (mock *ClusterRoleTemplateBindingControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ClusterRoleTemplateBindingHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ClusterRoleTemplateBindingHandlerFunc + } + lockClusterRoleTemplateBindingControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockClusterRoleTemplateBindingControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ClusterRoleTemplateBindingControllerMock) AddHandler(ctx context.Context, name string, handler v3.ClusterRoleTemplateBindingHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ClusterRoleTemplateBindingControllerMock.AddHandlerFunc: method is nil but ClusterRoleTemplateBindingController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.ClusterRoleTemplateBindingHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockClusterRoleTemplateBindingControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockClusterRoleTemplateBindingControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedClusterRoleTemplateBindingController.AddHandlerCalls()) +func (mock *ClusterRoleTemplateBindingControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.ClusterRoleTemplateBindingHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.ClusterRoleTemplateBindingHandlerFunc + } + lockClusterRoleTemplateBindingControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockClusterRoleTemplateBindingControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *ClusterRoleTemplateBindingControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("ClusterRoleTemplateBindingControllerMock.EnqueueFunc: method is nil but ClusterRoleTemplateBindingController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockClusterRoleTemplateBindingControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockClusterRoleTemplateBindingControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedClusterRoleTemplateBindingController.EnqueueCalls()) +func (mock *ClusterRoleTemplateBindingControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockClusterRoleTemplateBindingControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockClusterRoleTemplateBindingControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *ClusterRoleTemplateBindingControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("ClusterRoleTemplateBindingControllerMock.GenericFunc: method is nil but ClusterRoleTemplateBindingController.Generic was just called") + } + callInfo := struct { + }{} + lockClusterRoleTemplateBindingControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockClusterRoleTemplateBindingControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedClusterRoleTemplateBindingController.GenericCalls()) +func (mock *ClusterRoleTemplateBindingControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockClusterRoleTemplateBindingControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockClusterRoleTemplateBindingControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *ClusterRoleTemplateBindingControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("ClusterRoleTemplateBindingControllerMock.InformerFunc: method is nil but ClusterRoleTemplateBindingController.Informer was just called") + } + callInfo := struct { + }{} + lockClusterRoleTemplateBindingControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockClusterRoleTemplateBindingControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedClusterRoleTemplateBindingController.InformerCalls()) +func (mock *ClusterRoleTemplateBindingControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockClusterRoleTemplateBindingControllerMockInformer.RLock() + calls = mock.calls.Informer + lockClusterRoleTemplateBindingControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *ClusterRoleTemplateBindingControllerMock) Lister() v3.ClusterRoleTemplateBindingLister { + if mock.ListerFunc == nil { + panic("ClusterRoleTemplateBindingControllerMock.ListerFunc: method is nil but ClusterRoleTemplateBindingController.Lister was just called") + } + callInfo := struct { + }{} + lockClusterRoleTemplateBindingControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockClusterRoleTemplateBindingControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedClusterRoleTemplateBindingController.ListerCalls()) +func (mock *ClusterRoleTemplateBindingControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockClusterRoleTemplateBindingControllerMockLister.RLock() + calls = mock.calls.Lister + lockClusterRoleTemplateBindingControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *ClusterRoleTemplateBindingControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("ClusterRoleTemplateBindingControllerMock.StartFunc: method is nil but ClusterRoleTemplateBindingController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockClusterRoleTemplateBindingControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockClusterRoleTemplateBindingControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedClusterRoleTemplateBindingController.StartCalls()) +func (mock *ClusterRoleTemplateBindingControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockClusterRoleTemplateBindingControllerMockStart.RLock() + calls = mock.calls.Start + lockClusterRoleTemplateBindingControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *ClusterRoleTemplateBindingControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("ClusterRoleTemplateBindingControllerMock.SyncFunc: method is nil but ClusterRoleTemplateBindingController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockClusterRoleTemplateBindingControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockClusterRoleTemplateBindingControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedClusterRoleTemplateBindingController.SyncCalls()) +func (mock *ClusterRoleTemplateBindingControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockClusterRoleTemplateBindingControllerMockSync.RLock() + calls = mock.calls.Sync + lockClusterRoleTemplateBindingControllerMockSync.RUnlock() + return calls +} + +var ( + lockClusterRoleTemplateBindingInterfaceMockAddClusterScopedHandler sync.RWMutex + lockClusterRoleTemplateBindingInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockClusterRoleTemplateBindingInterfaceMockAddHandler sync.RWMutex + lockClusterRoleTemplateBindingInterfaceMockAddLifecycle sync.RWMutex + lockClusterRoleTemplateBindingInterfaceMockController sync.RWMutex + lockClusterRoleTemplateBindingInterfaceMockCreate sync.RWMutex + lockClusterRoleTemplateBindingInterfaceMockDelete sync.RWMutex + lockClusterRoleTemplateBindingInterfaceMockDeleteCollection sync.RWMutex + lockClusterRoleTemplateBindingInterfaceMockDeleteNamespaced sync.RWMutex + lockClusterRoleTemplateBindingInterfaceMockGet sync.RWMutex + lockClusterRoleTemplateBindingInterfaceMockGetNamespaced sync.RWMutex + lockClusterRoleTemplateBindingInterfaceMockList sync.RWMutex + lockClusterRoleTemplateBindingInterfaceMockObjectClient sync.RWMutex + lockClusterRoleTemplateBindingInterfaceMockUpdate sync.RWMutex + lockClusterRoleTemplateBindingInterfaceMockWatch sync.RWMutex +) + +// Ensure, that ClusterRoleTemplateBindingInterfaceMock does implement ClusterRoleTemplateBindingInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.ClusterRoleTemplateBindingInterface = &ClusterRoleTemplateBindingInterfaceMock{} + +// ClusterRoleTemplateBindingInterfaceMock is a mock implementation of ClusterRoleTemplateBindingInterface. +// +// func TestSomethingThatUsesClusterRoleTemplateBindingInterface(t *testing.T) { +// +// // make and configure a mocked ClusterRoleTemplateBindingInterface +// mockedClusterRoleTemplateBindingInterface := &ClusterRoleTemplateBindingInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.ClusterRoleTemplateBindingHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.ClusterRoleTemplateBindingLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.ClusterRoleTemplateBindingHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.ClusterRoleTemplateBindingLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.ClusterRoleTemplateBindingController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.ClusterRoleTemplateBinding) (*v3.ClusterRoleTemplateBinding, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.ClusterRoleTemplateBinding, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.ClusterRoleTemplateBinding, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.ClusterRoleTemplateBindingList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.ClusterRoleTemplateBinding) (*v3.ClusterRoleTemplateBinding, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedClusterRoleTemplateBindingInterface in code that requires ClusterRoleTemplateBindingInterface +// // and then make assertions. +// +// } +type ClusterRoleTemplateBindingInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.ClusterRoleTemplateBindingHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.ClusterRoleTemplateBindingLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.ClusterRoleTemplateBindingHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.ClusterRoleTemplateBindingLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.ClusterRoleTemplateBindingController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.ClusterRoleTemplateBinding) (*v3.ClusterRoleTemplateBinding, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.ClusterRoleTemplateBinding, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.ClusterRoleTemplateBinding, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.ClusterRoleTemplateBindingList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.ClusterRoleTemplateBinding) (*v3.ClusterRoleTemplateBinding, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.ClusterRoleTemplateBindingHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.ClusterRoleTemplateBindingLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.ClusterRoleTemplateBindingHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.ClusterRoleTemplateBindingLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.ClusterRoleTemplateBinding + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.ClusterRoleTemplateBinding + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ClusterRoleTemplateBindingInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.ClusterRoleTemplateBindingHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ClusterRoleTemplateBindingInterfaceMock.AddClusterScopedHandlerFunc: method is nil but ClusterRoleTemplateBindingInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ClusterRoleTemplateBindingHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockClusterRoleTemplateBindingInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockClusterRoleTemplateBindingInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedClusterRoleTemplateBindingInterface.AddClusterScopedHandlerCalls()) +func (mock *ClusterRoleTemplateBindingInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ClusterRoleTemplateBindingHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ClusterRoleTemplateBindingHandlerFunc + } + lockClusterRoleTemplateBindingInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockClusterRoleTemplateBindingInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *ClusterRoleTemplateBindingInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.ClusterRoleTemplateBindingLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("ClusterRoleTemplateBindingInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but ClusterRoleTemplateBindingInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ClusterRoleTemplateBindingLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockClusterRoleTemplateBindingInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockClusterRoleTemplateBindingInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedClusterRoleTemplateBindingInterface.AddClusterScopedLifecycleCalls()) +func (mock *ClusterRoleTemplateBindingInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ClusterRoleTemplateBindingLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ClusterRoleTemplateBindingLifecycle + } + lockClusterRoleTemplateBindingInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockClusterRoleTemplateBindingInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ClusterRoleTemplateBindingInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.ClusterRoleTemplateBindingHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ClusterRoleTemplateBindingInterfaceMock.AddHandlerFunc: method is nil but ClusterRoleTemplateBindingInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.ClusterRoleTemplateBindingHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockClusterRoleTemplateBindingInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockClusterRoleTemplateBindingInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedClusterRoleTemplateBindingInterface.AddHandlerCalls()) +func (mock *ClusterRoleTemplateBindingInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.ClusterRoleTemplateBindingHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.ClusterRoleTemplateBindingHandlerFunc + } + lockClusterRoleTemplateBindingInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockClusterRoleTemplateBindingInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *ClusterRoleTemplateBindingInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.ClusterRoleTemplateBindingLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("ClusterRoleTemplateBindingInterfaceMock.AddLifecycleFunc: method is nil but ClusterRoleTemplateBindingInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.ClusterRoleTemplateBindingLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockClusterRoleTemplateBindingInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockClusterRoleTemplateBindingInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedClusterRoleTemplateBindingInterface.AddLifecycleCalls()) +func (mock *ClusterRoleTemplateBindingInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.ClusterRoleTemplateBindingLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.ClusterRoleTemplateBindingLifecycle + } + lockClusterRoleTemplateBindingInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockClusterRoleTemplateBindingInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *ClusterRoleTemplateBindingInterfaceMock) Controller() v3.ClusterRoleTemplateBindingController { + if mock.ControllerFunc == nil { + panic("ClusterRoleTemplateBindingInterfaceMock.ControllerFunc: method is nil but ClusterRoleTemplateBindingInterface.Controller was just called") + } + callInfo := struct { + }{} + lockClusterRoleTemplateBindingInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockClusterRoleTemplateBindingInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedClusterRoleTemplateBindingInterface.ControllerCalls()) +func (mock *ClusterRoleTemplateBindingInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockClusterRoleTemplateBindingInterfaceMockController.RLock() + calls = mock.calls.Controller + lockClusterRoleTemplateBindingInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *ClusterRoleTemplateBindingInterfaceMock) Create(in1 *v3.ClusterRoleTemplateBinding) (*v3.ClusterRoleTemplateBinding, error) { + if mock.CreateFunc == nil { + panic("ClusterRoleTemplateBindingInterfaceMock.CreateFunc: method is nil but ClusterRoleTemplateBindingInterface.Create was just called") + } + callInfo := struct { + In1 *v3.ClusterRoleTemplateBinding + }{ + In1: in1, + } + lockClusterRoleTemplateBindingInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockClusterRoleTemplateBindingInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedClusterRoleTemplateBindingInterface.CreateCalls()) +func (mock *ClusterRoleTemplateBindingInterfaceMock) CreateCalls() []struct { + In1 *v3.ClusterRoleTemplateBinding +} { + var calls []struct { + In1 *v3.ClusterRoleTemplateBinding + } + lockClusterRoleTemplateBindingInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockClusterRoleTemplateBindingInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *ClusterRoleTemplateBindingInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("ClusterRoleTemplateBindingInterfaceMock.DeleteFunc: method is nil but ClusterRoleTemplateBindingInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockClusterRoleTemplateBindingInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockClusterRoleTemplateBindingInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedClusterRoleTemplateBindingInterface.DeleteCalls()) +func (mock *ClusterRoleTemplateBindingInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockClusterRoleTemplateBindingInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockClusterRoleTemplateBindingInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *ClusterRoleTemplateBindingInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("ClusterRoleTemplateBindingInterfaceMock.DeleteCollectionFunc: method is nil but ClusterRoleTemplateBindingInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockClusterRoleTemplateBindingInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockClusterRoleTemplateBindingInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedClusterRoleTemplateBindingInterface.DeleteCollectionCalls()) +func (mock *ClusterRoleTemplateBindingInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockClusterRoleTemplateBindingInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockClusterRoleTemplateBindingInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *ClusterRoleTemplateBindingInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("ClusterRoleTemplateBindingInterfaceMock.DeleteNamespacedFunc: method is nil but ClusterRoleTemplateBindingInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockClusterRoleTemplateBindingInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockClusterRoleTemplateBindingInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedClusterRoleTemplateBindingInterface.DeleteNamespacedCalls()) +func (mock *ClusterRoleTemplateBindingInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockClusterRoleTemplateBindingInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockClusterRoleTemplateBindingInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *ClusterRoleTemplateBindingInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.ClusterRoleTemplateBinding, error) { + if mock.GetFunc == nil { + panic("ClusterRoleTemplateBindingInterfaceMock.GetFunc: method is nil but ClusterRoleTemplateBindingInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockClusterRoleTemplateBindingInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockClusterRoleTemplateBindingInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedClusterRoleTemplateBindingInterface.GetCalls()) +func (mock *ClusterRoleTemplateBindingInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockClusterRoleTemplateBindingInterfaceMockGet.RLock() + calls = mock.calls.Get + lockClusterRoleTemplateBindingInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *ClusterRoleTemplateBindingInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.ClusterRoleTemplateBinding, error) { + if mock.GetNamespacedFunc == nil { + panic("ClusterRoleTemplateBindingInterfaceMock.GetNamespacedFunc: method is nil but ClusterRoleTemplateBindingInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockClusterRoleTemplateBindingInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockClusterRoleTemplateBindingInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedClusterRoleTemplateBindingInterface.GetNamespacedCalls()) +func (mock *ClusterRoleTemplateBindingInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockClusterRoleTemplateBindingInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockClusterRoleTemplateBindingInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ClusterRoleTemplateBindingInterfaceMock) List(opts v1.ListOptions) (*v3.ClusterRoleTemplateBindingList, error) { + if mock.ListFunc == nil { + panic("ClusterRoleTemplateBindingInterfaceMock.ListFunc: method is nil but ClusterRoleTemplateBindingInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockClusterRoleTemplateBindingInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockClusterRoleTemplateBindingInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedClusterRoleTemplateBindingInterface.ListCalls()) +func (mock *ClusterRoleTemplateBindingInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockClusterRoleTemplateBindingInterfaceMockList.RLock() + calls = mock.calls.List + lockClusterRoleTemplateBindingInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *ClusterRoleTemplateBindingInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("ClusterRoleTemplateBindingInterfaceMock.ObjectClientFunc: method is nil but ClusterRoleTemplateBindingInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockClusterRoleTemplateBindingInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockClusterRoleTemplateBindingInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedClusterRoleTemplateBindingInterface.ObjectClientCalls()) +func (mock *ClusterRoleTemplateBindingInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockClusterRoleTemplateBindingInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockClusterRoleTemplateBindingInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *ClusterRoleTemplateBindingInterfaceMock) Update(in1 *v3.ClusterRoleTemplateBinding) (*v3.ClusterRoleTemplateBinding, error) { + if mock.UpdateFunc == nil { + panic("ClusterRoleTemplateBindingInterfaceMock.UpdateFunc: method is nil but ClusterRoleTemplateBindingInterface.Update was just called") + } + callInfo := struct { + In1 *v3.ClusterRoleTemplateBinding + }{ + In1: in1, + } + lockClusterRoleTemplateBindingInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockClusterRoleTemplateBindingInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedClusterRoleTemplateBindingInterface.UpdateCalls()) +func (mock *ClusterRoleTemplateBindingInterfaceMock) UpdateCalls() []struct { + In1 *v3.ClusterRoleTemplateBinding +} { + var calls []struct { + In1 *v3.ClusterRoleTemplateBinding + } + lockClusterRoleTemplateBindingInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockClusterRoleTemplateBindingInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *ClusterRoleTemplateBindingInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("ClusterRoleTemplateBindingInterfaceMock.WatchFunc: method is nil but ClusterRoleTemplateBindingInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockClusterRoleTemplateBindingInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockClusterRoleTemplateBindingInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedClusterRoleTemplateBindingInterface.WatchCalls()) +func (mock *ClusterRoleTemplateBindingInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockClusterRoleTemplateBindingInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockClusterRoleTemplateBindingInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockClusterRoleTemplateBindingsGetterMockClusterRoleTemplateBindings sync.RWMutex +) + +// Ensure, that ClusterRoleTemplateBindingsGetterMock does implement ClusterRoleTemplateBindingsGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.ClusterRoleTemplateBindingsGetter = &ClusterRoleTemplateBindingsGetterMock{} + +// ClusterRoleTemplateBindingsGetterMock is a mock implementation of ClusterRoleTemplateBindingsGetter. +// +// func TestSomethingThatUsesClusterRoleTemplateBindingsGetter(t *testing.T) { +// +// // make and configure a mocked ClusterRoleTemplateBindingsGetter +// mockedClusterRoleTemplateBindingsGetter := &ClusterRoleTemplateBindingsGetterMock{ +// ClusterRoleTemplateBindingsFunc: func(namespace string) v3.ClusterRoleTemplateBindingInterface { +// panic("mock out the ClusterRoleTemplateBindings method") +// }, +// } +// +// // use mockedClusterRoleTemplateBindingsGetter in code that requires ClusterRoleTemplateBindingsGetter +// // and then make assertions. +// +// } +type ClusterRoleTemplateBindingsGetterMock struct { + // ClusterRoleTemplateBindingsFunc mocks the ClusterRoleTemplateBindings method. + ClusterRoleTemplateBindingsFunc func(namespace string) v3.ClusterRoleTemplateBindingInterface + + // calls tracks calls to the methods. + calls struct { + // ClusterRoleTemplateBindings holds details about calls to the ClusterRoleTemplateBindings method. + ClusterRoleTemplateBindings []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// ClusterRoleTemplateBindings calls ClusterRoleTemplateBindingsFunc. +func (mock *ClusterRoleTemplateBindingsGetterMock) ClusterRoleTemplateBindings(namespace string) v3.ClusterRoleTemplateBindingInterface { + if mock.ClusterRoleTemplateBindingsFunc == nil { + panic("ClusterRoleTemplateBindingsGetterMock.ClusterRoleTemplateBindingsFunc: method is nil but ClusterRoleTemplateBindingsGetter.ClusterRoleTemplateBindings was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockClusterRoleTemplateBindingsGetterMockClusterRoleTemplateBindings.Lock() + mock.calls.ClusterRoleTemplateBindings = append(mock.calls.ClusterRoleTemplateBindings, callInfo) + lockClusterRoleTemplateBindingsGetterMockClusterRoleTemplateBindings.Unlock() + return mock.ClusterRoleTemplateBindingsFunc(namespace) +} + +// ClusterRoleTemplateBindingsCalls gets all the calls that were made to ClusterRoleTemplateBindings. +// Check the length with: +// len(mockedClusterRoleTemplateBindingsGetter.ClusterRoleTemplateBindingsCalls()) +func (mock *ClusterRoleTemplateBindingsGetterMock) ClusterRoleTemplateBindingsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockClusterRoleTemplateBindingsGetterMockClusterRoleTemplateBindings.RLock() + calls = mock.calls.ClusterRoleTemplateBindings + lockClusterRoleTemplateBindingsGetterMockClusterRoleTemplateBindings.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_compose_config_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_compose_config_mock_test.go new file mode 100644 index 00000000..dcfd480f --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_compose_config_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockComposeConfigListerMockGet sync.RWMutex + lockComposeConfigListerMockList sync.RWMutex +) + +// Ensure, that ComposeConfigListerMock does implement ComposeConfigLister. +// If this is not the case, regenerate this file with moq. +var _ v3.ComposeConfigLister = &ComposeConfigListerMock{} + +// ComposeConfigListerMock is a mock implementation of ComposeConfigLister. +// +// func TestSomethingThatUsesComposeConfigLister(t *testing.T) { +// +// // make and configure a mocked ComposeConfigLister +// mockedComposeConfigLister := &ComposeConfigListerMock{ +// GetFunc: func(namespace string, name string) (*v3.ComposeConfig, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.ComposeConfig, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedComposeConfigLister in code that requires ComposeConfigLister +// // and then make assertions. +// +// } +type ComposeConfigListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.ComposeConfig, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.ComposeConfig, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *ComposeConfigListerMock) Get(namespace string, name string) (*v3.ComposeConfig, error) { + if mock.GetFunc == nil { + panic("ComposeConfigListerMock.GetFunc: method is nil but ComposeConfigLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockComposeConfigListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockComposeConfigListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedComposeConfigLister.GetCalls()) +func (mock *ComposeConfigListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockComposeConfigListerMockGet.RLock() + calls = mock.calls.Get + lockComposeConfigListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ComposeConfigListerMock) List(namespace string, selector labels.Selector) ([]*v3.ComposeConfig, error) { + if mock.ListFunc == nil { + panic("ComposeConfigListerMock.ListFunc: method is nil but ComposeConfigLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockComposeConfigListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockComposeConfigListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedComposeConfigLister.ListCalls()) +func (mock *ComposeConfigListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockComposeConfigListerMockList.RLock() + calls = mock.calls.List + lockComposeConfigListerMockList.RUnlock() + return calls +} + +var ( + lockComposeConfigControllerMockAddClusterScopedHandler sync.RWMutex + lockComposeConfigControllerMockAddHandler sync.RWMutex + lockComposeConfigControllerMockEnqueue sync.RWMutex + lockComposeConfigControllerMockGeneric sync.RWMutex + lockComposeConfigControllerMockInformer sync.RWMutex + lockComposeConfigControllerMockLister sync.RWMutex + lockComposeConfigControllerMockStart sync.RWMutex + lockComposeConfigControllerMockSync sync.RWMutex +) + +// Ensure, that ComposeConfigControllerMock does implement ComposeConfigController. +// If this is not the case, regenerate this file with moq. +var _ v3.ComposeConfigController = &ComposeConfigControllerMock{} + +// ComposeConfigControllerMock is a mock implementation of ComposeConfigController. +// +// func TestSomethingThatUsesComposeConfigController(t *testing.T) { +// +// // make and configure a mocked ComposeConfigController +// mockedComposeConfigController := &ComposeConfigControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.ComposeConfigHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.ComposeConfigHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.ComposeConfigLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedComposeConfigController in code that requires ComposeConfigController +// // and then make assertions. +// +// } +type ComposeConfigControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.ComposeConfigHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.ComposeConfigHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.ComposeConfigLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.ComposeConfigHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.ComposeConfigHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ComposeConfigControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.ComposeConfigHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ComposeConfigControllerMock.AddClusterScopedHandlerFunc: method is nil but ComposeConfigController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ComposeConfigHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockComposeConfigControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockComposeConfigControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedComposeConfigController.AddClusterScopedHandlerCalls()) +func (mock *ComposeConfigControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ComposeConfigHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ComposeConfigHandlerFunc + } + lockComposeConfigControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockComposeConfigControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ComposeConfigControllerMock) AddHandler(ctx context.Context, name string, handler v3.ComposeConfigHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ComposeConfigControllerMock.AddHandlerFunc: method is nil but ComposeConfigController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.ComposeConfigHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockComposeConfigControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockComposeConfigControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedComposeConfigController.AddHandlerCalls()) +func (mock *ComposeConfigControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.ComposeConfigHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.ComposeConfigHandlerFunc + } + lockComposeConfigControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockComposeConfigControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *ComposeConfigControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("ComposeConfigControllerMock.EnqueueFunc: method is nil but ComposeConfigController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockComposeConfigControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockComposeConfigControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedComposeConfigController.EnqueueCalls()) +func (mock *ComposeConfigControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockComposeConfigControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockComposeConfigControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *ComposeConfigControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("ComposeConfigControllerMock.GenericFunc: method is nil but ComposeConfigController.Generic was just called") + } + callInfo := struct { + }{} + lockComposeConfigControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockComposeConfigControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedComposeConfigController.GenericCalls()) +func (mock *ComposeConfigControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockComposeConfigControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockComposeConfigControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *ComposeConfigControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("ComposeConfigControllerMock.InformerFunc: method is nil but ComposeConfigController.Informer was just called") + } + callInfo := struct { + }{} + lockComposeConfigControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockComposeConfigControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedComposeConfigController.InformerCalls()) +func (mock *ComposeConfigControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockComposeConfigControllerMockInformer.RLock() + calls = mock.calls.Informer + lockComposeConfigControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *ComposeConfigControllerMock) Lister() v3.ComposeConfigLister { + if mock.ListerFunc == nil { + panic("ComposeConfigControllerMock.ListerFunc: method is nil but ComposeConfigController.Lister was just called") + } + callInfo := struct { + }{} + lockComposeConfigControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockComposeConfigControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedComposeConfigController.ListerCalls()) +func (mock *ComposeConfigControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockComposeConfigControllerMockLister.RLock() + calls = mock.calls.Lister + lockComposeConfigControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *ComposeConfigControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("ComposeConfigControllerMock.StartFunc: method is nil but ComposeConfigController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockComposeConfigControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockComposeConfigControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedComposeConfigController.StartCalls()) +func (mock *ComposeConfigControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockComposeConfigControllerMockStart.RLock() + calls = mock.calls.Start + lockComposeConfigControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *ComposeConfigControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("ComposeConfigControllerMock.SyncFunc: method is nil but ComposeConfigController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockComposeConfigControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockComposeConfigControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedComposeConfigController.SyncCalls()) +func (mock *ComposeConfigControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockComposeConfigControllerMockSync.RLock() + calls = mock.calls.Sync + lockComposeConfigControllerMockSync.RUnlock() + return calls +} + +var ( + lockComposeConfigInterfaceMockAddClusterScopedHandler sync.RWMutex + lockComposeConfigInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockComposeConfigInterfaceMockAddHandler sync.RWMutex + lockComposeConfigInterfaceMockAddLifecycle sync.RWMutex + lockComposeConfigInterfaceMockController sync.RWMutex + lockComposeConfigInterfaceMockCreate sync.RWMutex + lockComposeConfigInterfaceMockDelete sync.RWMutex + lockComposeConfigInterfaceMockDeleteCollection sync.RWMutex + lockComposeConfigInterfaceMockDeleteNamespaced sync.RWMutex + lockComposeConfigInterfaceMockGet sync.RWMutex + lockComposeConfigInterfaceMockGetNamespaced sync.RWMutex + lockComposeConfigInterfaceMockList sync.RWMutex + lockComposeConfigInterfaceMockObjectClient sync.RWMutex + lockComposeConfigInterfaceMockUpdate sync.RWMutex + lockComposeConfigInterfaceMockWatch sync.RWMutex +) + +// Ensure, that ComposeConfigInterfaceMock does implement ComposeConfigInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.ComposeConfigInterface = &ComposeConfigInterfaceMock{} + +// ComposeConfigInterfaceMock is a mock implementation of ComposeConfigInterface. +// +// func TestSomethingThatUsesComposeConfigInterface(t *testing.T) { +// +// // make and configure a mocked ComposeConfigInterface +// mockedComposeConfigInterface := &ComposeConfigInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.ComposeConfigHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.ComposeConfigLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.ComposeConfigHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.ComposeConfigLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.ComposeConfigController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.ComposeConfig) (*v3.ComposeConfig, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.ComposeConfig, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.ComposeConfig, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.ComposeConfigList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.ComposeConfig) (*v3.ComposeConfig, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedComposeConfigInterface in code that requires ComposeConfigInterface +// // and then make assertions. +// +// } +type ComposeConfigInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.ComposeConfigHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.ComposeConfigLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.ComposeConfigHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.ComposeConfigLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.ComposeConfigController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.ComposeConfig) (*v3.ComposeConfig, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.ComposeConfig, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.ComposeConfig, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.ComposeConfigList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.ComposeConfig) (*v3.ComposeConfig, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.ComposeConfigHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.ComposeConfigLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.ComposeConfigHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.ComposeConfigLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.ComposeConfig + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.ComposeConfig + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ComposeConfigInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.ComposeConfigHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ComposeConfigInterfaceMock.AddClusterScopedHandlerFunc: method is nil but ComposeConfigInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ComposeConfigHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockComposeConfigInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockComposeConfigInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedComposeConfigInterface.AddClusterScopedHandlerCalls()) +func (mock *ComposeConfigInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ComposeConfigHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ComposeConfigHandlerFunc + } + lockComposeConfigInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockComposeConfigInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *ComposeConfigInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.ComposeConfigLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("ComposeConfigInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but ComposeConfigInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ComposeConfigLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockComposeConfigInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockComposeConfigInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedComposeConfigInterface.AddClusterScopedLifecycleCalls()) +func (mock *ComposeConfigInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ComposeConfigLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ComposeConfigLifecycle + } + lockComposeConfigInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockComposeConfigInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ComposeConfigInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.ComposeConfigHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ComposeConfigInterfaceMock.AddHandlerFunc: method is nil but ComposeConfigInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.ComposeConfigHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockComposeConfigInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockComposeConfigInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedComposeConfigInterface.AddHandlerCalls()) +func (mock *ComposeConfigInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.ComposeConfigHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.ComposeConfigHandlerFunc + } + lockComposeConfigInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockComposeConfigInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *ComposeConfigInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.ComposeConfigLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("ComposeConfigInterfaceMock.AddLifecycleFunc: method is nil but ComposeConfigInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.ComposeConfigLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockComposeConfigInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockComposeConfigInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedComposeConfigInterface.AddLifecycleCalls()) +func (mock *ComposeConfigInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.ComposeConfigLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.ComposeConfigLifecycle + } + lockComposeConfigInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockComposeConfigInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *ComposeConfigInterfaceMock) Controller() v3.ComposeConfigController { + if mock.ControllerFunc == nil { + panic("ComposeConfigInterfaceMock.ControllerFunc: method is nil but ComposeConfigInterface.Controller was just called") + } + callInfo := struct { + }{} + lockComposeConfigInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockComposeConfigInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedComposeConfigInterface.ControllerCalls()) +func (mock *ComposeConfigInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockComposeConfigInterfaceMockController.RLock() + calls = mock.calls.Controller + lockComposeConfigInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *ComposeConfigInterfaceMock) Create(in1 *v3.ComposeConfig) (*v3.ComposeConfig, error) { + if mock.CreateFunc == nil { + panic("ComposeConfigInterfaceMock.CreateFunc: method is nil but ComposeConfigInterface.Create was just called") + } + callInfo := struct { + In1 *v3.ComposeConfig + }{ + In1: in1, + } + lockComposeConfigInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockComposeConfigInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedComposeConfigInterface.CreateCalls()) +func (mock *ComposeConfigInterfaceMock) CreateCalls() []struct { + In1 *v3.ComposeConfig +} { + var calls []struct { + In1 *v3.ComposeConfig + } + lockComposeConfigInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockComposeConfigInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *ComposeConfigInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("ComposeConfigInterfaceMock.DeleteFunc: method is nil but ComposeConfigInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockComposeConfigInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockComposeConfigInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedComposeConfigInterface.DeleteCalls()) +func (mock *ComposeConfigInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockComposeConfigInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockComposeConfigInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *ComposeConfigInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("ComposeConfigInterfaceMock.DeleteCollectionFunc: method is nil but ComposeConfigInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockComposeConfigInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockComposeConfigInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedComposeConfigInterface.DeleteCollectionCalls()) +func (mock *ComposeConfigInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockComposeConfigInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockComposeConfigInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *ComposeConfigInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("ComposeConfigInterfaceMock.DeleteNamespacedFunc: method is nil but ComposeConfigInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockComposeConfigInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockComposeConfigInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedComposeConfigInterface.DeleteNamespacedCalls()) +func (mock *ComposeConfigInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockComposeConfigInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockComposeConfigInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *ComposeConfigInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.ComposeConfig, error) { + if mock.GetFunc == nil { + panic("ComposeConfigInterfaceMock.GetFunc: method is nil but ComposeConfigInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockComposeConfigInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockComposeConfigInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedComposeConfigInterface.GetCalls()) +func (mock *ComposeConfigInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockComposeConfigInterfaceMockGet.RLock() + calls = mock.calls.Get + lockComposeConfigInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *ComposeConfigInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.ComposeConfig, error) { + if mock.GetNamespacedFunc == nil { + panic("ComposeConfigInterfaceMock.GetNamespacedFunc: method is nil but ComposeConfigInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockComposeConfigInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockComposeConfigInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedComposeConfigInterface.GetNamespacedCalls()) +func (mock *ComposeConfigInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockComposeConfigInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockComposeConfigInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ComposeConfigInterfaceMock) List(opts v1.ListOptions) (*v3.ComposeConfigList, error) { + if mock.ListFunc == nil { + panic("ComposeConfigInterfaceMock.ListFunc: method is nil but ComposeConfigInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockComposeConfigInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockComposeConfigInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedComposeConfigInterface.ListCalls()) +func (mock *ComposeConfigInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockComposeConfigInterfaceMockList.RLock() + calls = mock.calls.List + lockComposeConfigInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *ComposeConfigInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("ComposeConfigInterfaceMock.ObjectClientFunc: method is nil but ComposeConfigInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockComposeConfigInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockComposeConfigInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedComposeConfigInterface.ObjectClientCalls()) +func (mock *ComposeConfigInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockComposeConfigInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockComposeConfigInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *ComposeConfigInterfaceMock) Update(in1 *v3.ComposeConfig) (*v3.ComposeConfig, error) { + if mock.UpdateFunc == nil { + panic("ComposeConfigInterfaceMock.UpdateFunc: method is nil but ComposeConfigInterface.Update was just called") + } + callInfo := struct { + In1 *v3.ComposeConfig + }{ + In1: in1, + } + lockComposeConfigInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockComposeConfigInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedComposeConfigInterface.UpdateCalls()) +func (mock *ComposeConfigInterfaceMock) UpdateCalls() []struct { + In1 *v3.ComposeConfig +} { + var calls []struct { + In1 *v3.ComposeConfig + } + lockComposeConfigInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockComposeConfigInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *ComposeConfigInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("ComposeConfigInterfaceMock.WatchFunc: method is nil but ComposeConfigInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockComposeConfigInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockComposeConfigInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedComposeConfigInterface.WatchCalls()) +func (mock *ComposeConfigInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockComposeConfigInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockComposeConfigInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockComposeConfigsGetterMockComposeConfigs sync.RWMutex +) + +// Ensure, that ComposeConfigsGetterMock does implement ComposeConfigsGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.ComposeConfigsGetter = &ComposeConfigsGetterMock{} + +// ComposeConfigsGetterMock is a mock implementation of ComposeConfigsGetter. +// +// func TestSomethingThatUsesComposeConfigsGetter(t *testing.T) { +// +// // make and configure a mocked ComposeConfigsGetter +// mockedComposeConfigsGetter := &ComposeConfigsGetterMock{ +// ComposeConfigsFunc: func(namespace string) v3.ComposeConfigInterface { +// panic("mock out the ComposeConfigs method") +// }, +// } +// +// // use mockedComposeConfigsGetter in code that requires ComposeConfigsGetter +// // and then make assertions. +// +// } +type ComposeConfigsGetterMock struct { + // ComposeConfigsFunc mocks the ComposeConfigs method. + ComposeConfigsFunc func(namespace string) v3.ComposeConfigInterface + + // calls tracks calls to the methods. + calls struct { + // ComposeConfigs holds details about calls to the ComposeConfigs method. + ComposeConfigs []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// ComposeConfigs calls ComposeConfigsFunc. +func (mock *ComposeConfigsGetterMock) ComposeConfigs(namespace string) v3.ComposeConfigInterface { + if mock.ComposeConfigsFunc == nil { + panic("ComposeConfigsGetterMock.ComposeConfigsFunc: method is nil but ComposeConfigsGetter.ComposeConfigs was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockComposeConfigsGetterMockComposeConfigs.Lock() + mock.calls.ComposeConfigs = append(mock.calls.ComposeConfigs, callInfo) + lockComposeConfigsGetterMockComposeConfigs.Unlock() + return mock.ComposeConfigsFunc(namespace) +} + +// ComposeConfigsCalls gets all the calls that were made to ComposeConfigs. +// Check the length with: +// len(mockedComposeConfigsGetter.ComposeConfigsCalls()) +func (mock *ComposeConfigsGetterMock) ComposeConfigsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockComposeConfigsGetterMockComposeConfigs.RLock() + calls = mock.calls.ComposeConfigs + lockComposeConfigsGetterMockComposeConfigs.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_dynamic_schema_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_dynamic_schema_mock_test.go new file mode 100644 index 00000000..acfb0c26 --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_dynamic_schema_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockDynamicSchemaListerMockGet sync.RWMutex + lockDynamicSchemaListerMockList sync.RWMutex +) + +// Ensure, that DynamicSchemaListerMock does implement DynamicSchemaLister. +// If this is not the case, regenerate this file with moq. +var _ v3.DynamicSchemaLister = &DynamicSchemaListerMock{} + +// DynamicSchemaListerMock is a mock implementation of DynamicSchemaLister. +// +// func TestSomethingThatUsesDynamicSchemaLister(t *testing.T) { +// +// // make and configure a mocked DynamicSchemaLister +// mockedDynamicSchemaLister := &DynamicSchemaListerMock{ +// GetFunc: func(namespace string, name string) (*v3.DynamicSchema, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.DynamicSchema, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedDynamicSchemaLister in code that requires DynamicSchemaLister +// // and then make assertions. +// +// } +type DynamicSchemaListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.DynamicSchema, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.DynamicSchema, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *DynamicSchemaListerMock) Get(namespace string, name string) (*v3.DynamicSchema, error) { + if mock.GetFunc == nil { + panic("DynamicSchemaListerMock.GetFunc: method is nil but DynamicSchemaLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockDynamicSchemaListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockDynamicSchemaListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedDynamicSchemaLister.GetCalls()) +func (mock *DynamicSchemaListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockDynamicSchemaListerMockGet.RLock() + calls = mock.calls.Get + lockDynamicSchemaListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *DynamicSchemaListerMock) List(namespace string, selector labels.Selector) ([]*v3.DynamicSchema, error) { + if mock.ListFunc == nil { + panic("DynamicSchemaListerMock.ListFunc: method is nil but DynamicSchemaLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockDynamicSchemaListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockDynamicSchemaListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedDynamicSchemaLister.ListCalls()) +func (mock *DynamicSchemaListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockDynamicSchemaListerMockList.RLock() + calls = mock.calls.List + lockDynamicSchemaListerMockList.RUnlock() + return calls +} + +var ( + lockDynamicSchemaControllerMockAddClusterScopedHandler sync.RWMutex + lockDynamicSchemaControllerMockAddHandler sync.RWMutex + lockDynamicSchemaControllerMockEnqueue sync.RWMutex + lockDynamicSchemaControllerMockGeneric sync.RWMutex + lockDynamicSchemaControllerMockInformer sync.RWMutex + lockDynamicSchemaControllerMockLister sync.RWMutex + lockDynamicSchemaControllerMockStart sync.RWMutex + lockDynamicSchemaControllerMockSync sync.RWMutex +) + +// Ensure, that DynamicSchemaControllerMock does implement DynamicSchemaController. +// If this is not the case, regenerate this file with moq. +var _ v3.DynamicSchemaController = &DynamicSchemaControllerMock{} + +// DynamicSchemaControllerMock is a mock implementation of DynamicSchemaController. +// +// func TestSomethingThatUsesDynamicSchemaController(t *testing.T) { +// +// // make and configure a mocked DynamicSchemaController +// mockedDynamicSchemaController := &DynamicSchemaControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.DynamicSchemaHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.DynamicSchemaHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.DynamicSchemaLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedDynamicSchemaController in code that requires DynamicSchemaController +// // and then make assertions. +// +// } +type DynamicSchemaControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.DynamicSchemaHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.DynamicSchemaHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.DynamicSchemaLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.DynamicSchemaHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.DynamicSchemaHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *DynamicSchemaControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.DynamicSchemaHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("DynamicSchemaControllerMock.AddClusterScopedHandlerFunc: method is nil but DynamicSchemaController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.DynamicSchemaHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockDynamicSchemaControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockDynamicSchemaControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedDynamicSchemaController.AddClusterScopedHandlerCalls()) +func (mock *DynamicSchemaControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.DynamicSchemaHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.DynamicSchemaHandlerFunc + } + lockDynamicSchemaControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockDynamicSchemaControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *DynamicSchemaControllerMock) AddHandler(ctx context.Context, name string, handler v3.DynamicSchemaHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("DynamicSchemaControllerMock.AddHandlerFunc: method is nil but DynamicSchemaController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.DynamicSchemaHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockDynamicSchemaControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockDynamicSchemaControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedDynamicSchemaController.AddHandlerCalls()) +func (mock *DynamicSchemaControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.DynamicSchemaHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.DynamicSchemaHandlerFunc + } + lockDynamicSchemaControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockDynamicSchemaControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *DynamicSchemaControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("DynamicSchemaControllerMock.EnqueueFunc: method is nil but DynamicSchemaController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockDynamicSchemaControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockDynamicSchemaControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedDynamicSchemaController.EnqueueCalls()) +func (mock *DynamicSchemaControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockDynamicSchemaControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockDynamicSchemaControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *DynamicSchemaControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("DynamicSchemaControllerMock.GenericFunc: method is nil but DynamicSchemaController.Generic was just called") + } + callInfo := struct { + }{} + lockDynamicSchemaControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockDynamicSchemaControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedDynamicSchemaController.GenericCalls()) +func (mock *DynamicSchemaControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockDynamicSchemaControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockDynamicSchemaControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *DynamicSchemaControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("DynamicSchemaControllerMock.InformerFunc: method is nil but DynamicSchemaController.Informer was just called") + } + callInfo := struct { + }{} + lockDynamicSchemaControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockDynamicSchemaControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedDynamicSchemaController.InformerCalls()) +func (mock *DynamicSchemaControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockDynamicSchemaControllerMockInformer.RLock() + calls = mock.calls.Informer + lockDynamicSchemaControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *DynamicSchemaControllerMock) Lister() v3.DynamicSchemaLister { + if mock.ListerFunc == nil { + panic("DynamicSchemaControllerMock.ListerFunc: method is nil but DynamicSchemaController.Lister was just called") + } + callInfo := struct { + }{} + lockDynamicSchemaControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockDynamicSchemaControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedDynamicSchemaController.ListerCalls()) +func (mock *DynamicSchemaControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockDynamicSchemaControllerMockLister.RLock() + calls = mock.calls.Lister + lockDynamicSchemaControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *DynamicSchemaControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("DynamicSchemaControllerMock.StartFunc: method is nil but DynamicSchemaController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockDynamicSchemaControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockDynamicSchemaControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedDynamicSchemaController.StartCalls()) +func (mock *DynamicSchemaControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockDynamicSchemaControllerMockStart.RLock() + calls = mock.calls.Start + lockDynamicSchemaControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *DynamicSchemaControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("DynamicSchemaControllerMock.SyncFunc: method is nil but DynamicSchemaController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockDynamicSchemaControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockDynamicSchemaControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedDynamicSchemaController.SyncCalls()) +func (mock *DynamicSchemaControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockDynamicSchemaControllerMockSync.RLock() + calls = mock.calls.Sync + lockDynamicSchemaControllerMockSync.RUnlock() + return calls +} + +var ( + lockDynamicSchemaInterfaceMockAddClusterScopedHandler sync.RWMutex + lockDynamicSchemaInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockDynamicSchemaInterfaceMockAddHandler sync.RWMutex + lockDynamicSchemaInterfaceMockAddLifecycle sync.RWMutex + lockDynamicSchemaInterfaceMockController sync.RWMutex + lockDynamicSchemaInterfaceMockCreate sync.RWMutex + lockDynamicSchemaInterfaceMockDelete sync.RWMutex + lockDynamicSchemaInterfaceMockDeleteCollection sync.RWMutex + lockDynamicSchemaInterfaceMockDeleteNamespaced sync.RWMutex + lockDynamicSchemaInterfaceMockGet sync.RWMutex + lockDynamicSchemaInterfaceMockGetNamespaced sync.RWMutex + lockDynamicSchemaInterfaceMockList sync.RWMutex + lockDynamicSchemaInterfaceMockObjectClient sync.RWMutex + lockDynamicSchemaInterfaceMockUpdate sync.RWMutex + lockDynamicSchemaInterfaceMockWatch sync.RWMutex +) + +// Ensure, that DynamicSchemaInterfaceMock does implement DynamicSchemaInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.DynamicSchemaInterface = &DynamicSchemaInterfaceMock{} + +// DynamicSchemaInterfaceMock is a mock implementation of DynamicSchemaInterface. +// +// func TestSomethingThatUsesDynamicSchemaInterface(t *testing.T) { +// +// // make and configure a mocked DynamicSchemaInterface +// mockedDynamicSchemaInterface := &DynamicSchemaInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.DynamicSchemaHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.DynamicSchemaLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.DynamicSchemaHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.DynamicSchemaLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.DynamicSchemaController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.DynamicSchema) (*v3.DynamicSchema, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.DynamicSchema, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.DynamicSchema, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.DynamicSchemaList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.DynamicSchema) (*v3.DynamicSchema, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedDynamicSchemaInterface in code that requires DynamicSchemaInterface +// // and then make assertions. +// +// } +type DynamicSchemaInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.DynamicSchemaHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.DynamicSchemaLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.DynamicSchemaHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.DynamicSchemaLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.DynamicSchemaController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.DynamicSchema) (*v3.DynamicSchema, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.DynamicSchema, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.DynamicSchema, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.DynamicSchemaList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.DynamicSchema) (*v3.DynamicSchema, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.DynamicSchemaHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.DynamicSchemaLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.DynamicSchemaHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.DynamicSchemaLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.DynamicSchema + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.DynamicSchema + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *DynamicSchemaInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.DynamicSchemaHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("DynamicSchemaInterfaceMock.AddClusterScopedHandlerFunc: method is nil but DynamicSchemaInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.DynamicSchemaHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockDynamicSchemaInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockDynamicSchemaInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedDynamicSchemaInterface.AddClusterScopedHandlerCalls()) +func (mock *DynamicSchemaInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.DynamicSchemaHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.DynamicSchemaHandlerFunc + } + lockDynamicSchemaInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockDynamicSchemaInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *DynamicSchemaInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.DynamicSchemaLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("DynamicSchemaInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but DynamicSchemaInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.DynamicSchemaLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockDynamicSchemaInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockDynamicSchemaInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedDynamicSchemaInterface.AddClusterScopedLifecycleCalls()) +func (mock *DynamicSchemaInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.DynamicSchemaLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.DynamicSchemaLifecycle + } + lockDynamicSchemaInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockDynamicSchemaInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *DynamicSchemaInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.DynamicSchemaHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("DynamicSchemaInterfaceMock.AddHandlerFunc: method is nil but DynamicSchemaInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.DynamicSchemaHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockDynamicSchemaInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockDynamicSchemaInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedDynamicSchemaInterface.AddHandlerCalls()) +func (mock *DynamicSchemaInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.DynamicSchemaHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.DynamicSchemaHandlerFunc + } + lockDynamicSchemaInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockDynamicSchemaInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *DynamicSchemaInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.DynamicSchemaLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("DynamicSchemaInterfaceMock.AddLifecycleFunc: method is nil but DynamicSchemaInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.DynamicSchemaLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockDynamicSchemaInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockDynamicSchemaInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedDynamicSchemaInterface.AddLifecycleCalls()) +func (mock *DynamicSchemaInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.DynamicSchemaLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.DynamicSchemaLifecycle + } + lockDynamicSchemaInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockDynamicSchemaInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *DynamicSchemaInterfaceMock) Controller() v3.DynamicSchemaController { + if mock.ControllerFunc == nil { + panic("DynamicSchemaInterfaceMock.ControllerFunc: method is nil but DynamicSchemaInterface.Controller was just called") + } + callInfo := struct { + }{} + lockDynamicSchemaInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockDynamicSchemaInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedDynamicSchemaInterface.ControllerCalls()) +func (mock *DynamicSchemaInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockDynamicSchemaInterfaceMockController.RLock() + calls = mock.calls.Controller + lockDynamicSchemaInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *DynamicSchemaInterfaceMock) Create(in1 *v3.DynamicSchema) (*v3.DynamicSchema, error) { + if mock.CreateFunc == nil { + panic("DynamicSchemaInterfaceMock.CreateFunc: method is nil but DynamicSchemaInterface.Create was just called") + } + callInfo := struct { + In1 *v3.DynamicSchema + }{ + In1: in1, + } + lockDynamicSchemaInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockDynamicSchemaInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedDynamicSchemaInterface.CreateCalls()) +func (mock *DynamicSchemaInterfaceMock) CreateCalls() []struct { + In1 *v3.DynamicSchema +} { + var calls []struct { + In1 *v3.DynamicSchema + } + lockDynamicSchemaInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockDynamicSchemaInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *DynamicSchemaInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("DynamicSchemaInterfaceMock.DeleteFunc: method is nil but DynamicSchemaInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockDynamicSchemaInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockDynamicSchemaInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedDynamicSchemaInterface.DeleteCalls()) +func (mock *DynamicSchemaInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockDynamicSchemaInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockDynamicSchemaInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *DynamicSchemaInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("DynamicSchemaInterfaceMock.DeleteCollectionFunc: method is nil but DynamicSchemaInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockDynamicSchemaInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockDynamicSchemaInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedDynamicSchemaInterface.DeleteCollectionCalls()) +func (mock *DynamicSchemaInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockDynamicSchemaInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockDynamicSchemaInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *DynamicSchemaInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("DynamicSchemaInterfaceMock.DeleteNamespacedFunc: method is nil but DynamicSchemaInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockDynamicSchemaInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockDynamicSchemaInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedDynamicSchemaInterface.DeleteNamespacedCalls()) +func (mock *DynamicSchemaInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockDynamicSchemaInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockDynamicSchemaInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *DynamicSchemaInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.DynamicSchema, error) { + if mock.GetFunc == nil { + panic("DynamicSchemaInterfaceMock.GetFunc: method is nil but DynamicSchemaInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockDynamicSchemaInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockDynamicSchemaInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedDynamicSchemaInterface.GetCalls()) +func (mock *DynamicSchemaInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockDynamicSchemaInterfaceMockGet.RLock() + calls = mock.calls.Get + lockDynamicSchemaInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *DynamicSchemaInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.DynamicSchema, error) { + if mock.GetNamespacedFunc == nil { + panic("DynamicSchemaInterfaceMock.GetNamespacedFunc: method is nil but DynamicSchemaInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockDynamicSchemaInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockDynamicSchemaInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedDynamicSchemaInterface.GetNamespacedCalls()) +func (mock *DynamicSchemaInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockDynamicSchemaInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockDynamicSchemaInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *DynamicSchemaInterfaceMock) List(opts v1.ListOptions) (*v3.DynamicSchemaList, error) { + if mock.ListFunc == nil { + panic("DynamicSchemaInterfaceMock.ListFunc: method is nil but DynamicSchemaInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockDynamicSchemaInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockDynamicSchemaInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedDynamicSchemaInterface.ListCalls()) +func (mock *DynamicSchemaInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockDynamicSchemaInterfaceMockList.RLock() + calls = mock.calls.List + lockDynamicSchemaInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *DynamicSchemaInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("DynamicSchemaInterfaceMock.ObjectClientFunc: method is nil but DynamicSchemaInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockDynamicSchemaInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockDynamicSchemaInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedDynamicSchemaInterface.ObjectClientCalls()) +func (mock *DynamicSchemaInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockDynamicSchemaInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockDynamicSchemaInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *DynamicSchemaInterfaceMock) Update(in1 *v3.DynamicSchema) (*v3.DynamicSchema, error) { + if mock.UpdateFunc == nil { + panic("DynamicSchemaInterfaceMock.UpdateFunc: method is nil but DynamicSchemaInterface.Update was just called") + } + callInfo := struct { + In1 *v3.DynamicSchema + }{ + In1: in1, + } + lockDynamicSchemaInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockDynamicSchemaInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedDynamicSchemaInterface.UpdateCalls()) +func (mock *DynamicSchemaInterfaceMock) UpdateCalls() []struct { + In1 *v3.DynamicSchema +} { + var calls []struct { + In1 *v3.DynamicSchema + } + lockDynamicSchemaInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockDynamicSchemaInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *DynamicSchemaInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("DynamicSchemaInterfaceMock.WatchFunc: method is nil but DynamicSchemaInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockDynamicSchemaInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockDynamicSchemaInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedDynamicSchemaInterface.WatchCalls()) +func (mock *DynamicSchemaInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockDynamicSchemaInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockDynamicSchemaInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockDynamicSchemasGetterMockDynamicSchemas sync.RWMutex +) + +// Ensure, that DynamicSchemasGetterMock does implement DynamicSchemasGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.DynamicSchemasGetter = &DynamicSchemasGetterMock{} + +// DynamicSchemasGetterMock is a mock implementation of DynamicSchemasGetter. +// +// func TestSomethingThatUsesDynamicSchemasGetter(t *testing.T) { +// +// // make and configure a mocked DynamicSchemasGetter +// mockedDynamicSchemasGetter := &DynamicSchemasGetterMock{ +// DynamicSchemasFunc: func(namespace string) v3.DynamicSchemaInterface { +// panic("mock out the DynamicSchemas method") +// }, +// } +// +// // use mockedDynamicSchemasGetter in code that requires DynamicSchemasGetter +// // and then make assertions. +// +// } +type DynamicSchemasGetterMock struct { + // DynamicSchemasFunc mocks the DynamicSchemas method. + DynamicSchemasFunc func(namespace string) v3.DynamicSchemaInterface + + // calls tracks calls to the methods. + calls struct { + // DynamicSchemas holds details about calls to the DynamicSchemas method. + DynamicSchemas []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// DynamicSchemas calls DynamicSchemasFunc. +func (mock *DynamicSchemasGetterMock) DynamicSchemas(namespace string) v3.DynamicSchemaInterface { + if mock.DynamicSchemasFunc == nil { + panic("DynamicSchemasGetterMock.DynamicSchemasFunc: method is nil but DynamicSchemasGetter.DynamicSchemas was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockDynamicSchemasGetterMockDynamicSchemas.Lock() + mock.calls.DynamicSchemas = append(mock.calls.DynamicSchemas, callInfo) + lockDynamicSchemasGetterMockDynamicSchemas.Unlock() + return mock.DynamicSchemasFunc(namespace) +} + +// DynamicSchemasCalls gets all the calls that were made to DynamicSchemas. +// Check the length with: +// len(mockedDynamicSchemasGetter.DynamicSchemasCalls()) +func (mock *DynamicSchemasGetterMock) DynamicSchemasCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockDynamicSchemasGetterMockDynamicSchemas.RLock() + calls = mock.calls.DynamicSchemas + lockDynamicSchemasGetterMockDynamicSchemas.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_etcd_backup_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_etcd_backup_mock_test.go new file mode 100644 index 00000000..822c2e21 --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_etcd_backup_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockEtcdBackupListerMockGet sync.RWMutex + lockEtcdBackupListerMockList sync.RWMutex +) + +// Ensure, that EtcdBackupListerMock does implement EtcdBackupLister. +// If this is not the case, regenerate this file with moq. +var _ v3.EtcdBackupLister = &EtcdBackupListerMock{} + +// EtcdBackupListerMock is a mock implementation of EtcdBackupLister. +// +// func TestSomethingThatUsesEtcdBackupLister(t *testing.T) { +// +// // make and configure a mocked EtcdBackupLister +// mockedEtcdBackupLister := &EtcdBackupListerMock{ +// GetFunc: func(namespace string, name string) (*v3.EtcdBackup, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.EtcdBackup, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedEtcdBackupLister in code that requires EtcdBackupLister +// // and then make assertions. +// +// } +type EtcdBackupListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.EtcdBackup, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.EtcdBackup, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *EtcdBackupListerMock) Get(namespace string, name string) (*v3.EtcdBackup, error) { + if mock.GetFunc == nil { + panic("EtcdBackupListerMock.GetFunc: method is nil but EtcdBackupLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockEtcdBackupListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockEtcdBackupListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedEtcdBackupLister.GetCalls()) +func (mock *EtcdBackupListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockEtcdBackupListerMockGet.RLock() + calls = mock.calls.Get + lockEtcdBackupListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *EtcdBackupListerMock) List(namespace string, selector labels.Selector) ([]*v3.EtcdBackup, error) { + if mock.ListFunc == nil { + panic("EtcdBackupListerMock.ListFunc: method is nil but EtcdBackupLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockEtcdBackupListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockEtcdBackupListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedEtcdBackupLister.ListCalls()) +func (mock *EtcdBackupListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockEtcdBackupListerMockList.RLock() + calls = mock.calls.List + lockEtcdBackupListerMockList.RUnlock() + return calls +} + +var ( + lockEtcdBackupControllerMockAddClusterScopedHandler sync.RWMutex + lockEtcdBackupControllerMockAddHandler sync.RWMutex + lockEtcdBackupControllerMockEnqueue sync.RWMutex + lockEtcdBackupControllerMockGeneric sync.RWMutex + lockEtcdBackupControllerMockInformer sync.RWMutex + lockEtcdBackupControllerMockLister sync.RWMutex + lockEtcdBackupControllerMockStart sync.RWMutex + lockEtcdBackupControllerMockSync sync.RWMutex +) + +// Ensure, that EtcdBackupControllerMock does implement EtcdBackupController. +// If this is not the case, regenerate this file with moq. +var _ v3.EtcdBackupController = &EtcdBackupControllerMock{} + +// EtcdBackupControllerMock is a mock implementation of EtcdBackupController. +// +// func TestSomethingThatUsesEtcdBackupController(t *testing.T) { +// +// // make and configure a mocked EtcdBackupController +// mockedEtcdBackupController := &EtcdBackupControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.EtcdBackupHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.EtcdBackupHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.EtcdBackupLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedEtcdBackupController in code that requires EtcdBackupController +// // and then make assertions. +// +// } +type EtcdBackupControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.EtcdBackupHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.EtcdBackupHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.EtcdBackupLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.EtcdBackupHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.EtcdBackupHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *EtcdBackupControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.EtcdBackupHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("EtcdBackupControllerMock.AddClusterScopedHandlerFunc: method is nil but EtcdBackupController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.EtcdBackupHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockEtcdBackupControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockEtcdBackupControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedEtcdBackupController.AddClusterScopedHandlerCalls()) +func (mock *EtcdBackupControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.EtcdBackupHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.EtcdBackupHandlerFunc + } + lockEtcdBackupControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockEtcdBackupControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *EtcdBackupControllerMock) AddHandler(ctx context.Context, name string, handler v3.EtcdBackupHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("EtcdBackupControllerMock.AddHandlerFunc: method is nil but EtcdBackupController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.EtcdBackupHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockEtcdBackupControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockEtcdBackupControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedEtcdBackupController.AddHandlerCalls()) +func (mock *EtcdBackupControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.EtcdBackupHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.EtcdBackupHandlerFunc + } + lockEtcdBackupControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockEtcdBackupControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *EtcdBackupControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("EtcdBackupControllerMock.EnqueueFunc: method is nil but EtcdBackupController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockEtcdBackupControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockEtcdBackupControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedEtcdBackupController.EnqueueCalls()) +func (mock *EtcdBackupControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockEtcdBackupControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockEtcdBackupControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *EtcdBackupControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("EtcdBackupControllerMock.GenericFunc: method is nil but EtcdBackupController.Generic was just called") + } + callInfo := struct { + }{} + lockEtcdBackupControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockEtcdBackupControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedEtcdBackupController.GenericCalls()) +func (mock *EtcdBackupControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockEtcdBackupControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockEtcdBackupControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *EtcdBackupControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("EtcdBackupControllerMock.InformerFunc: method is nil but EtcdBackupController.Informer was just called") + } + callInfo := struct { + }{} + lockEtcdBackupControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockEtcdBackupControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedEtcdBackupController.InformerCalls()) +func (mock *EtcdBackupControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockEtcdBackupControllerMockInformer.RLock() + calls = mock.calls.Informer + lockEtcdBackupControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *EtcdBackupControllerMock) Lister() v3.EtcdBackupLister { + if mock.ListerFunc == nil { + panic("EtcdBackupControllerMock.ListerFunc: method is nil but EtcdBackupController.Lister was just called") + } + callInfo := struct { + }{} + lockEtcdBackupControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockEtcdBackupControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedEtcdBackupController.ListerCalls()) +func (mock *EtcdBackupControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockEtcdBackupControllerMockLister.RLock() + calls = mock.calls.Lister + lockEtcdBackupControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *EtcdBackupControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("EtcdBackupControllerMock.StartFunc: method is nil but EtcdBackupController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockEtcdBackupControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockEtcdBackupControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedEtcdBackupController.StartCalls()) +func (mock *EtcdBackupControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockEtcdBackupControllerMockStart.RLock() + calls = mock.calls.Start + lockEtcdBackupControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *EtcdBackupControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("EtcdBackupControllerMock.SyncFunc: method is nil but EtcdBackupController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockEtcdBackupControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockEtcdBackupControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedEtcdBackupController.SyncCalls()) +func (mock *EtcdBackupControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockEtcdBackupControllerMockSync.RLock() + calls = mock.calls.Sync + lockEtcdBackupControllerMockSync.RUnlock() + return calls +} + +var ( + lockEtcdBackupInterfaceMockAddClusterScopedHandler sync.RWMutex + lockEtcdBackupInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockEtcdBackupInterfaceMockAddHandler sync.RWMutex + lockEtcdBackupInterfaceMockAddLifecycle sync.RWMutex + lockEtcdBackupInterfaceMockController sync.RWMutex + lockEtcdBackupInterfaceMockCreate sync.RWMutex + lockEtcdBackupInterfaceMockDelete sync.RWMutex + lockEtcdBackupInterfaceMockDeleteCollection sync.RWMutex + lockEtcdBackupInterfaceMockDeleteNamespaced sync.RWMutex + lockEtcdBackupInterfaceMockGet sync.RWMutex + lockEtcdBackupInterfaceMockGetNamespaced sync.RWMutex + lockEtcdBackupInterfaceMockList sync.RWMutex + lockEtcdBackupInterfaceMockObjectClient sync.RWMutex + lockEtcdBackupInterfaceMockUpdate sync.RWMutex + lockEtcdBackupInterfaceMockWatch sync.RWMutex +) + +// Ensure, that EtcdBackupInterfaceMock does implement EtcdBackupInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.EtcdBackupInterface = &EtcdBackupInterfaceMock{} + +// EtcdBackupInterfaceMock is a mock implementation of EtcdBackupInterface. +// +// func TestSomethingThatUsesEtcdBackupInterface(t *testing.T) { +// +// // make and configure a mocked EtcdBackupInterface +// mockedEtcdBackupInterface := &EtcdBackupInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.EtcdBackupHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.EtcdBackupLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.EtcdBackupHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.EtcdBackupLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.EtcdBackupController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.EtcdBackup) (*v3.EtcdBackup, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.EtcdBackup, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.EtcdBackup, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.EtcdBackupList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.EtcdBackup) (*v3.EtcdBackup, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedEtcdBackupInterface in code that requires EtcdBackupInterface +// // and then make assertions. +// +// } +type EtcdBackupInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.EtcdBackupHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.EtcdBackupLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.EtcdBackupHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.EtcdBackupLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.EtcdBackupController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.EtcdBackup) (*v3.EtcdBackup, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.EtcdBackup, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.EtcdBackup, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.EtcdBackupList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.EtcdBackup) (*v3.EtcdBackup, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.EtcdBackupHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.EtcdBackupLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.EtcdBackupHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.EtcdBackupLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.EtcdBackup + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.EtcdBackup + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *EtcdBackupInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.EtcdBackupHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("EtcdBackupInterfaceMock.AddClusterScopedHandlerFunc: method is nil but EtcdBackupInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.EtcdBackupHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockEtcdBackupInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockEtcdBackupInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedEtcdBackupInterface.AddClusterScopedHandlerCalls()) +func (mock *EtcdBackupInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.EtcdBackupHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.EtcdBackupHandlerFunc + } + lockEtcdBackupInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockEtcdBackupInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *EtcdBackupInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.EtcdBackupLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("EtcdBackupInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but EtcdBackupInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.EtcdBackupLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockEtcdBackupInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockEtcdBackupInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedEtcdBackupInterface.AddClusterScopedLifecycleCalls()) +func (mock *EtcdBackupInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.EtcdBackupLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.EtcdBackupLifecycle + } + lockEtcdBackupInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockEtcdBackupInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *EtcdBackupInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.EtcdBackupHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("EtcdBackupInterfaceMock.AddHandlerFunc: method is nil but EtcdBackupInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.EtcdBackupHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockEtcdBackupInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockEtcdBackupInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedEtcdBackupInterface.AddHandlerCalls()) +func (mock *EtcdBackupInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.EtcdBackupHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.EtcdBackupHandlerFunc + } + lockEtcdBackupInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockEtcdBackupInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *EtcdBackupInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.EtcdBackupLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("EtcdBackupInterfaceMock.AddLifecycleFunc: method is nil but EtcdBackupInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.EtcdBackupLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockEtcdBackupInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockEtcdBackupInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedEtcdBackupInterface.AddLifecycleCalls()) +func (mock *EtcdBackupInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.EtcdBackupLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.EtcdBackupLifecycle + } + lockEtcdBackupInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockEtcdBackupInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *EtcdBackupInterfaceMock) Controller() v3.EtcdBackupController { + if mock.ControllerFunc == nil { + panic("EtcdBackupInterfaceMock.ControllerFunc: method is nil but EtcdBackupInterface.Controller was just called") + } + callInfo := struct { + }{} + lockEtcdBackupInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockEtcdBackupInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedEtcdBackupInterface.ControllerCalls()) +func (mock *EtcdBackupInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockEtcdBackupInterfaceMockController.RLock() + calls = mock.calls.Controller + lockEtcdBackupInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *EtcdBackupInterfaceMock) Create(in1 *v3.EtcdBackup) (*v3.EtcdBackup, error) { + if mock.CreateFunc == nil { + panic("EtcdBackupInterfaceMock.CreateFunc: method is nil but EtcdBackupInterface.Create was just called") + } + callInfo := struct { + In1 *v3.EtcdBackup + }{ + In1: in1, + } + lockEtcdBackupInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockEtcdBackupInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedEtcdBackupInterface.CreateCalls()) +func (mock *EtcdBackupInterfaceMock) CreateCalls() []struct { + In1 *v3.EtcdBackup +} { + var calls []struct { + In1 *v3.EtcdBackup + } + lockEtcdBackupInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockEtcdBackupInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *EtcdBackupInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("EtcdBackupInterfaceMock.DeleteFunc: method is nil but EtcdBackupInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockEtcdBackupInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockEtcdBackupInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedEtcdBackupInterface.DeleteCalls()) +func (mock *EtcdBackupInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockEtcdBackupInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockEtcdBackupInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *EtcdBackupInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("EtcdBackupInterfaceMock.DeleteCollectionFunc: method is nil but EtcdBackupInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockEtcdBackupInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockEtcdBackupInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedEtcdBackupInterface.DeleteCollectionCalls()) +func (mock *EtcdBackupInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockEtcdBackupInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockEtcdBackupInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *EtcdBackupInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("EtcdBackupInterfaceMock.DeleteNamespacedFunc: method is nil but EtcdBackupInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockEtcdBackupInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockEtcdBackupInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedEtcdBackupInterface.DeleteNamespacedCalls()) +func (mock *EtcdBackupInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockEtcdBackupInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockEtcdBackupInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *EtcdBackupInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.EtcdBackup, error) { + if mock.GetFunc == nil { + panic("EtcdBackupInterfaceMock.GetFunc: method is nil but EtcdBackupInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockEtcdBackupInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockEtcdBackupInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedEtcdBackupInterface.GetCalls()) +func (mock *EtcdBackupInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockEtcdBackupInterfaceMockGet.RLock() + calls = mock.calls.Get + lockEtcdBackupInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *EtcdBackupInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.EtcdBackup, error) { + if mock.GetNamespacedFunc == nil { + panic("EtcdBackupInterfaceMock.GetNamespacedFunc: method is nil but EtcdBackupInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockEtcdBackupInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockEtcdBackupInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedEtcdBackupInterface.GetNamespacedCalls()) +func (mock *EtcdBackupInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockEtcdBackupInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockEtcdBackupInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *EtcdBackupInterfaceMock) List(opts v1.ListOptions) (*v3.EtcdBackupList, error) { + if mock.ListFunc == nil { + panic("EtcdBackupInterfaceMock.ListFunc: method is nil but EtcdBackupInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockEtcdBackupInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockEtcdBackupInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedEtcdBackupInterface.ListCalls()) +func (mock *EtcdBackupInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockEtcdBackupInterfaceMockList.RLock() + calls = mock.calls.List + lockEtcdBackupInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *EtcdBackupInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("EtcdBackupInterfaceMock.ObjectClientFunc: method is nil but EtcdBackupInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockEtcdBackupInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockEtcdBackupInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedEtcdBackupInterface.ObjectClientCalls()) +func (mock *EtcdBackupInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockEtcdBackupInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockEtcdBackupInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *EtcdBackupInterfaceMock) Update(in1 *v3.EtcdBackup) (*v3.EtcdBackup, error) { + if mock.UpdateFunc == nil { + panic("EtcdBackupInterfaceMock.UpdateFunc: method is nil but EtcdBackupInterface.Update was just called") + } + callInfo := struct { + In1 *v3.EtcdBackup + }{ + In1: in1, + } + lockEtcdBackupInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockEtcdBackupInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedEtcdBackupInterface.UpdateCalls()) +func (mock *EtcdBackupInterfaceMock) UpdateCalls() []struct { + In1 *v3.EtcdBackup +} { + var calls []struct { + In1 *v3.EtcdBackup + } + lockEtcdBackupInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockEtcdBackupInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *EtcdBackupInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("EtcdBackupInterfaceMock.WatchFunc: method is nil but EtcdBackupInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockEtcdBackupInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockEtcdBackupInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedEtcdBackupInterface.WatchCalls()) +func (mock *EtcdBackupInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockEtcdBackupInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockEtcdBackupInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockEtcdBackupsGetterMockEtcdBackups sync.RWMutex +) + +// Ensure, that EtcdBackupsGetterMock does implement EtcdBackupsGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.EtcdBackupsGetter = &EtcdBackupsGetterMock{} + +// EtcdBackupsGetterMock is a mock implementation of EtcdBackupsGetter. +// +// func TestSomethingThatUsesEtcdBackupsGetter(t *testing.T) { +// +// // make and configure a mocked EtcdBackupsGetter +// mockedEtcdBackupsGetter := &EtcdBackupsGetterMock{ +// EtcdBackupsFunc: func(namespace string) v3.EtcdBackupInterface { +// panic("mock out the EtcdBackups method") +// }, +// } +// +// // use mockedEtcdBackupsGetter in code that requires EtcdBackupsGetter +// // and then make assertions. +// +// } +type EtcdBackupsGetterMock struct { + // EtcdBackupsFunc mocks the EtcdBackups method. + EtcdBackupsFunc func(namespace string) v3.EtcdBackupInterface + + // calls tracks calls to the methods. + calls struct { + // EtcdBackups holds details about calls to the EtcdBackups method. + EtcdBackups []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// EtcdBackups calls EtcdBackupsFunc. +func (mock *EtcdBackupsGetterMock) EtcdBackups(namespace string) v3.EtcdBackupInterface { + if mock.EtcdBackupsFunc == nil { + panic("EtcdBackupsGetterMock.EtcdBackupsFunc: method is nil but EtcdBackupsGetter.EtcdBackups was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockEtcdBackupsGetterMockEtcdBackups.Lock() + mock.calls.EtcdBackups = append(mock.calls.EtcdBackups, callInfo) + lockEtcdBackupsGetterMockEtcdBackups.Unlock() + return mock.EtcdBackupsFunc(namespace) +} + +// EtcdBackupsCalls gets all the calls that were made to EtcdBackups. +// Check the length with: +// len(mockedEtcdBackupsGetter.EtcdBackupsCalls()) +func (mock *EtcdBackupsGetterMock) EtcdBackupsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockEtcdBackupsGetterMockEtcdBackups.RLock() + calls = mock.calls.EtcdBackups + lockEtcdBackupsGetterMockEtcdBackups.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_global_dns_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_global_dns_mock_test.go new file mode 100644 index 00000000..2e4ebfde --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_global_dns_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockGlobalDNSListerMockGet sync.RWMutex + lockGlobalDNSListerMockList sync.RWMutex +) + +// Ensure, that GlobalDNSListerMock does implement GlobalDNSLister. +// If this is not the case, regenerate this file with moq. +var _ v3.GlobalDNSLister = &GlobalDNSListerMock{} + +// GlobalDNSListerMock is a mock implementation of GlobalDNSLister. +// +// func TestSomethingThatUsesGlobalDNSLister(t *testing.T) { +// +// // make and configure a mocked GlobalDNSLister +// mockedGlobalDNSLister := &GlobalDNSListerMock{ +// GetFunc: func(namespace string, name string) (*v3.GlobalDNS, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.GlobalDNS, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedGlobalDNSLister in code that requires GlobalDNSLister +// // and then make assertions. +// +// } +type GlobalDNSListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.GlobalDNS, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.GlobalDNS, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *GlobalDNSListerMock) Get(namespace string, name string) (*v3.GlobalDNS, error) { + if mock.GetFunc == nil { + panic("GlobalDNSListerMock.GetFunc: method is nil but GlobalDNSLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockGlobalDNSListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockGlobalDNSListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedGlobalDNSLister.GetCalls()) +func (mock *GlobalDNSListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockGlobalDNSListerMockGet.RLock() + calls = mock.calls.Get + lockGlobalDNSListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *GlobalDNSListerMock) List(namespace string, selector labels.Selector) ([]*v3.GlobalDNS, error) { + if mock.ListFunc == nil { + panic("GlobalDNSListerMock.ListFunc: method is nil but GlobalDNSLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockGlobalDNSListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockGlobalDNSListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedGlobalDNSLister.ListCalls()) +func (mock *GlobalDNSListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockGlobalDNSListerMockList.RLock() + calls = mock.calls.List + lockGlobalDNSListerMockList.RUnlock() + return calls +} + +var ( + lockGlobalDNSControllerMockAddClusterScopedHandler sync.RWMutex + lockGlobalDNSControllerMockAddHandler sync.RWMutex + lockGlobalDNSControllerMockEnqueue sync.RWMutex + lockGlobalDNSControllerMockGeneric sync.RWMutex + lockGlobalDNSControllerMockInformer sync.RWMutex + lockGlobalDNSControllerMockLister sync.RWMutex + lockGlobalDNSControllerMockStart sync.RWMutex + lockGlobalDNSControllerMockSync sync.RWMutex +) + +// Ensure, that GlobalDNSControllerMock does implement GlobalDNSController. +// If this is not the case, regenerate this file with moq. +var _ v3.GlobalDNSController = &GlobalDNSControllerMock{} + +// GlobalDNSControllerMock is a mock implementation of GlobalDNSController. +// +// func TestSomethingThatUsesGlobalDNSController(t *testing.T) { +// +// // make and configure a mocked GlobalDNSController +// mockedGlobalDNSController := &GlobalDNSControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.GlobalDNSHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.GlobalDNSHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.GlobalDNSLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedGlobalDNSController in code that requires GlobalDNSController +// // and then make assertions. +// +// } +type GlobalDNSControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.GlobalDNSHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.GlobalDNSHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.GlobalDNSLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.GlobalDNSHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.GlobalDNSHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *GlobalDNSControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.GlobalDNSHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("GlobalDNSControllerMock.AddClusterScopedHandlerFunc: method is nil but GlobalDNSController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.GlobalDNSHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockGlobalDNSControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockGlobalDNSControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedGlobalDNSController.AddClusterScopedHandlerCalls()) +func (mock *GlobalDNSControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.GlobalDNSHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.GlobalDNSHandlerFunc + } + lockGlobalDNSControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockGlobalDNSControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *GlobalDNSControllerMock) AddHandler(ctx context.Context, name string, handler v3.GlobalDNSHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("GlobalDNSControllerMock.AddHandlerFunc: method is nil but GlobalDNSController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.GlobalDNSHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockGlobalDNSControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockGlobalDNSControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedGlobalDNSController.AddHandlerCalls()) +func (mock *GlobalDNSControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.GlobalDNSHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.GlobalDNSHandlerFunc + } + lockGlobalDNSControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockGlobalDNSControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *GlobalDNSControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("GlobalDNSControllerMock.EnqueueFunc: method is nil but GlobalDNSController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockGlobalDNSControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockGlobalDNSControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedGlobalDNSController.EnqueueCalls()) +func (mock *GlobalDNSControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockGlobalDNSControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockGlobalDNSControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *GlobalDNSControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("GlobalDNSControllerMock.GenericFunc: method is nil but GlobalDNSController.Generic was just called") + } + callInfo := struct { + }{} + lockGlobalDNSControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockGlobalDNSControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedGlobalDNSController.GenericCalls()) +func (mock *GlobalDNSControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockGlobalDNSControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockGlobalDNSControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *GlobalDNSControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("GlobalDNSControllerMock.InformerFunc: method is nil but GlobalDNSController.Informer was just called") + } + callInfo := struct { + }{} + lockGlobalDNSControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockGlobalDNSControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedGlobalDNSController.InformerCalls()) +func (mock *GlobalDNSControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockGlobalDNSControllerMockInformer.RLock() + calls = mock.calls.Informer + lockGlobalDNSControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *GlobalDNSControllerMock) Lister() v3.GlobalDNSLister { + if mock.ListerFunc == nil { + panic("GlobalDNSControllerMock.ListerFunc: method is nil but GlobalDNSController.Lister was just called") + } + callInfo := struct { + }{} + lockGlobalDNSControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockGlobalDNSControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedGlobalDNSController.ListerCalls()) +func (mock *GlobalDNSControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockGlobalDNSControllerMockLister.RLock() + calls = mock.calls.Lister + lockGlobalDNSControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *GlobalDNSControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("GlobalDNSControllerMock.StartFunc: method is nil but GlobalDNSController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockGlobalDNSControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockGlobalDNSControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedGlobalDNSController.StartCalls()) +func (mock *GlobalDNSControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockGlobalDNSControllerMockStart.RLock() + calls = mock.calls.Start + lockGlobalDNSControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *GlobalDNSControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("GlobalDNSControllerMock.SyncFunc: method is nil but GlobalDNSController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockGlobalDNSControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockGlobalDNSControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedGlobalDNSController.SyncCalls()) +func (mock *GlobalDNSControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockGlobalDNSControllerMockSync.RLock() + calls = mock.calls.Sync + lockGlobalDNSControllerMockSync.RUnlock() + return calls +} + +var ( + lockGlobalDNSInterfaceMockAddClusterScopedHandler sync.RWMutex + lockGlobalDNSInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockGlobalDNSInterfaceMockAddHandler sync.RWMutex + lockGlobalDNSInterfaceMockAddLifecycle sync.RWMutex + lockGlobalDNSInterfaceMockController sync.RWMutex + lockGlobalDNSInterfaceMockCreate sync.RWMutex + lockGlobalDNSInterfaceMockDelete sync.RWMutex + lockGlobalDNSInterfaceMockDeleteCollection sync.RWMutex + lockGlobalDNSInterfaceMockDeleteNamespaced sync.RWMutex + lockGlobalDNSInterfaceMockGet sync.RWMutex + lockGlobalDNSInterfaceMockGetNamespaced sync.RWMutex + lockGlobalDNSInterfaceMockList sync.RWMutex + lockGlobalDNSInterfaceMockObjectClient sync.RWMutex + lockGlobalDNSInterfaceMockUpdate sync.RWMutex + lockGlobalDNSInterfaceMockWatch sync.RWMutex +) + +// Ensure, that GlobalDNSInterfaceMock does implement GlobalDNSInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.GlobalDNSInterface = &GlobalDNSInterfaceMock{} + +// GlobalDNSInterfaceMock is a mock implementation of GlobalDNSInterface. +// +// func TestSomethingThatUsesGlobalDNSInterface(t *testing.T) { +// +// // make and configure a mocked GlobalDNSInterface +// mockedGlobalDNSInterface := &GlobalDNSInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.GlobalDNSHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.GlobalDNSLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.GlobalDNSHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.GlobalDNSLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.GlobalDNSController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.GlobalDNS) (*v3.GlobalDNS, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.GlobalDNS, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.GlobalDNS, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.GlobalDNSList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.GlobalDNS) (*v3.GlobalDNS, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedGlobalDNSInterface in code that requires GlobalDNSInterface +// // and then make assertions. +// +// } +type GlobalDNSInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.GlobalDNSHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.GlobalDNSLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.GlobalDNSHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.GlobalDNSLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.GlobalDNSController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.GlobalDNS) (*v3.GlobalDNS, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.GlobalDNS, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.GlobalDNS, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.GlobalDNSList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.GlobalDNS) (*v3.GlobalDNS, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.GlobalDNSHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.GlobalDNSLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.GlobalDNSHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.GlobalDNSLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.GlobalDNS + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.GlobalDNS + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *GlobalDNSInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.GlobalDNSHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("GlobalDNSInterfaceMock.AddClusterScopedHandlerFunc: method is nil but GlobalDNSInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.GlobalDNSHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockGlobalDNSInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockGlobalDNSInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedGlobalDNSInterface.AddClusterScopedHandlerCalls()) +func (mock *GlobalDNSInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.GlobalDNSHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.GlobalDNSHandlerFunc + } + lockGlobalDNSInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockGlobalDNSInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *GlobalDNSInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.GlobalDNSLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("GlobalDNSInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but GlobalDNSInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.GlobalDNSLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockGlobalDNSInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockGlobalDNSInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedGlobalDNSInterface.AddClusterScopedLifecycleCalls()) +func (mock *GlobalDNSInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.GlobalDNSLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.GlobalDNSLifecycle + } + lockGlobalDNSInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockGlobalDNSInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *GlobalDNSInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.GlobalDNSHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("GlobalDNSInterfaceMock.AddHandlerFunc: method is nil but GlobalDNSInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.GlobalDNSHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockGlobalDNSInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockGlobalDNSInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedGlobalDNSInterface.AddHandlerCalls()) +func (mock *GlobalDNSInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.GlobalDNSHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.GlobalDNSHandlerFunc + } + lockGlobalDNSInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockGlobalDNSInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *GlobalDNSInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.GlobalDNSLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("GlobalDNSInterfaceMock.AddLifecycleFunc: method is nil but GlobalDNSInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.GlobalDNSLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockGlobalDNSInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockGlobalDNSInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedGlobalDNSInterface.AddLifecycleCalls()) +func (mock *GlobalDNSInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.GlobalDNSLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.GlobalDNSLifecycle + } + lockGlobalDNSInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockGlobalDNSInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *GlobalDNSInterfaceMock) Controller() v3.GlobalDNSController { + if mock.ControllerFunc == nil { + panic("GlobalDNSInterfaceMock.ControllerFunc: method is nil but GlobalDNSInterface.Controller was just called") + } + callInfo := struct { + }{} + lockGlobalDNSInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockGlobalDNSInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedGlobalDNSInterface.ControllerCalls()) +func (mock *GlobalDNSInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockGlobalDNSInterfaceMockController.RLock() + calls = mock.calls.Controller + lockGlobalDNSInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *GlobalDNSInterfaceMock) Create(in1 *v3.GlobalDNS) (*v3.GlobalDNS, error) { + if mock.CreateFunc == nil { + panic("GlobalDNSInterfaceMock.CreateFunc: method is nil but GlobalDNSInterface.Create was just called") + } + callInfo := struct { + In1 *v3.GlobalDNS + }{ + In1: in1, + } + lockGlobalDNSInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockGlobalDNSInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedGlobalDNSInterface.CreateCalls()) +func (mock *GlobalDNSInterfaceMock) CreateCalls() []struct { + In1 *v3.GlobalDNS +} { + var calls []struct { + In1 *v3.GlobalDNS + } + lockGlobalDNSInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockGlobalDNSInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *GlobalDNSInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("GlobalDNSInterfaceMock.DeleteFunc: method is nil but GlobalDNSInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockGlobalDNSInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockGlobalDNSInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedGlobalDNSInterface.DeleteCalls()) +func (mock *GlobalDNSInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockGlobalDNSInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockGlobalDNSInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *GlobalDNSInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("GlobalDNSInterfaceMock.DeleteCollectionFunc: method is nil but GlobalDNSInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockGlobalDNSInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockGlobalDNSInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedGlobalDNSInterface.DeleteCollectionCalls()) +func (mock *GlobalDNSInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockGlobalDNSInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockGlobalDNSInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *GlobalDNSInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("GlobalDNSInterfaceMock.DeleteNamespacedFunc: method is nil but GlobalDNSInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockGlobalDNSInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockGlobalDNSInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedGlobalDNSInterface.DeleteNamespacedCalls()) +func (mock *GlobalDNSInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockGlobalDNSInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockGlobalDNSInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *GlobalDNSInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.GlobalDNS, error) { + if mock.GetFunc == nil { + panic("GlobalDNSInterfaceMock.GetFunc: method is nil but GlobalDNSInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockGlobalDNSInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockGlobalDNSInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedGlobalDNSInterface.GetCalls()) +func (mock *GlobalDNSInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockGlobalDNSInterfaceMockGet.RLock() + calls = mock.calls.Get + lockGlobalDNSInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *GlobalDNSInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.GlobalDNS, error) { + if mock.GetNamespacedFunc == nil { + panic("GlobalDNSInterfaceMock.GetNamespacedFunc: method is nil but GlobalDNSInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockGlobalDNSInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockGlobalDNSInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedGlobalDNSInterface.GetNamespacedCalls()) +func (mock *GlobalDNSInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockGlobalDNSInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockGlobalDNSInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *GlobalDNSInterfaceMock) List(opts v1.ListOptions) (*v3.GlobalDNSList, error) { + if mock.ListFunc == nil { + panic("GlobalDNSInterfaceMock.ListFunc: method is nil but GlobalDNSInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockGlobalDNSInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockGlobalDNSInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedGlobalDNSInterface.ListCalls()) +func (mock *GlobalDNSInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockGlobalDNSInterfaceMockList.RLock() + calls = mock.calls.List + lockGlobalDNSInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *GlobalDNSInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("GlobalDNSInterfaceMock.ObjectClientFunc: method is nil but GlobalDNSInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockGlobalDNSInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockGlobalDNSInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedGlobalDNSInterface.ObjectClientCalls()) +func (mock *GlobalDNSInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockGlobalDNSInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockGlobalDNSInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *GlobalDNSInterfaceMock) Update(in1 *v3.GlobalDNS) (*v3.GlobalDNS, error) { + if mock.UpdateFunc == nil { + panic("GlobalDNSInterfaceMock.UpdateFunc: method is nil but GlobalDNSInterface.Update was just called") + } + callInfo := struct { + In1 *v3.GlobalDNS + }{ + In1: in1, + } + lockGlobalDNSInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockGlobalDNSInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedGlobalDNSInterface.UpdateCalls()) +func (mock *GlobalDNSInterfaceMock) UpdateCalls() []struct { + In1 *v3.GlobalDNS +} { + var calls []struct { + In1 *v3.GlobalDNS + } + lockGlobalDNSInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockGlobalDNSInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *GlobalDNSInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("GlobalDNSInterfaceMock.WatchFunc: method is nil but GlobalDNSInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockGlobalDNSInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockGlobalDNSInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedGlobalDNSInterface.WatchCalls()) +func (mock *GlobalDNSInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockGlobalDNSInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockGlobalDNSInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockGlobalDNSsGetterMockGlobalDNSs sync.RWMutex +) + +// Ensure, that GlobalDNSsGetterMock does implement GlobalDNSsGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.GlobalDNSsGetter = &GlobalDNSsGetterMock{} + +// GlobalDNSsGetterMock is a mock implementation of GlobalDNSsGetter. +// +// func TestSomethingThatUsesGlobalDNSsGetter(t *testing.T) { +// +// // make and configure a mocked GlobalDNSsGetter +// mockedGlobalDNSsGetter := &GlobalDNSsGetterMock{ +// GlobalDNSsFunc: func(namespace string) v3.GlobalDNSInterface { +// panic("mock out the GlobalDNSs method") +// }, +// } +// +// // use mockedGlobalDNSsGetter in code that requires GlobalDNSsGetter +// // and then make assertions. +// +// } +type GlobalDNSsGetterMock struct { + // GlobalDNSsFunc mocks the GlobalDNSs method. + GlobalDNSsFunc func(namespace string) v3.GlobalDNSInterface + + // calls tracks calls to the methods. + calls struct { + // GlobalDNSs holds details about calls to the GlobalDNSs method. + GlobalDNSs []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// GlobalDNSs calls GlobalDNSsFunc. +func (mock *GlobalDNSsGetterMock) GlobalDNSs(namespace string) v3.GlobalDNSInterface { + if mock.GlobalDNSsFunc == nil { + panic("GlobalDNSsGetterMock.GlobalDNSsFunc: method is nil but GlobalDNSsGetter.GlobalDNSs was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockGlobalDNSsGetterMockGlobalDNSs.Lock() + mock.calls.GlobalDNSs = append(mock.calls.GlobalDNSs, callInfo) + lockGlobalDNSsGetterMockGlobalDNSs.Unlock() + return mock.GlobalDNSsFunc(namespace) +} + +// GlobalDNSsCalls gets all the calls that were made to GlobalDNSs. +// Check the length with: +// len(mockedGlobalDNSsGetter.GlobalDNSsCalls()) +func (mock *GlobalDNSsGetterMock) GlobalDNSsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockGlobalDNSsGetterMockGlobalDNSs.RLock() + calls = mock.calls.GlobalDNSs + lockGlobalDNSsGetterMockGlobalDNSs.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_global_dns_provider_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_global_dns_provider_mock_test.go new file mode 100644 index 00000000..681941e4 --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_global_dns_provider_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockGlobalDNSProviderListerMockGet sync.RWMutex + lockGlobalDNSProviderListerMockList sync.RWMutex +) + +// Ensure, that GlobalDNSProviderListerMock does implement GlobalDNSProviderLister. +// If this is not the case, regenerate this file with moq. +var _ v3.GlobalDNSProviderLister = &GlobalDNSProviderListerMock{} + +// GlobalDNSProviderListerMock is a mock implementation of GlobalDNSProviderLister. +// +// func TestSomethingThatUsesGlobalDNSProviderLister(t *testing.T) { +// +// // make and configure a mocked GlobalDNSProviderLister +// mockedGlobalDNSProviderLister := &GlobalDNSProviderListerMock{ +// GetFunc: func(namespace string, name string) (*v3.GlobalDNSProvider, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.GlobalDNSProvider, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedGlobalDNSProviderLister in code that requires GlobalDNSProviderLister +// // and then make assertions. +// +// } +type GlobalDNSProviderListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.GlobalDNSProvider, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.GlobalDNSProvider, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *GlobalDNSProviderListerMock) Get(namespace string, name string) (*v3.GlobalDNSProvider, error) { + if mock.GetFunc == nil { + panic("GlobalDNSProviderListerMock.GetFunc: method is nil but GlobalDNSProviderLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockGlobalDNSProviderListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockGlobalDNSProviderListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedGlobalDNSProviderLister.GetCalls()) +func (mock *GlobalDNSProviderListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockGlobalDNSProviderListerMockGet.RLock() + calls = mock.calls.Get + lockGlobalDNSProviderListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *GlobalDNSProviderListerMock) List(namespace string, selector labels.Selector) ([]*v3.GlobalDNSProvider, error) { + if mock.ListFunc == nil { + panic("GlobalDNSProviderListerMock.ListFunc: method is nil but GlobalDNSProviderLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockGlobalDNSProviderListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockGlobalDNSProviderListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedGlobalDNSProviderLister.ListCalls()) +func (mock *GlobalDNSProviderListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockGlobalDNSProviderListerMockList.RLock() + calls = mock.calls.List + lockGlobalDNSProviderListerMockList.RUnlock() + return calls +} + +var ( + lockGlobalDNSProviderControllerMockAddClusterScopedHandler sync.RWMutex + lockGlobalDNSProviderControllerMockAddHandler sync.RWMutex + lockGlobalDNSProviderControllerMockEnqueue sync.RWMutex + lockGlobalDNSProviderControllerMockGeneric sync.RWMutex + lockGlobalDNSProviderControllerMockInformer sync.RWMutex + lockGlobalDNSProviderControllerMockLister sync.RWMutex + lockGlobalDNSProviderControllerMockStart sync.RWMutex + lockGlobalDNSProviderControllerMockSync sync.RWMutex +) + +// Ensure, that GlobalDNSProviderControllerMock does implement GlobalDNSProviderController. +// If this is not the case, regenerate this file with moq. +var _ v3.GlobalDNSProviderController = &GlobalDNSProviderControllerMock{} + +// GlobalDNSProviderControllerMock is a mock implementation of GlobalDNSProviderController. +// +// func TestSomethingThatUsesGlobalDNSProviderController(t *testing.T) { +// +// // make and configure a mocked GlobalDNSProviderController +// mockedGlobalDNSProviderController := &GlobalDNSProviderControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.GlobalDNSProviderHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.GlobalDNSProviderHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.GlobalDNSProviderLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedGlobalDNSProviderController in code that requires GlobalDNSProviderController +// // and then make assertions. +// +// } +type GlobalDNSProviderControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.GlobalDNSProviderHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.GlobalDNSProviderHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.GlobalDNSProviderLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.GlobalDNSProviderHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.GlobalDNSProviderHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *GlobalDNSProviderControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.GlobalDNSProviderHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("GlobalDNSProviderControllerMock.AddClusterScopedHandlerFunc: method is nil but GlobalDNSProviderController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.GlobalDNSProviderHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockGlobalDNSProviderControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockGlobalDNSProviderControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedGlobalDNSProviderController.AddClusterScopedHandlerCalls()) +func (mock *GlobalDNSProviderControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.GlobalDNSProviderHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.GlobalDNSProviderHandlerFunc + } + lockGlobalDNSProviderControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockGlobalDNSProviderControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *GlobalDNSProviderControllerMock) AddHandler(ctx context.Context, name string, handler v3.GlobalDNSProviderHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("GlobalDNSProviderControllerMock.AddHandlerFunc: method is nil but GlobalDNSProviderController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.GlobalDNSProviderHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockGlobalDNSProviderControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockGlobalDNSProviderControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedGlobalDNSProviderController.AddHandlerCalls()) +func (mock *GlobalDNSProviderControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.GlobalDNSProviderHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.GlobalDNSProviderHandlerFunc + } + lockGlobalDNSProviderControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockGlobalDNSProviderControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *GlobalDNSProviderControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("GlobalDNSProviderControllerMock.EnqueueFunc: method is nil but GlobalDNSProviderController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockGlobalDNSProviderControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockGlobalDNSProviderControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedGlobalDNSProviderController.EnqueueCalls()) +func (mock *GlobalDNSProviderControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockGlobalDNSProviderControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockGlobalDNSProviderControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *GlobalDNSProviderControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("GlobalDNSProviderControllerMock.GenericFunc: method is nil but GlobalDNSProviderController.Generic was just called") + } + callInfo := struct { + }{} + lockGlobalDNSProviderControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockGlobalDNSProviderControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedGlobalDNSProviderController.GenericCalls()) +func (mock *GlobalDNSProviderControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockGlobalDNSProviderControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockGlobalDNSProviderControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *GlobalDNSProviderControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("GlobalDNSProviderControllerMock.InformerFunc: method is nil but GlobalDNSProviderController.Informer was just called") + } + callInfo := struct { + }{} + lockGlobalDNSProviderControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockGlobalDNSProviderControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedGlobalDNSProviderController.InformerCalls()) +func (mock *GlobalDNSProviderControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockGlobalDNSProviderControllerMockInformer.RLock() + calls = mock.calls.Informer + lockGlobalDNSProviderControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *GlobalDNSProviderControllerMock) Lister() v3.GlobalDNSProviderLister { + if mock.ListerFunc == nil { + panic("GlobalDNSProviderControllerMock.ListerFunc: method is nil but GlobalDNSProviderController.Lister was just called") + } + callInfo := struct { + }{} + lockGlobalDNSProviderControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockGlobalDNSProviderControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedGlobalDNSProviderController.ListerCalls()) +func (mock *GlobalDNSProviderControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockGlobalDNSProviderControllerMockLister.RLock() + calls = mock.calls.Lister + lockGlobalDNSProviderControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *GlobalDNSProviderControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("GlobalDNSProviderControllerMock.StartFunc: method is nil but GlobalDNSProviderController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockGlobalDNSProviderControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockGlobalDNSProviderControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedGlobalDNSProviderController.StartCalls()) +func (mock *GlobalDNSProviderControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockGlobalDNSProviderControllerMockStart.RLock() + calls = mock.calls.Start + lockGlobalDNSProviderControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *GlobalDNSProviderControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("GlobalDNSProviderControllerMock.SyncFunc: method is nil but GlobalDNSProviderController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockGlobalDNSProviderControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockGlobalDNSProviderControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedGlobalDNSProviderController.SyncCalls()) +func (mock *GlobalDNSProviderControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockGlobalDNSProviderControllerMockSync.RLock() + calls = mock.calls.Sync + lockGlobalDNSProviderControllerMockSync.RUnlock() + return calls +} + +var ( + lockGlobalDNSProviderInterfaceMockAddClusterScopedHandler sync.RWMutex + lockGlobalDNSProviderInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockGlobalDNSProviderInterfaceMockAddHandler sync.RWMutex + lockGlobalDNSProviderInterfaceMockAddLifecycle sync.RWMutex + lockGlobalDNSProviderInterfaceMockController sync.RWMutex + lockGlobalDNSProviderInterfaceMockCreate sync.RWMutex + lockGlobalDNSProviderInterfaceMockDelete sync.RWMutex + lockGlobalDNSProviderInterfaceMockDeleteCollection sync.RWMutex + lockGlobalDNSProviderInterfaceMockDeleteNamespaced sync.RWMutex + lockGlobalDNSProviderInterfaceMockGet sync.RWMutex + lockGlobalDNSProviderInterfaceMockGetNamespaced sync.RWMutex + lockGlobalDNSProviderInterfaceMockList sync.RWMutex + lockGlobalDNSProviderInterfaceMockObjectClient sync.RWMutex + lockGlobalDNSProviderInterfaceMockUpdate sync.RWMutex + lockGlobalDNSProviderInterfaceMockWatch sync.RWMutex +) + +// Ensure, that GlobalDNSProviderInterfaceMock does implement GlobalDNSProviderInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.GlobalDNSProviderInterface = &GlobalDNSProviderInterfaceMock{} + +// GlobalDNSProviderInterfaceMock is a mock implementation of GlobalDNSProviderInterface. +// +// func TestSomethingThatUsesGlobalDNSProviderInterface(t *testing.T) { +// +// // make and configure a mocked GlobalDNSProviderInterface +// mockedGlobalDNSProviderInterface := &GlobalDNSProviderInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.GlobalDNSProviderHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.GlobalDNSProviderLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.GlobalDNSProviderHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.GlobalDNSProviderLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.GlobalDNSProviderController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.GlobalDNSProvider) (*v3.GlobalDNSProvider, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.GlobalDNSProvider, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.GlobalDNSProvider, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.GlobalDNSProviderList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.GlobalDNSProvider) (*v3.GlobalDNSProvider, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedGlobalDNSProviderInterface in code that requires GlobalDNSProviderInterface +// // and then make assertions. +// +// } +type GlobalDNSProviderInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.GlobalDNSProviderHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.GlobalDNSProviderLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.GlobalDNSProviderHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.GlobalDNSProviderLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.GlobalDNSProviderController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.GlobalDNSProvider) (*v3.GlobalDNSProvider, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.GlobalDNSProvider, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.GlobalDNSProvider, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.GlobalDNSProviderList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.GlobalDNSProvider) (*v3.GlobalDNSProvider, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.GlobalDNSProviderHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.GlobalDNSProviderLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.GlobalDNSProviderHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.GlobalDNSProviderLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.GlobalDNSProvider + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.GlobalDNSProvider + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *GlobalDNSProviderInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.GlobalDNSProviderHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("GlobalDNSProviderInterfaceMock.AddClusterScopedHandlerFunc: method is nil but GlobalDNSProviderInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.GlobalDNSProviderHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockGlobalDNSProviderInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockGlobalDNSProviderInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedGlobalDNSProviderInterface.AddClusterScopedHandlerCalls()) +func (mock *GlobalDNSProviderInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.GlobalDNSProviderHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.GlobalDNSProviderHandlerFunc + } + lockGlobalDNSProviderInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockGlobalDNSProviderInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *GlobalDNSProviderInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.GlobalDNSProviderLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("GlobalDNSProviderInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but GlobalDNSProviderInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.GlobalDNSProviderLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockGlobalDNSProviderInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockGlobalDNSProviderInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedGlobalDNSProviderInterface.AddClusterScopedLifecycleCalls()) +func (mock *GlobalDNSProviderInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.GlobalDNSProviderLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.GlobalDNSProviderLifecycle + } + lockGlobalDNSProviderInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockGlobalDNSProviderInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *GlobalDNSProviderInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.GlobalDNSProviderHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("GlobalDNSProviderInterfaceMock.AddHandlerFunc: method is nil but GlobalDNSProviderInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.GlobalDNSProviderHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockGlobalDNSProviderInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockGlobalDNSProviderInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedGlobalDNSProviderInterface.AddHandlerCalls()) +func (mock *GlobalDNSProviderInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.GlobalDNSProviderHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.GlobalDNSProviderHandlerFunc + } + lockGlobalDNSProviderInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockGlobalDNSProviderInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *GlobalDNSProviderInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.GlobalDNSProviderLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("GlobalDNSProviderInterfaceMock.AddLifecycleFunc: method is nil but GlobalDNSProviderInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.GlobalDNSProviderLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockGlobalDNSProviderInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockGlobalDNSProviderInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedGlobalDNSProviderInterface.AddLifecycleCalls()) +func (mock *GlobalDNSProviderInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.GlobalDNSProviderLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.GlobalDNSProviderLifecycle + } + lockGlobalDNSProviderInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockGlobalDNSProviderInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *GlobalDNSProviderInterfaceMock) Controller() v3.GlobalDNSProviderController { + if mock.ControllerFunc == nil { + panic("GlobalDNSProviderInterfaceMock.ControllerFunc: method is nil but GlobalDNSProviderInterface.Controller was just called") + } + callInfo := struct { + }{} + lockGlobalDNSProviderInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockGlobalDNSProviderInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedGlobalDNSProviderInterface.ControllerCalls()) +func (mock *GlobalDNSProviderInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockGlobalDNSProviderInterfaceMockController.RLock() + calls = mock.calls.Controller + lockGlobalDNSProviderInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *GlobalDNSProviderInterfaceMock) Create(in1 *v3.GlobalDNSProvider) (*v3.GlobalDNSProvider, error) { + if mock.CreateFunc == nil { + panic("GlobalDNSProviderInterfaceMock.CreateFunc: method is nil but GlobalDNSProviderInterface.Create was just called") + } + callInfo := struct { + In1 *v3.GlobalDNSProvider + }{ + In1: in1, + } + lockGlobalDNSProviderInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockGlobalDNSProviderInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedGlobalDNSProviderInterface.CreateCalls()) +func (mock *GlobalDNSProviderInterfaceMock) CreateCalls() []struct { + In1 *v3.GlobalDNSProvider +} { + var calls []struct { + In1 *v3.GlobalDNSProvider + } + lockGlobalDNSProviderInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockGlobalDNSProviderInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *GlobalDNSProviderInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("GlobalDNSProviderInterfaceMock.DeleteFunc: method is nil but GlobalDNSProviderInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockGlobalDNSProviderInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockGlobalDNSProviderInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedGlobalDNSProviderInterface.DeleteCalls()) +func (mock *GlobalDNSProviderInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockGlobalDNSProviderInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockGlobalDNSProviderInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *GlobalDNSProviderInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("GlobalDNSProviderInterfaceMock.DeleteCollectionFunc: method is nil but GlobalDNSProviderInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockGlobalDNSProviderInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockGlobalDNSProviderInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedGlobalDNSProviderInterface.DeleteCollectionCalls()) +func (mock *GlobalDNSProviderInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockGlobalDNSProviderInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockGlobalDNSProviderInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *GlobalDNSProviderInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("GlobalDNSProviderInterfaceMock.DeleteNamespacedFunc: method is nil but GlobalDNSProviderInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockGlobalDNSProviderInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockGlobalDNSProviderInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedGlobalDNSProviderInterface.DeleteNamespacedCalls()) +func (mock *GlobalDNSProviderInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockGlobalDNSProviderInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockGlobalDNSProviderInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *GlobalDNSProviderInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.GlobalDNSProvider, error) { + if mock.GetFunc == nil { + panic("GlobalDNSProviderInterfaceMock.GetFunc: method is nil but GlobalDNSProviderInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockGlobalDNSProviderInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockGlobalDNSProviderInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedGlobalDNSProviderInterface.GetCalls()) +func (mock *GlobalDNSProviderInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockGlobalDNSProviderInterfaceMockGet.RLock() + calls = mock.calls.Get + lockGlobalDNSProviderInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *GlobalDNSProviderInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.GlobalDNSProvider, error) { + if mock.GetNamespacedFunc == nil { + panic("GlobalDNSProviderInterfaceMock.GetNamespacedFunc: method is nil but GlobalDNSProviderInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockGlobalDNSProviderInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockGlobalDNSProviderInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedGlobalDNSProviderInterface.GetNamespacedCalls()) +func (mock *GlobalDNSProviderInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockGlobalDNSProviderInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockGlobalDNSProviderInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *GlobalDNSProviderInterfaceMock) List(opts v1.ListOptions) (*v3.GlobalDNSProviderList, error) { + if mock.ListFunc == nil { + panic("GlobalDNSProviderInterfaceMock.ListFunc: method is nil but GlobalDNSProviderInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockGlobalDNSProviderInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockGlobalDNSProviderInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedGlobalDNSProviderInterface.ListCalls()) +func (mock *GlobalDNSProviderInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockGlobalDNSProviderInterfaceMockList.RLock() + calls = mock.calls.List + lockGlobalDNSProviderInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *GlobalDNSProviderInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("GlobalDNSProviderInterfaceMock.ObjectClientFunc: method is nil but GlobalDNSProviderInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockGlobalDNSProviderInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockGlobalDNSProviderInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedGlobalDNSProviderInterface.ObjectClientCalls()) +func (mock *GlobalDNSProviderInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockGlobalDNSProviderInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockGlobalDNSProviderInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *GlobalDNSProviderInterfaceMock) Update(in1 *v3.GlobalDNSProvider) (*v3.GlobalDNSProvider, error) { + if mock.UpdateFunc == nil { + panic("GlobalDNSProviderInterfaceMock.UpdateFunc: method is nil but GlobalDNSProviderInterface.Update was just called") + } + callInfo := struct { + In1 *v3.GlobalDNSProvider + }{ + In1: in1, + } + lockGlobalDNSProviderInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockGlobalDNSProviderInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedGlobalDNSProviderInterface.UpdateCalls()) +func (mock *GlobalDNSProviderInterfaceMock) UpdateCalls() []struct { + In1 *v3.GlobalDNSProvider +} { + var calls []struct { + In1 *v3.GlobalDNSProvider + } + lockGlobalDNSProviderInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockGlobalDNSProviderInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *GlobalDNSProviderInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("GlobalDNSProviderInterfaceMock.WatchFunc: method is nil but GlobalDNSProviderInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockGlobalDNSProviderInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockGlobalDNSProviderInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedGlobalDNSProviderInterface.WatchCalls()) +func (mock *GlobalDNSProviderInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockGlobalDNSProviderInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockGlobalDNSProviderInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockGlobalDNSProvidersGetterMockGlobalDNSProviders sync.RWMutex +) + +// Ensure, that GlobalDNSProvidersGetterMock does implement GlobalDNSProvidersGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.GlobalDNSProvidersGetter = &GlobalDNSProvidersGetterMock{} + +// GlobalDNSProvidersGetterMock is a mock implementation of GlobalDNSProvidersGetter. +// +// func TestSomethingThatUsesGlobalDNSProvidersGetter(t *testing.T) { +// +// // make and configure a mocked GlobalDNSProvidersGetter +// mockedGlobalDNSProvidersGetter := &GlobalDNSProvidersGetterMock{ +// GlobalDNSProvidersFunc: func(namespace string) v3.GlobalDNSProviderInterface { +// panic("mock out the GlobalDNSProviders method") +// }, +// } +// +// // use mockedGlobalDNSProvidersGetter in code that requires GlobalDNSProvidersGetter +// // and then make assertions. +// +// } +type GlobalDNSProvidersGetterMock struct { + // GlobalDNSProvidersFunc mocks the GlobalDNSProviders method. + GlobalDNSProvidersFunc func(namespace string) v3.GlobalDNSProviderInterface + + // calls tracks calls to the methods. + calls struct { + // GlobalDNSProviders holds details about calls to the GlobalDNSProviders method. + GlobalDNSProviders []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// GlobalDNSProviders calls GlobalDNSProvidersFunc. +func (mock *GlobalDNSProvidersGetterMock) GlobalDNSProviders(namespace string) v3.GlobalDNSProviderInterface { + if mock.GlobalDNSProvidersFunc == nil { + panic("GlobalDNSProvidersGetterMock.GlobalDNSProvidersFunc: method is nil but GlobalDNSProvidersGetter.GlobalDNSProviders was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockGlobalDNSProvidersGetterMockGlobalDNSProviders.Lock() + mock.calls.GlobalDNSProviders = append(mock.calls.GlobalDNSProviders, callInfo) + lockGlobalDNSProvidersGetterMockGlobalDNSProviders.Unlock() + return mock.GlobalDNSProvidersFunc(namespace) +} + +// GlobalDNSProvidersCalls gets all the calls that were made to GlobalDNSProviders. +// Check the length with: +// len(mockedGlobalDNSProvidersGetter.GlobalDNSProvidersCalls()) +func (mock *GlobalDNSProvidersGetterMock) GlobalDNSProvidersCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockGlobalDNSProvidersGetterMockGlobalDNSProviders.RLock() + calls = mock.calls.GlobalDNSProviders + lockGlobalDNSProvidersGetterMockGlobalDNSProviders.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_global_role_binding_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_global_role_binding_mock_test.go new file mode 100644 index 00000000..f88851f5 --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_global_role_binding_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockGlobalRoleBindingListerMockGet sync.RWMutex + lockGlobalRoleBindingListerMockList sync.RWMutex +) + +// Ensure, that GlobalRoleBindingListerMock does implement GlobalRoleBindingLister. +// If this is not the case, regenerate this file with moq. +var _ v3.GlobalRoleBindingLister = &GlobalRoleBindingListerMock{} + +// GlobalRoleBindingListerMock is a mock implementation of GlobalRoleBindingLister. +// +// func TestSomethingThatUsesGlobalRoleBindingLister(t *testing.T) { +// +// // make and configure a mocked GlobalRoleBindingLister +// mockedGlobalRoleBindingLister := &GlobalRoleBindingListerMock{ +// GetFunc: func(namespace string, name string) (*v3.GlobalRoleBinding, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.GlobalRoleBinding, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedGlobalRoleBindingLister in code that requires GlobalRoleBindingLister +// // and then make assertions. +// +// } +type GlobalRoleBindingListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.GlobalRoleBinding, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.GlobalRoleBinding, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *GlobalRoleBindingListerMock) Get(namespace string, name string) (*v3.GlobalRoleBinding, error) { + if mock.GetFunc == nil { + panic("GlobalRoleBindingListerMock.GetFunc: method is nil but GlobalRoleBindingLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockGlobalRoleBindingListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockGlobalRoleBindingListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedGlobalRoleBindingLister.GetCalls()) +func (mock *GlobalRoleBindingListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockGlobalRoleBindingListerMockGet.RLock() + calls = mock.calls.Get + lockGlobalRoleBindingListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *GlobalRoleBindingListerMock) List(namespace string, selector labels.Selector) ([]*v3.GlobalRoleBinding, error) { + if mock.ListFunc == nil { + panic("GlobalRoleBindingListerMock.ListFunc: method is nil but GlobalRoleBindingLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockGlobalRoleBindingListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockGlobalRoleBindingListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedGlobalRoleBindingLister.ListCalls()) +func (mock *GlobalRoleBindingListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockGlobalRoleBindingListerMockList.RLock() + calls = mock.calls.List + lockGlobalRoleBindingListerMockList.RUnlock() + return calls +} + +var ( + lockGlobalRoleBindingControllerMockAddClusterScopedHandler sync.RWMutex + lockGlobalRoleBindingControllerMockAddHandler sync.RWMutex + lockGlobalRoleBindingControllerMockEnqueue sync.RWMutex + lockGlobalRoleBindingControllerMockGeneric sync.RWMutex + lockGlobalRoleBindingControllerMockInformer sync.RWMutex + lockGlobalRoleBindingControllerMockLister sync.RWMutex + lockGlobalRoleBindingControllerMockStart sync.RWMutex + lockGlobalRoleBindingControllerMockSync sync.RWMutex +) + +// Ensure, that GlobalRoleBindingControllerMock does implement GlobalRoleBindingController. +// If this is not the case, regenerate this file with moq. +var _ v3.GlobalRoleBindingController = &GlobalRoleBindingControllerMock{} + +// GlobalRoleBindingControllerMock is a mock implementation of GlobalRoleBindingController. +// +// func TestSomethingThatUsesGlobalRoleBindingController(t *testing.T) { +// +// // make and configure a mocked GlobalRoleBindingController +// mockedGlobalRoleBindingController := &GlobalRoleBindingControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.GlobalRoleBindingHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.GlobalRoleBindingHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.GlobalRoleBindingLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedGlobalRoleBindingController in code that requires GlobalRoleBindingController +// // and then make assertions. +// +// } +type GlobalRoleBindingControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.GlobalRoleBindingHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.GlobalRoleBindingHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.GlobalRoleBindingLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.GlobalRoleBindingHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.GlobalRoleBindingHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *GlobalRoleBindingControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.GlobalRoleBindingHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("GlobalRoleBindingControllerMock.AddClusterScopedHandlerFunc: method is nil but GlobalRoleBindingController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.GlobalRoleBindingHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockGlobalRoleBindingControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockGlobalRoleBindingControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedGlobalRoleBindingController.AddClusterScopedHandlerCalls()) +func (mock *GlobalRoleBindingControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.GlobalRoleBindingHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.GlobalRoleBindingHandlerFunc + } + lockGlobalRoleBindingControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockGlobalRoleBindingControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *GlobalRoleBindingControllerMock) AddHandler(ctx context.Context, name string, handler v3.GlobalRoleBindingHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("GlobalRoleBindingControllerMock.AddHandlerFunc: method is nil but GlobalRoleBindingController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.GlobalRoleBindingHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockGlobalRoleBindingControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockGlobalRoleBindingControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedGlobalRoleBindingController.AddHandlerCalls()) +func (mock *GlobalRoleBindingControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.GlobalRoleBindingHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.GlobalRoleBindingHandlerFunc + } + lockGlobalRoleBindingControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockGlobalRoleBindingControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *GlobalRoleBindingControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("GlobalRoleBindingControllerMock.EnqueueFunc: method is nil but GlobalRoleBindingController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockGlobalRoleBindingControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockGlobalRoleBindingControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedGlobalRoleBindingController.EnqueueCalls()) +func (mock *GlobalRoleBindingControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockGlobalRoleBindingControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockGlobalRoleBindingControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *GlobalRoleBindingControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("GlobalRoleBindingControllerMock.GenericFunc: method is nil but GlobalRoleBindingController.Generic was just called") + } + callInfo := struct { + }{} + lockGlobalRoleBindingControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockGlobalRoleBindingControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedGlobalRoleBindingController.GenericCalls()) +func (mock *GlobalRoleBindingControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockGlobalRoleBindingControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockGlobalRoleBindingControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *GlobalRoleBindingControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("GlobalRoleBindingControllerMock.InformerFunc: method is nil but GlobalRoleBindingController.Informer was just called") + } + callInfo := struct { + }{} + lockGlobalRoleBindingControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockGlobalRoleBindingControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedGlobalRoleBindingController.InformerCalls()) +func (mock *GlobalRoleBindingControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockGlobalRoleBindingControllerMockInformer.RLock() + calls = mock.calls.Informer + lockGlobalRoleBindingControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *GlobalRoleBindingControllerMock) Lister() v3.GlobalRoleBindingLister { + if mock.ListerFunc == nil { + panic("GlobalRoleBindingControllerMock.ListerFunc: method is nil but GlobalRoleBindingController.Lister was just called") + } + callInfo := struct { + }{} + lockGlobalRoleBindingControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockGlobalRoleBindingControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedGlobalRoleBindingController.ListerCalls()) +func (mock *GlobalRoleBindingControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockGlobalRoleBindingControllerMockLister.RLock() + calls = mock.calls.Lister + lockGlobalRoleBindingControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *GlobalRoleBindingControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("GlobalRoleBindingControllerMock.StartFunc: method is nil but GlobalRoleBindingController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockGlobalRoleBindingControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockGlobalRoleBindingControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedGlobalRoleBindingController.StartCalls()) +func (mock *GlobalRoleBindingControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockGlobalRoleBindingControllerMockStart.RLock() + calls = mock.calls.Start + lockGlobalRoleBindingControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *GlobalRoleBindingControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("GlobalRoleBindingControllerMock.SyncFunc: method is nil but GlobalRoleBindingController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockGlobalRoleBindingControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockGlobalRoleBindingControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedGlobalRoleBindingController.SyncCalls()) +func (mock *GlobalRoleBindingControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockGlobalRoleBindingControllerMockSync.RLock() + calls = mock.calls.Sync + lockGlobalRoleBindingControllerMockSync.RUnlock() + return calls +} + +var ( + lockGlobalRoleBindingInterfaceMockAddClusterScopedHandler sync.RWMutex + lockGlobalRoleBindingInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockGlobalRoleBindingInterfaceMockAddHandler sync.RWMutex + lockGlobalRoleBindingInterfaceMockAddLifecycle sync.RWMutex + lockGlobalRoleBindingInterfaceMockController sync.RWMutex + lockGlobalRoleBindingInterfaceMockCreate sync.RWMutex + lockGlobalRoleBindingInterfaceMockDelete sync.RWMutex + lockGlobalRoleBindingInterfaceMockDeleteCollection sync.RWMutex + lockGlobalRoleBindingInterfaceMockDeleteNamespaced sync.RWMutex + lockGlobalRoleBindingInterfaceMockGet sync.RWMutex + lockGlobalRoleBindingInterfaceMockGetNamespaced sync.RWMutex + lockGlobalRoleBindingInterfaceMockList sync.RWMutex + lockGlobalRoleBindingInterfaceMockObjectClient sync.RWMutex + lockGlobalRoleBindingInterfaceMockUpdate sync.RWMutex + lockGlobalRoleBindingInterfaceMockWatch sync.RWMutex +) + +// Ensure, that GlobalRoleBindingInterfaceMock does implement GlobalRoleBindingInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.GlobalRoleBindingInterface = &GlobalRoleBindingInterfaceMock{} + +// GlobalRoleBindingInterfaceMock is a mock implementation of GlobalRoleBindingInterface. +// +// func TestSomethingThatUsesGlobalRoleBindingInterface(t *testing.T) { +// +// // make and configure a mocked GlobalRoleBindingInterface +// mockedGlobalRoleBindingInterface := &GlobalRoleBindingInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.GlobalRoleBindingHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.GlobalRoleBindingLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.GlobalRoleBindingHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.GlobalRoleBindingLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.GlobalRoleBindingController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.GlobalRoleBinding) (*v3.GlobalRoleBinding, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.GlobalRoleBinding, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.GlobalRoleBinding, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.GlobalRoleBindingList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.GlobalRoleBinding) (*v3.GlobalRoleBinding, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedGlobalRoleBindingInterface in code that requires GlobalRoleBindingInterface +// // and then make assertions. +// +// } +type GlobalRoleBindingInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.GlobalRoleBindingHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.GlobalRoleBindingLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.GlobalRoleBindingHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.GlobalRoleBindingLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.GlobalRoleBindingController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.GlobalRoleBinding) (*v3.GlobalRoleBinding, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.GlobalRoleBinding, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.GlobalRoleBinding, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.GlobalRoleBindingList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.GlobalRoleBinding) (*v3.GlobalRoleBinding, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.GlobalRoleBindingHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.GlobalRoleBindingLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.GlobalRoleBindingHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.GlobalRoleBindingLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.GlobalRoleBinding + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.GlobalRoleBinding + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *GlobalRoleBindingInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.GlobalRoleBindingHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("GlobalRoleBindingInterfaceMock.AddClusterScopedHandlerFunc: method is nil but GlobalRoleBindingInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.GlobalRoleBindingHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockGlobalRoleBindingInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockGlobalRoleBindingInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedGlobalRoleBindingInterface.AddClusterScopedHandlerCalls()) +func (mock *GlobalRoleBindingInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.GlobalRoleBindingHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.GlobalRoleBindingHandlerFunc + } + lockGlobalRoleBindingInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockGlobalRoleBindingInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *GlobalRoleBindingInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.GlobalRoleBindingLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("GlobalRoleBindingInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but GlobalRoleBindingInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.GlobalRoleBindingLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockGlobalRoleBindingInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockGlobalRoleBindingInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedGlobalRoleBindingInterface.AddClusterScopedLifecycleCalls()) +func (mock *GlobalRoleBindingInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.GlobalRoleBindingLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.GlobalRoleBindingLifecycle + } + lockGlobalRoleBindingInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockGlobalRoleBindingInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *GlobalRoleBindingInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.GlobalRoleBindingHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("GlobalRoleBindingInterfaceMock.AddHandlerFunc: method is nil but GlobalRoleBindingInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.GlobalRoleBindingHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockGlobalRoleBindingInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockGlobalRoleBindingInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedGlobalRoleBindingInterface.AddHandlerCalls()) +func (mock *GlobalRoleBindingInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.GlobalRoleBindingHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.GlobalRoleBindingHandlerFunc + } + lockGlobalRoleBindingInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockGlobalRoleBindingInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *GlobalRoleBindingInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.GlobalRoleBindingLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("GlobalRoleBindingInterfaceMock.AddLifecycleFunc: method is nil but GlobalRoleBindingInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.GlobalRoleBindingLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockGlobalRoleBindingInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockGlobalRoleBindingInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedGlobalRoleBindingInterface.AddLifecycleCalls()) +func (mock *GlobalRoleBindingInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.GlobalRoleBindingLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.GlobalRoleBindingLifecycle + } + lockGlobalRoleBindingInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockGlobalRoleBindingInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *GlobalRoleBindingInterfaceMock) Controller() v3.GlobalRoleBindingController { + if mock.ControllerFunc == nil { + panic("GlobalRoleBindingInterfaceMock.ControllerFunc: method is nil but GlobalRoleBindingInterface.Controller was just called") + } + callInfo := struct { + }{} + lockGlobalRoleBindingInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockGlobalRoleBindingInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedGlobalRoleBindingInterface.ControllerCalls()) +func (mock *GlobalRoleBindingInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockGlobalRoleBindingInterfaceMockController.RLock() + calls = mock.calls.Controller + lockGlobalRoleBindingInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *GlobalRoleBindingInterfaceMock) Create(in1 *v3.GlobalRoleBinding) (*v3.GlobalRoleBinding, error) { + if mock.CreateFunc == nil { + panic("GlobalRoleBindingInterfaceMock.CreateFunc: method is nil but GlobalRoleBindingInterface.Create was just called") + } + callInfo := struct { + In1 *v3.GlobalRoleBinding + }{ + In1: in1, + } + lockGlobalRoleBindingInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockGlobalRoleBindingInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedGlobalRoleBindingInterface.CreateCalls()) +func (mock *GlobalRoleBindingInterfaceMock) CreateCalls() []struct { + In1 *v3.GlobalRoleBinding +} { + var calls []struct { + In1 *v3.GlobalRoleBinding + } + lockGlobalRoleBindingInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockGlobalRoleBindingInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *GlobalRoleBindingInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("GlobalRoleBindingInterfaceMock.DeleteFunc: method is nil but GlobalRoleBindingInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockGlobalRoleBindingInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockGlobalRoleBindingInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedGlobalRoleBindingInterface.DeleteCalls()) +func (mock *GlobalRoleBindingInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockGlobalRoleBindingInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockGlobalRoleBindingInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *GlobalRoleBindingInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("GlobalRoleBindingInterfaceMock.DeleteCollectionFunc: method is nil but GlobalRoleBindingInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockGlobalRoleBindingInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockGlobalRoleBindingInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedGlobalRoleBindingInterface.DeleteCollectionCalls()) +func (mock *GlobalRoleBindingInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockGlobalRoleBindingInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockGlobalRoleBindingInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *GlobalRoleBindingInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("GlobalRoleBindingInterfaceMock.DeleteNamespacedFunc: method is nil but GlobalRoleBindingInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockGlobalRoleBindingInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockGlobalRoleBindingInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedGlobalRoleBindingInterface.DeleteNamespacedCalls()) +func (mock *GlobalRoleBindingInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockGlobalRoleBindingInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockGlobalRoleBindingInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *GlobalRoleBindingInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.GlobalRoleBinding, error) { + if mock.GetFunc == nil { + panic("GlobalRoleBindingInterfaceMock.GetFunc: method is nil but GlobalRoleBindingInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockGlobalRoleBindingInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockGlobalRoleBindingInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedGlobalRoleBindingInterface.GetCalls()) +func (mock *GlobalRoleBindingInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockGlobalRoleBindingInterfaceMockGet.RLock() + calls = mock.calls.Get + lockGlobalRoleBindingInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *GlobalRoleBindingInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.GlobalRoleBinding, error) { + if mock.GetNamespacedFunc == nil { + panic("GlobalRoleBindingInterfaceMock.GetNamespacedFunc: method is nil but GlobalRoleBindingInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockGlobalRoleBindingInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockGlobalRoleBindingInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedGlobalRoleBindingInterface.GetNamespacedCalls()) +func (mock *GlobalRoleBindingInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockGlobalRoleBindingInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockGlobalRoleBindingInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *GlobalRoleBindingInterfaceMock) List(opts v1.ListOptions) (*v3.GlobalRoleBindingList, error) { + if mock.ListFunc == nil { + panic("GlobalRoleBindingInterfaceMock.ListFunc: method is nil but GlobalRoleBindingInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockGlobalRoleBindingInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockGlobalRoleBindingInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedGlobalRoleBindingInterface.ListCalls()) +func (mock *GlobalRoleBindingInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockGlobalRoleBindingInterfaceMockList.RLock() + calls = mock.calls.List + lockGlobalRoleBindingInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *GlobalRoleBindingInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("GlobalRoleBindingInterfaceMock.ObjectClientFunc: method is nil but GlobalRoleBindingInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockGlobalRoleBindingInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockGlobalRoleBindingInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedGlobalRoleBindingInterface.ObjectClientCalls()) +func (mock *GlobalRoleBindingInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockGlobalRoleBindingInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockGlobalRoleBindingInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *GlobalRoleBindingInterfaceMock) Update(in1 *v3.GlobalRoleBinding) (*v3.GlobalRoleBinding, error) { + if mock.UpdateFunc == nil { + panic("GlobalRoleBindingInterfaceMock.UpdateFunc: method is nil but GlobalRoleBindingInterface.Update was just called") + } + callInfo := struct { + In1 *v3.GlobalRoleBinding + }{ + In1: in1, + } + lockGlobalRoleBindingInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockGlobalRoleBindingInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedGlobalRoleBindingInterface.UpdateCalls()) +func (mock *GlobalRoleBindingInterfaceMock) UpdateCalls() []struct { + In1 *v3.GlobalRoleBinding +} { + var calls []struct { + In1 *v3.GlobalRoleBinding + } + lockGlobalRoleBindingInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockGlobalRoleBindingInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *GlobalRoleBindingInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("GlobalRoleBindingInterfaceMock.WatchFunc: method is nil but GlobalRoleBindingInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockGlobalRoleBindingInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockGlobalRoleBindingInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedGlobalRoleBindingInterface.WatchCalls()) +func (mock *GlobalRoleBindingInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockGlobalRoleBindingInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockGlobalRoleBindingInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockGlobalRoleBindingsGetterMockGlobalRoleBindings sync.RWMutex +) + +// Ensure, that GlobalRoleBindingsGetterMock does implement GlobalRoleBindingsGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.GlobalRoleBindingsGetter = &GlobalRoleBindingsGetterMock{} + +// GlobalRoleBindingsGetterMock is a mock implementation of GlobalRoleBindingsGetter. +// +// func TestSomethingThatUsesGlobalRoleBindingsGetter(t *testing.T) { +// +// // make and configure a mocked GlobalRoleBindingsGetter +// mockedGlobalRoleBindingsGetter := &GlobalRoleBindingsGetterMock{ +// GlobalRoleBindingsFunc: func(namespace string) v3.GlobalRoleBindingInterface { +// panic("mock out the GlobalRoleBindings method") +// }, +// } +// +// // use mockedGlobalRoleBindingsGetter in code that requires GlobalRoleBindingsGetter +// // and then make assertions. +// +// } +type GlobalRoleBindingsGetterMock struct { + // GlobalRoleBindingsFunc mocks the GlobalRoleBindings method. + GlobalRoleBindingsFunc func(namespace string) v3.GlobalRoleBindingInterface + + // calls tracks calls to the methods. + calls struct { + // GlobalRoleBindings holds details about calls to the GlobalRoleBindings method. + GlobalRoleBindings []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// GlobalRoleBindings calls GlobalRoleBindingsFunc. +func (mock *GlobalRoleBindingsGetterMock) GlobalRoleBindings(namespace string) v3.GlobalRoleBindingInterface { + if mock.GlobalRoleBindingsFunc == nil { + panic("GlobalRoleBindingsGetterMock.GlobalRoleBindingsFunc: method is nil but GlobalRoleBindingsGetter.GlobalRoleBindings was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockGlobalRoleBindingsGetterMockGlobalRoleBindings.Lock() + mock.calls.GlobalRoleBindings = append(mock.calls.GlobalRoleBindings, callInfo) + lockGlobalRoleBindingsGetterMockGlobalRoleBindings.Unlock() + return mock.GlobalRoleBindingsFunc(namespace) +} + +// GlobalRoleBindingsCalls gets all the calls that were made to GlobalRoleBindings. +// Check the length with: +// len(mockedGlobalRoleBindingsGetter.GlobalRoleBindingsCalls()) +func (mock *GlobalRoleBindingsGetterMock) GlobalRoleBindingsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockGlobalRoleBindingsGetterMockGlobalRoleBindings.RLock() + calls = mock.calls.GlobalRoleBindings + lockGlobalRoleBindingsGetterMockGlobalRoleBindings.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_global_role_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_global_role_mock_test.go new file mode 100644 index 00000000..559cb088 --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_global_role_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockGlobalRoleListerMockGet sync.RWMutex + lockGlobalRoleListerMockList sync.RWMutex +) + +// Ensure, that GlobalRoleListerMock does implement GlobalRoleLister. +// If this is not the case, regenerate this file with moq. +var _ v3.GlobalRoleLister = &GlobalRoleListerMock{} + +// GlobalRoleListerMock is a mock implementation of GlobalRoleLister. +// +// func TestSomethingThatUsesGlobalRoleLister(t *testing.T) { +// +// // make and configure a mocked GlobalRoleLister +// mockedGlobalRoleLister := &GlobalRoleListerMock{ +// GetFunc: func(namespace string, name string) (*v3.GlobalRole, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.GlobalRole, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedGlobalRoleLister in code that requires GlobalRoleLister +// // and then make assertions. +// +// } +type GlobalRoleListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.GlobalRole, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.GlobalRole, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *GlobalRoleListerMock) Get(namespace string, name string) (*v3.GlobalRole, error) { + if mock.GetFunc == nil { + panic("GlobalRoleListerMock.GetFunc: method is nil but GlobalRoleLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockGlobalRoleListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockGlobalRoleListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedGlobalRoleLister.GetCalls()) +func (mock *GlobalRoleListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockGlobalRoleListerMockGet.RLock() + calls = mock.calls.Get + lockGlobalRoleListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *GlobalRoleListerMock) List(namespace string, selector labels.Selector) ([]*v3.GlobalRole, error) { + if mock.ListFunc == nil { + panic("GlobalRoleListerMock.ListFunc: method is nil but GlobalRoleLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockGlobalRoleListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockGlobalRoleListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedGlobalRoleLister.ListCalls()) +func (mock *GlobalRoleListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockGlobalRoleListerMockList.RLock() + calls = mock.calls.List + lockGlobalRoleListerMockList.RUnlock() + return calls +} + +var ( + lockGlobalRoleControllerMockAddClusterScopedHandler sync.RWMutex + lockGlobalRoleControllerMockAddHandler sync.RWMutex + lockGlobalRoleControllerMockEnqueue sync.RWMutex + lockGlobalRoleControllerMockGeneric sync.RWMutex + lockGlobalRoleControllerMockInformer sync.RWMutex + lockGlobalRoleControllerMockLister sync.RWMutex + lockGlobalRoleControllerMockStart sync.RWMutex + lockGlobalRoleControllerMockSync sync.RWMutex +) + +// Ensure, that GlobalRoleControllerMock does implement GlobalRoleController. +// If this is not the case, regenerate this file with moq. +var _ v3.GlobalRoleController = &GlobalRoleControllerMock{} + +// GlobalRoleControllerMock is a mock implementation of GlobalRoleController. +// +// func TestSomethingThatUsesGlobalRoleController(t *testing.T) { +// +// // make and configure a mocked GlobalRoleController +// mockedGlobalRoleController := &GlobalRoleControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.GlobalRoleHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.GlobalRoleHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.GlobalRoleLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedGlobalRoleController in code that requires GlobalRoleController +// // and then make assertions. +// +// } +type GlobalRoleControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.GlobalRoleHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.GlobalRoleHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.GlobalRoleLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.GlobalRoleHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.GlobalRoleHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *GlobalRoleControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.GlobalRoleHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("GlobalRoleControllerMock.AddClusterScopedHandlerFunc: method is nil but GlobalRoleController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.GlobalRoleHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockGlobalRoleControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockGlobalRoleControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedGlobalRoleController.AddClusterScopedHandlerCalls()) +func (mock *GlobalRoleControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.GlobalRoleHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.GlobalRoleHandlerFunc + } + lockGlobalRoleControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockGlobalRoleControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *GlobalRoleControllerMock) AddHandler(ctx context.Context, name string, handler v3.GlobalRoleHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("GlobalRoleControllerMock.AddHandlerFunc: method is nil but GlobalRoleController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.GlobalRoleHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockGlobalRoleControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockGlobalRoleControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedGlobalRoleController.AddHandlerCalls()) +func (mock *GlobalRoleControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.GlobalRoleHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.GlobalRoleHandlerFunc + } + lockGlobalRoleControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockGlobalRoleControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *GlobalRoleControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("GlobalRoleControllerMock.EnqueueFunc: method is nil but GlobalRoleController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockGlobalRoleControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockGlobalRoleControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedGlobalRoleController.EnqueueCalls()) +func (mock *GlobalRoleControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockGlobalRoleControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockGlobalRoleControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *GlobalRoleControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("GlobalRoleControllerMock.GenericFunc: method is nil but GlobalRoleController.Generic was just called") + } + callInfo := struct { + }{} + lockGlobalRoleControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockGlobalRoleControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedGlobalRoleController.GenericCalls()) +func (mock *GlobalRoleControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockGlobalRoleControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockGlobalRoleControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *GlobalRoleControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("GlobalRoleControllerMock.InformerFunc: method is nil but GlobalRoleController.Informer was just called") + } + callInfo := struct { + }{} + lockGlobalRoleControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockGlobalRoleControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedGlobalRoleController.InformerCalls()) +func (mock *GlobalRoleControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockGlobalRoleControllerMockInformer.RLock() + calls = mock.calls.Informer + lockGlobalRoleControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *GlobalRoleControllerMock) Lister() v3.GlobalRoleLister { + if mock.ListerFunc == nil { + panic("GlobalRoleControllerMock.ListerFunc: method is nil but GlobalRoleController.Lister was just called") + } + callInfo := struct { + }{} + lockGlobalRoleControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockGlobalRoleControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedGlobalRoleController.ListerCalls()) +func (mock *GlobalRoleControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockGlobalRoleControllerMockLister.RLock() + calls = mock.calls.Lister + lockGlobalRoleControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *GlobalRoleControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("GlobalRoleControllerMock.StartFunc: method is nil but GlobalRoleController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockGlobalRoleControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockGlobalRoleControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedGlobalRoleController.StartCalls()) +func (mock *GlobalRoleControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockGlobalRoleControllerMockStart.RLock() + calls = mock.calls.Start + lockGlobalRoleControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *GlobalRoleControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("GlobalRoleControllerMock.SyncFunc: method is nil but GlobalRoleController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockGlobalRoleControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockGlobalRoleControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedGlobalRoleController.SyncCalls()) +func (mock *GlobalRoleControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockGlobalRoleControllerMockSync.RLock() + calls = mock.calls.Sync + lockGlobalRoleControllerMockSync.RUnlock() + return calls +} + +var ( + lockGlobalRoleInterfaceMockAddClusterScopedHandler sync.RWMutex + lockGlobalRoleInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockGlobalRoleInterfaceMockAddHandler sync.RWMutex + lockGlobalRoleInterfaceMockAddLifecycle sync.RWMutex + lockGlobalRoleInterfaceMockController sync.RWMutex + lockGlobalRoleInterfaceMockCreate sync.RWMutex + lockGlobalRoleInterfaceMockDelete sync.RWMutex + lockGlobalRoleInterfaceMockDeleteCollection sync.RWMutex + lockGlobalRoleInterfaceMockDeleteNamespaced sync.RWMutex + lockGlobalRoleInterfaceMockGet sync.RWMutex + lockGlobalRoleInterfaceMockGetNamespaced sync.RWMutex + lockGlobalRoleInterfaceMockList sync.RWMutex + lockGlobalRoleInterfaceMockObjectClient sync.RWMutex + lockGlobalRoleInterfaceMockUpdate sync.RWMutex + lockGlobalRoleInterfaceMockWatch sync.RWMutex +) + +// Ensure, that GlobalRoleInterfaceMock does implement GlobalRoleInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.GlobalRoleInterface = &GlobalRoleInterfaceMock{} + +// GlobalRoleInterfaceMock is a mock implementation of GlobalRoleInterface. +// +// func TestSomethingThatUsesGlobalRoleInterface(t *testing.T) { +// +// // make and configure a mocked GlobalRoleInterface +// mockedGlobalRoleInterface := &GlobalRoleInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.GlobalRoleHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.GlobalRoleLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.GlobalRoleHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.GlobalRoleLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.GlobalRoleController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.GlobalRole) (*v3.GlobalRole, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.GlobalRole, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.GlobalRole, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.GlobalRoleList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.GlobalRole) (*v3.GlobalRole, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedGlobalRoleInterface in code that requires GlobalRoleInterface +// // and then make assertions. +// +// } +type GlobalRoleInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.GlobalRoleHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.GlobalRoleLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.GlobalRoleHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.GlobalRoleLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.GlobalRoleController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.GlobalRole) (*v3.GlobalRole, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.GlobalRole, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.GlobalRole, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.GlobalRoleList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.GlobalRole) (*v3.GlobalRole, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.GlobalRoleHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.GlobalRoleLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.GlobalRoleHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.GlobalRoleLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.GlobalRole + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.GlobalRole + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *GlobalRoleInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.GlobalRoleHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("GlobalRoleInterfaceMock.AddClusterScopedHandlerFunc: method is nil but GlobalRoleInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.GlobalRoleHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockGlobalRoleInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockGlobalRoleInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedGlobalRoleInterface.AddClusterScopedHandlerCalls()) +func (mock *GlobalRoleInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.GlobalRoleHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.GlobalRoleHandlerFunc + } + lockGlobalRoleInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockGlobalRoleInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *GlobalRoleInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.GlobalRoleLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("GlobalRoleInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but GlobalRoleInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.GlobalRoleLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockGlobalRoleInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockGlobalRoleInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedGlobalRoleInterface.AddClusterScopedLifecycleCalls()) +func (mock *GlobalRoleInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.GlobalRoleLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.GlobalRoleLifecycle + } + lockGlobalRoleInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockGlobalRoleInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *GlobalRoleInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.GlobalRoleHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("GlobalRoleInterfaceMock.AddHandlerFunc: method is nil but GlobalRoleInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.GlobalRoleHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockGlobalRoleInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockGlobalRoleInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedGlobalRoleInterface.AddHandlerCalls()) +func (mock *GlobalRoleInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.GlobalRoleHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.GlobalRoleHandlerFunc + } + lockGlobalRoleInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockGlobalRoleInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *GlobalRoleInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.GlobalRoleLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("GlobalRoleInterfaceMock.AddLifecycleFunc: method is nil but GlobalRoleInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.GlobalRoleLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockGlobalRoleInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockGlobalRoleInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedGlobalRoleInterface.AddLifecycleCalls()) +func (mock *GlobalRoleInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.GlobalRoleLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.GlobalRoleLifecycle + } + lockGlobalRoleInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockGlobalRoleInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *GlobalRoleInterfaceMock) Controller() v3.GlobalRoleController { + if mock.ControllerFunc == nil { + panic("GlobalRoleInterfaceMock.ControllerFunc: method is nil but GlobalRoleInterface.Controller was just called") + } + callInfo := struct { + }{} + lockGlobalRoleInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockGlobalRoleInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedGlobalRoleInterface.ControllerCalls()) +func (mock *GlobalRoleInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockGlobalRoleInterfaceMockController.RLock() + calls = mock.calls.Controller + lockGlobalRoleInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *GlobalRoleInterfaceMock) Create(in1 *v3.GlobalRole) (*v3.GlobalRole, error) { + if mock.CreateFunc == nil { + panic("GlobalRoleInterfaceMock.CreateFunc: method is nil but GlobalRoleInterface.Create was just called") + } + callInfo := struct { + In1 *v3.GlobalRole + }{ + In1: in1, + } + lockGlobalRoleInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockGlobalRoleInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedGlobalRoleInterface.CreateCalls()) +func (mock *GlobalRoleInterfaceMock) CreateCalls() []struct { + In1 *v3.GlobalRole +} { + var calls []struct { + In1 *v3.GlobalRole + } + lockGlobalRoleInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockGlobalRoleInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *GlobalRoleInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("GlobalRoleInterfaceMock.DeleteFunc: method is nil but GlobalRoleInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockGlobalRoleInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockGlobalRoleInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedGlobalRoleInterface.DeleteCalls()) +func (mock *GlobalRoleInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockGlobalRoleInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockGlobalRoleInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *GlobalRoleInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("GlobalRoleInterfaceMock.DeleteCollectionFunc: method is nil but GlobalRoleInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockGlobalRoleInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockGlobalRoleInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedGlobalRoleInterface.DeleteCollectionCalls()) +func (mock *GlobalRoleInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockGlobalRoleInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockGlobalRoleInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *GlobalRoleInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("GlobalRoleInterfaceMock.DeleteNamespacedFunc: method is nil but GlobalRoleInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockGlobalRoleInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockGlobalRoleInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedGlobalRoleInterface.DeleteNamespacedCalls()) +func (mock *GlobalRoleInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockGlobalRoleInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockGlobalRoleInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *GlobalRoleInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.GlobalRole, error) { + if mock.GetFunc == nil { + panic("GlobalRoleInterfaceMock.GetFunc: method is nil but GlobalRoleInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockGlobalRoleInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockGlobalRoleInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedGlobalRoleInterface.GetCalls()) +func (mock *GlobalRoleInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockGlobalRoleInterfaceMockGet.RLock() + calls = mock.calls.Get + lockGlobalRoleInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *GlobalRoleInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.GlobalRole, error) { + if mock.GetNamespacedFunc == nil { + panic("GlobalRoleInterfaceMock.GetNamespacedFunc: method is nil but GlobalRoleInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockGlobalRoleInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockGlobalRoleInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedGlobalRoleInterface.GetNamespacedCalls()) +func (mock *GlobalRoleInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockGlobalRoleInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockGlobalRoleInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *GlobalRoleInterfaceMock) List(opts v1.ListOptions) (*v3.GlobalRoleList, error) { + if mock.ListFunc == nil { + panic("GlobalRoleInterfaceMock.ListFunc: method is nil but GlobalRoleInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockGlobalRoleInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockGlobalRoleInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedGlobalRoleInterface.ListCalls()) +func (mock *GlobalRoleInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockGlobalRoleInterfaceMockList.RLock() + calls = mock.calls.List + lockGlobalRoleInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *GlobalRoleInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("GlobalRoleInterfaceMock.ObjectClientFunc: method is nil but GlobalRoleInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockGlobalRoleInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockGlobalRoleInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedGlobalRoleInterface.ObjectClientCalls()) +func (mock *GlobalRoleInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockGlobalRoleInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockGlobalRoleInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *GlobalRoleInterfaceMock) Update(in1 *v3.GlobalRole) (*v3.GlobalRole, error) { + if mock.UpdateFunc == nil { + panic("GlobalRoleInterfaceMock.UpdateFunc: method is nil but GlobalRoleInterface.Update was just called") + } + callInfo := struct { + In1 *v3.GlobalRole + }{ + In1: in1, + } + lockGlobalRoleInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockGlobalRoleInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedGlobalRoleInterface.UpdateCalls()) +func (mock *GlobalRoleInterfaceMock) UpdateCalls() []struct { + In1 *v3.GlobalRole +} { + var calls []struct { + In1 *v3.GlobalRole + } + lockGlobalRoleInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockGlobalRoleInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *GlobalRoleInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("GlobalRoleInterfaceMock.WatchFunc: method is nil but GlobalRoleInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockGlobalRoleInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockGlobalRoleInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedGlobalRoleInterface.WatchCalls()) +func (mock *GlobalRoleInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockGlobalRoleInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockGlobalRoleInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockGlobalRolesGetterMockGlobalRoles sync.RWMutex +) + +// Ensure, that GlobalRolesGetterMock does implement GlobalRolesGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.GlobalRolesGetter = &GlobalRolesGetterMock{} + +// GlobalRolesGetterMock is a mock implementation of GlobalRolesGetter. +// +// func TestSomethingThatUsesGlobalRolesGetter(t *testing.T) { +// +// // make and configure a mocked GlobalRolesGetter +// mockedGlobalRolesGetter := &GlobalRolesGetterMock{ +// GlobalRolesFunc: func(namespace string) v3.GlobalRoleInterface { +// panic("mock out the GlobalRoles method") +// }, +// } +// +// // use mockedGlobalRolesGetter in code that requires GlobalRolesGetter +// // and then make assertions. +// +// } +type GlobalRolesGetterMock struct { + // GlobalRolesFunc mocks the GlobalRoles method. + GlobalRolesFunc func(namespace string) v3.GlobalRoleInterface + + // calls tracks calls to the methods. + calls struct { + // GlobalRoles holds details about calls to the GlobalRoles method. + GlobalRoles []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// GlobalRoles calls GlobalRolesFunc. +func (mock *GlobalRolesGetterMock) GlobalRoles(namespace string) v3.GlobalRoleInterface { + if mock.GlobalRolesFunc == nil { + panic("GlobalRolesGetterMock.GlobalRolesFunc: method is nil but GlobalRolesGetter.GlobalRoles was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockGlobalRolesGetterMockGlobalRoles.Lock() + mock.calls.GlobalRoles = append(mock.calls.GlobalRoles, callInfo) + lockGlobalRolesGetterMockGlobalRoles.Unlock() + return mock.GlobalRolesFunc(namespace) +} + +// GlobalRolesCalls gets all the calls that were made to GlobalRoles. +// Check the length with: +// len(mockedGlobalRolesGetter.GlobalRolesCalls()) +func (mock *GlobalRolesGetterMock) GlobalRolesCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockGlobalRolesGetterMockGlobalRoles.RLock() + calls = mock.calls.GlobalRoles + lockGlobalRolesGetterMockGlobalRoles.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_group_member_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_group_member_mock_test.go new file mode 100644 index 00000000..d3f558b1 --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_group_member_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockGroupMemberListerMockGet sync.RWMutex + lockGroupMemberListerMockList sync.RWMutex +) + +// Ensure, that GroupMemberListerMock does implement GroupMemberLister. +// If this is not the case, regenerate this file with moq. +var _ v3.GroupMemberLister = &GroupMemberListerMock{} + +// GroupMemberListerMock is a mock implementation of GroupMemberLister. +// +// func TestSomethingThatUsesGroupMemberLister(t *testing.T) { +// +// // make and configure a mocked GroupMemberLister +// mockedGroupMemberLister := &GroupMemberListerMock{ +// GetFunc: func(namespace string, name string) (*v3.GroupMember, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.GroupMember, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedGroupMemberLister in code that requires GroupMemberLister +// // and then make assertions. +// +// } +type GroupMemberListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.GroupMember, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.GroupMember, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *GroupMemberListerMock) Get(namespace string, name string) (*v3.GroupMember, error) { + if mock.GetFunc == nil { + panic("GroupMemberListerMock.GetFunc: method is nil but GroupMemberLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockGroupMemberListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockGroupMemberListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedGroupMemberLister.GetCalls()) +func (mock *GroupMemberListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockGroupMemberListerMockGet.RLock() + calls = mock.calls.Get + lockGroupMemberListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *GroupMemberListerMock) List(namespace string, selector labels.Selector) ([]*v3.GroupMember, error) { + if mock.ListFunc == nil { + panic("GroupMemberListerMock.ListFunc: method is nil but GroupMemberLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockGroupMemberListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockGroupMemberListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedGroupMemberLister.ListCalls()) +func (mock *GroupMemberListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockGroupMemberListerMockList.RLock() + calls = mock.calls.List + lockGroupMemberListerMockList.RUnlock() + return calls +} + +var ( + lockGroupMemberControllerMockAddClusterScopedHandler sync.RWMutex + lockGroupMemberControllerMockAddHandler sync.RWMutex + lockGroupMemberControllerMockEnqueue sync.RWMutex + lockGroupMemberControllerMockGeneric sync.RWMutex + lockGroupMemberControllerMockInformer sync.RWMutex + lockGroupMemberControllerMockLister sync.RWMutex + lockGroupMemberControllerMockStart sync.RWMutex + lockGroupMemberControllerMockSync sync.RWMutex +) + +// Ensure, that GroupMemberControllerMock does implement GroupMemberController. +// If this is not the case, regenerate this file with moq. +var _ v3.GroupMemberController = &GroupMemberControllerMock{} + +// GroupMemberControllerMock is a mock implementation of GroupMemberController. +// +// func TestSomethingThatUsesGroupMemberController(t *testing.T) { +// +// // make and configure a mocked GroupMemberController +// mockedGroupMemberController := &GroupMemberControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.GroupMemberHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.GroupMemberHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.GroupMemberLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedGroupMemberController in code that requires GroupMemberController +// // and then make assertions. +// +// } +type GroupMemberControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.GroupMemberHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.GroupMemberHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.GroupMemberLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.GroupMemberHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.GroupMemberHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *GroupMemberControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.GroupMemberHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("GroupMemberControllerMock.AddClusterScopedHandlerFunc: method is nil but GroupMemberController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.GroupMemberHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockGroupMemberControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockGroupMemberControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedGroupMemberController.AddClusterScopedHandlerCalls()) +func (mock *GroupMemberControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.GroupMemberHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.GroupMemberHandlerFunc + } + lockGroupMemberControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockGroupMemberControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *GroupMemberControllerMock) AddHandler(ctx context.Context, name string, handler v3.GroupMemberHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("GroupMemberControllerMock.AddHandlerFunc: method is nil but GroupMemberController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.GroupMemberHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockGroupMemberControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockGroupMemberControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedGroupMemberController.AddHandlerCalls()) +func (mock *GroupMemberControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.GroupMemberHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.GroupMemberHandlerFunc + } + lockGroupMemberControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockGroupMemberControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *GroupMemberControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("GroupMemberControllerMock.EnqueueFunc: method is nil but GroupMemberController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockGroupMemberControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockGroupMemberControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedGroupMemberController.EnqueueCalls()) +func (mock *GroupMemberControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockGroupMemberControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockGroupMemberControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *GroupMemberControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("GroupMemberControllerMock.GenericFunc: method is nil but GroupMemberController.Generic was just called") + } + callInfo := struct { + }{} + lockGroupMemberControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockGroupMemberControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedGroupMemberController.GenericCalls()) +func (mock *GroupMemberControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockGroupMemberControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockGroupMemberControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *GroupMemberControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("GroupMemberControllerMock.InformerFunc: method is nil but GroupMemberController.Informer was just called") + } + callInfo := struct { + }{} + lockGroupMemberControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockGroupMemberControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedGroupMemberController.InformerCalls()) +func (mock *GroupMemberControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockGroupMemberControllerMockInformer.RLock() + calls = mock.calls.Informer + lockGroupMemberControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *GroupMemberControllerMock) Lister() v3.GroupMemberLister { + if mock.ListerFunc == nil { + panic("GroupMemberControllerMock.ListerFunc: method is nil but GroupMemberController.Lister was just called") + } + callInfo := struct { + }{} + lockGroupMemberControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockGroupMemberControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedGroupMemberController.ListerCalls()) +func (mock *GroupMemberControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockGroupMemberControllerMockLister.RLock() + calls = mock.calls.Lister + lockGroupMemberControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *GroupMemberControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("GroupMemberControllerMock.StartFunc: method is nil but GroupMemberController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockGroupMemberControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockGroupMemberControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedGroupMemberController.StartCalls()) +func (mock *GroupMemberControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockGroupMemberControllerMockStart.RLock() + calls = mock.calls.Start + lockGroupMemberControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *GroupMemberControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("GroupMemberControllerMock.SyncFunc: method is nil but GroupMemberController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockGroupMemberControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockGroupMemberControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedGroupMemberController.SyncCalls()) +func (mock *GroupMemberControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockGroupMemberControllerMockSync.RLock() + calls = mock.calls.Sync + lockGroupMemberControllerMockSync.RUnlock() + return calls +} + +var ( + lockGroupMemberInterfaceMockAddClusterScopedHandler sync.RWMutex + lockGroupMemberInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockGroupMemberInterfaceMockAddHandler sync.RWMutex + lockGroupMemberInterfaceMockAddLifecycle sync.RWMutex + lockGroupMemberInterfaceMockController sync.RWMutex + lockGroupMemberInterfaceMockCreate sync.RWMutex + lockGroupMemberInterfaceMockDelete sync.RWMutex + lockGroupMemberInterfaceMockDeleteCollection sync.RWMutex + lockGroupMemberInterfaceMockDeleteNamespaced sync.RWMutex + lockGroupMemberInterfaceMockGet sync.RWMutex + lockGroupMemberInterfaceMockGetNamespaced sync.RWMutex + lockGroupMemberInterfaceMockList sync.RWMutex + lockGroupMemberInterfaceMockObjectClient sync.RWMutex + lockGroupMemberInterfaceMockUpdate sync.RWMutex + lockGroupMemberInterfaceMockWatch sync.RWMutex +) + +// Ensure, that GroupMemberInterfaceMock does implement GroupMemberInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.GroupMemberInterface = &GroupMemberInterfaceMock{} + +// GroupMemberInterfaceMock is a mock implementation of GroupMemberInterface. +// +// func TestSomethingThatUsesGroupMemberInterface(t *testing.T) { +// +// // make and configure a mocked GroupMemberInterface +// mockedGroupMemberInterface := &GroupMemberInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.GroupMemberHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.GroupMemberLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.GroupMemberHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.GroupMemberLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.GroupMemberController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.GroupMember) (*v3.GroupMember, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.GroupMember, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.GroupMember, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.GroupMemberList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.GroupMember) (*v3.GroupMember, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedGroupMemberInterface in code that requires GroupMemberInterface +// // and then make assertions. +// +// } +type GroupMemberInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.GroupMemberHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.GroupMemberLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.GroupMemberHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.GroupMemberLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.GroupMemberController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.GroupMember) (*v3.GroupMember, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.GroupMember, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.GroupMember, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.GroupMemberList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.GroupMember) (*v3.GroupMember, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.GroupMemberHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.GroupMemberLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.GroupMemberHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.GroupMemberLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.GroupMember + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.GroupMember + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *GroupMemberInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.GroupMemberHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("GroupMemberInterfaceMock.AddClusterScopedHandlerFunc: method is nil but GroupMemberInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.GroupMemberHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockGroupMemberInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockGroupMemberInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedGroupMemberInterface.AddClusterScopedHandlerCalls()) +func (mock *GroupMemberInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.GroupMemberHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.GroupMemberHandlerFunc + } + lockGroupMemberInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockGroupMemberInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *GroupMemberInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.GroupMemberLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("GroupMemberInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but GroupMemberInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.GroupMemberLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockGroupMemberInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockGroupMemberInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedGroupMemberInterface.AddClusterScopedLifecycleCalls()) +func (mock *GroupMemberInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.GroupMemberLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.GroupMemberLifecycle + } + lockGroupMemberInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockGroupMemberInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *GroupMemberInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.GroupMemberHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("GroupMemberInterfaceMock.AddHandlerFunc: method is nil but GroupMemberInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.GroupMemberHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockGroupMemberInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockGroupMemberInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedGroupMemberInterface.AddHandlerCalls()) +func (mock *GroupMemberInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.GroupMemberHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.GroupMemberHandlerFunc + } + lockGroupMemberInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockGroupMemberInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *GroupMemberInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.GroupMemberLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("GroupMemberInterfaceMock.AddLifecycleFunc: method is nil but GroupMemberInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.GroupMemberLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockGroupMemberInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockGroupMemberInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedGroupMemberInterface.AddLifecycleCalls()) +func (mock *GroupMemberInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.GroupMemberLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.GroupMemberLifecycle + } + lockGroupMemberInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockGroupMemberInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *GroupMemberInterfaceMock) Controller() v3.GroupMemberController { + if mock.ControllerFunc == nil { + panic("GroupMemberInterfaceMock.ControllerFunc: method is nil but GroupMemberInterface.Controller was just called") + } + callInfo := struct { + }{} + lockGroupMemberInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockGroupMemberInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedGroupMemberInterface.ControllerCalls()) +func (mock *GroupMemberInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockGroupMemberInterfaceMockController.RLock() + calls = mock.calls.Controller + lockGroupMemberInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *GroupMemberInterfaceMock) Create(in1 *v3.GroupMember) (*v3.GroupMember, error) { + if mock.CreateFunc == nil { + panic("GroupMemberInterfaceMock.CreateFunc: method is nil but GroupMemberInterface.Create was just called") + } + callInfo := struct { + In1 *v3.GroupMember + }{ + In1: in1, + } + lockGroupMemberInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockGroupMemberInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedGroupMemberInterface.CreateCalls()) +func (mock *GroupMemberInterfaceMock) CreateCalls() []struct { + In1 *v3.GroupMember +} { + var calls []struct { + In1 *v3.GroupMember + } + lockGroupMemberInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockGroupMemberInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *GroupMemberInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("GroupMemberInterfaceMock.DeleteFunc: method is nil but GroupMemberInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockGroupMemberInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockGroupMemberInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedGroupMemberInterface.DeleteCalls()) +func (mock *GroupMemberInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockGroupMemberInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockGroupMemberInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *GroupMemberInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("GroupMemberInterfaceMock.DeleteCollectionFunc: method is nil but GroupMemberInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockGroupMemberInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockGroupMemberInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedGroupMemberInterface.DeleteCollectionCalls()) +func (mock *GroupMemberInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockGroupMemberInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockGroupMemberInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *GroupMemberInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("GroupMemberInterfaceMock.DeleteNamespacedFunc: method is nil but GroupMemberInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockGroupMemberInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockGroupMemberInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedGroupMemberInterface.DeleteNamespacedCalls()) +func (mock *GroupMemberInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockGroupMemberInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockGroupMemberInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *GroupMemberInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.GroupMember, error) { + if mock.GetFunc == nil { + panic("GroupMemberInterfaceMock.GetFunc: method is nil but GroupMemberInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockGroupMemberInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockGroupMemberInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedGroupMemberInterface.GetCalls()) +func (mock *GroupMemberInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockGroupMemberInterfaceMockGet.RLock() + calls = mock.calls.Get + lockGroupMemberInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *GroupMemberInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.GroupMember, error) { + if mock.GetNamespacedFunc == nil { + panic("GroupMemberInterfaceMock.GetNamespacedFunc: method is nil but GroupMemberInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockGroupMemberInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockGroupMemberInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedGroupMemberInterface.GetNamespacedCalls()) +func (mock *GroupMemberInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockGroupMemberInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockGroupMemberInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *GroupMemberInterfaceMock) List(opts v1.ListOptions) (*v3.GroupMemberList, error) { + if mock.ListFunc == nil { + panic("GroupMemberInterfaceMock.ListFunc: method is nil but GroupMemberInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockGroupMemberInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockGroupMemberInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedGroupMemberInterface.ListCalls()) +func (mock *GroupMemberInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockGroupMemberInterfaceMockList.RLock() + calls = mock.calls.List + lockGroupMemberInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *GroupMemberInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("GroupMemberInterfaceMock.ObjectClientFunc: method is nil but GroupMemberInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockGroupMemberInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockGroupMemberInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedGroupMemberInterface.ObjectClientCalls()) +func (mock *GroupMemberInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockGroupMemberInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockGroupMemberInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *GroupMemberInterfaceMock) Update(in1 *v3.GroupMember) (*v3.GroupMember, error) { + if mock.UpdateFunc == nil { + panic("GroupMemberInterfaceMock.UpdateFunc: method is nil but GroupMemberInterface.Update was just called") + } + callInfo := struct { + In1 *v3.GroupMember + }{ + In1: in1, + } + lockGroupMemberInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockGroupMemberInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedGroupMemberInterface.UpdateCalls()) +func (mock *GroupMemberInterfaceMock) UpdateCalls() []struct { + In1 *v3.GroupMember +} { + var calls []struct { + In1 *v3.GroupMember + } + lockGroupMemberInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockGroupMemberInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *GroupMemberInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("GroupMemberInterfaceMock.WatchFunc: method is nil but GroupMemberInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockGroupMemberInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockGroupMemberInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedGroupMemberInterface.WatchCalls()) +func (mock *GroupMemberInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockGroupMemberInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockGroupMemberInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockGroupMembersGetterMockGroupMembers sync.RWMutex +) + +// Ensure, that GroupMembersGetterMock does implement GroupMembersGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.GroupMembersGetter = &GroupMembersGetterMock{} + +// GroupMembersGetterMock is a mock implementation of GroupMembersGetter. +// +// func TestSomethingThatUsesGroupMembersGetter(t *testing.T) { +// +// // make and configure a mocked GroupMembersGetter +// mockedGroupMembersGetter := &GroupMembersGetterMock{ +// GroupMembersFunc: func(namespace string) v3.GroupMemberInterface { +// panic("mock out the GroupMembers method") +// }, +// } +// +// // use mockedGroupMembersGetter in code that requires GroupMembersGetter +// // and then make assertions. +// +// } +type GroupMembersGetterMock struct { + // GroupMembersFunc mocks the GroupMembers method. + GroupMembersFunc func(namespace string) v3.GroupMemberInterface + + // calls tracks calls to the methods. + calls struct { + // GroupMembers holds details about calls to the GroupMembers method. + GroupMembers []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// GroupMembers calls GroupMembersFunc. +func (mock *GroupMembersGetterMock) GroupMembers(namespace string) v3.GroupMemberInterface { + if mock.GroupMembersFunc == nil { + panic("GroupMembersGetterMock.GroupMembersFunc: method is nil but GroupMembersGetter.GroupMembers was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockGroupMembersGetterMockGroupMembers.Lock() + mock.calls.GroupMembers = append(mock.calls.GroupMembers, callInfo) + lockGroupMembersGetterMockGroupMembers.Unlock() + return mock.GroupMembersFunc(namespace) +} + +// GroupMembersCalls gets all the calls that were made to GroupMembers. +// Check the length with: +// len(mockedGroupMembersGetter.GroupMembersCalls()) +func (mock *GroupMembersGetterMock) GroupMembersCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockGroupMembersGetterMockGroupMembers.RLock() + calls = mock.calls.GroupMembers + lockGroupMembersGetterMockGroupMembers.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_group_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_group_mock_test.go new file mode 100644 index 00000000..3b8d0190 --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_group_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockGroupListerMockGet sync.RWMutex + lockGroupListerMockList sync.RWMutex +) + +// Ensure, that GroupListerMock does implement GroupLister. +// If this is not the case, regenerate this file with moq. +var _ v3.GroupLister = &GroupListerMock{} + +// GroupListerMock is a mock implementation of GroupLister. +// +// func TestSomethingThatUsesGroupLister(t *testing.T) { +// +// // make and configure a mocked GroupLister +// mockedGroupLister := &GroupListerMock{ +// GetFunc: func(namespace string, name string) (*v3.Group, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.Group, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedGroupLister in code that requires GroupLister +// // and then make assertions. +// +// } +type GroupListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.Group, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.Group, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *GroupListerMock) Get(namespace string, name string) (*v3.Group, error) { + if mock.GetFunc == nil { + panic("GroupListerMock.GetFunc: method is nil but GroupLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockGroupListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockGroupListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedGroupLister.GetCalls()) +func (mock *GroupListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockGroupListerMockGet.RLock() + calls = mock.calls.Get + lockGroupListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *GroupListerMock) List(namespace string, selector labels.Selector) ([]*v3.Group, error) { + if mock.ListFunc == nil { + panic("GroupListerMock.ListFunc: method is nil but GroupLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockGroupListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockGroupListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedGroupLister.ListCalls()) +func (mock *GroupListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockGroupListerMockList.RLock() + calls = mock.calls.List + lockGroupListerMockList.RUnlock() + return calls +} + +var ( + lockGroupControllerMockAddClusterScopedHandler sync.RWMutex + lockGroupControllerMockAddHandler sync.RWMutex + lockGroupControllerMockEnqueue sync.RWMutex + lockGroupControllerMockGeneric sync.RWMutex + lockGroupControllerMockInformer sync.RWMutex + lockGroupControllerMockLister sync.RWMutex + lockGroupControllerMockStart sync.RWMutex + lockGroupControllerMockSync sync.RWMutex +) + +// Ensure, that GroupControllerMock does implement GroupController. +// If this is not the case, regenerate this file with moq. +var _ v3.GroupController = &GroupControllerMock{} + +// GroupControllerMock is a mock implementation of GroupController. +// +// func TestSomethingThatUsesGroupController(t *testing.T) { +// +// // make and configure a mocked GroupController +// mockedGroupController := &GroupControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.GroupHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.GroupHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.GroupLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedGroupController in code that requires GroupController +// // and then make assertions. +// +// } +type GroupControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.GroupHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.GroupHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.GroupLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.GroupHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.GroupHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *GroupControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.GroupHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("GroupControllerMock.AddClusterScopedHandlerFunc: method is nil but GroupController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.GroupHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockGroupControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockGroupControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedGroupController.AddClusterScopedHandlerCalls()) +func (mock *GroupControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.GroupHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.GroupHandlerFunc + } + lockGroupControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockGroupControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *GroupControllerMock) AddHandler(ctx context.Context, name string, handler v3.GroupHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("GroupControllerMock.AddHandlerFunc: method is nil but GroupController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.GroupHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockGroupControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockGroupControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedGroupController.AddHandlerCalls()) +func (mock *GroupControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.GroupHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.GroupHandlerFunc + } + lockGroupControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockGroupControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *GroupControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("GroupControllerMock.EnqueueFunc: method is nil but GroupController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockGroupControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockGroupControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedGroupController.EnqueueCalls()) +func (mock *GroupControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockGroupControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockGroupControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *GroupControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("GroupControllerMock.GenericFunc: method is nil but GroupController.Generic was just called") + } + callInfo := struct { + }{} + lockGroupControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockGroupControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedGroupController.GenericCalls()) +func (mock *GroupControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockGroupControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockGroupControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *GroupControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("GroupControllerMock.InformerFunc: method is nil but GroupController.Informer was just called") + } + callInfo := struct { + }{} + lockGroupControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockGroupControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedGroupController.InformerCalls()) +func (mock *GroupControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockGroupControllerMockInformer.RLock() + calls = mock.calls.Informer + lockGroupControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *GroupControllerMock) Lister() v3.GroupLister { + if mock.ListerFunc == nil { + panic("GroupControllerMock.ListerFunc: method is nil but GroupController.Lister was just called") + } + callInfo := struct { + }{} + lockGroupControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockGroupControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedGroupController.ListerCalls()) +func (mock *GroupControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockGroupControllerMockLister.RLock() + calls = mock.calls.Lister + lockGroupControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *GroupControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("GroupControllerMock.StartFunc: method is nil but GroupController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockGroupControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockGroupControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedGroupController.StartCalls()) +func (mock *GroupControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockGroupControllerMockStart.RLock() + calls = mock.calls.Start + lockGroupControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *GroupControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("GroupControllerMock.SyncFunc: method is nil but GroupController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockGroupControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockGroupControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedGroupController.SyncCalls()) +func (mock *GroupControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockGroupControllerMockSync.RLock() + calls = mock.calls.Sync + lockGroupControllerMockSync.RUnlock() + return calls +} + +var ( + lockGroupInterfaceMockAddClusterScopedHandler sync.RWMutex + lockGroupInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockGroupInterfaceMockAddHandler sync.RWMutex + lockGroupInterfaceMockAddLifecycle sync.RWMutex + lockGroupInterfaceMockController sync.RWMutex + lockGroupInterfaceMockCreate sync.RWMutex + lockGroupInterfaceMockDelete sync.RWMutex + lockGroupInterfaceMockDeleteCollection sync.RWMutex + lockGroupInterfaceMockDeleteNamespaced sync.RWMutex + lockGroupInterfaceMockGet sync.RWMutex + lockGroupInterfaceMockGetNamespaced sync.RWMutex + lockGroupInterfaceMockList sync.RWMutex + lockGroupInterfaceMockObjectClient sync.RWMutex + lockGroupInterfaceMockUpdate sync.RWMutex + lockGroupInterfaceMockWatch sync.RWMutex +) + +// Ensure, that GroupInterfaceMock does implement GroupInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.GroupInterface = &GroupInterfaceMock{} + +// GroupInterfaceMock is a mock implementation of GroupInterface. +// +// func TestSomethingThatUsesGroupInterface(t *testing.T) { +// +// // make and configure a mocked GroupInterface +// mockedGroupInterface := &GroupInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.GroupHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.GroupLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.GroupHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.GroupLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.GroupController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.Group) (*v3.Group, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.Group, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.Group, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.GroupList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.Group) (*v3.Group, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedGroupInterface in code that requires GroupInterface +// // and then make assertions. +// +// } +type GroupInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.GroupHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.GroupLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.GroupHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.GroupLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.GroupController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.Group) (*v3.Group, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.Group, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.Group, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.GroupList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.Group) (*v3.Group, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.GroupHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.GroupLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.GroupHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.GroupLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.Group + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.Group + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *GroupInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.GroupHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("GroupInterfaceMock.AddClusterScopedHandlerFunc: method is nil but GroupInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.GroupHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockGroupInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockGroupInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedGroupInterface.AddClusterScopedHandlerCalls()) +func (mock *GroupInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.GroupHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.GroupHandlerFunc + } + lockGroupInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockGroupInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *GroupInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.GroupLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("GroupInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but GroupInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.GroupLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockGroupInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockGroupInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedGroupInterface.AddClusterScopedLifecycleCalls()) +func (mock *GroupInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.GroupLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.GroupLifecycle + } + lockGroupInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockGroupInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *GroupInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.GroupHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("GroupInterfaceMock.AddHandlerFunc: method is nil but GroupInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.GroupHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockGroupInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockGroupInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedGroupInterface.AddHandlerCalls()) +func (mock *GroupInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.GroupHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.GroupHandlerFunc + } + lockGroupInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockGroupInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *GroupInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.GroupLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("GroupInterfaceMock.AddLifecycleFunc: method is nil but GroupInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.GroupLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockGroupInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockGroupInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedGroupInterface.AddLifecycleCalls()) +func (mock *GroupInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.GroupLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.GroupLifecycle + } + lockGroupInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockGroupInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *GroupInterfaceMock) Controller() v3.GroupController { + if mock.ControllerFunc == nil { + panic("GroupInterfaceMock.ControllerFunc: method is nil but GroupInterface.Controller was just called") + } + callInfo := struct { + }{} + lockGroupInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockGroupInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedGroupInterface.ControllerCalls()) +func (mock *GroupInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockGroupInterfaceMockController.RLock() + calls = mock.calls.Controller + lockGroupInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *GroupInterfaceMock) Create(in1 *v3.Group) (*v3.Group, error) { + if mock.CreateFunc == nil { + panic("GroupInterfaceMock.CreateFunc: method is nil but GroupInterface.Create was just called") + } + callInfo := struct { + In1 *v3.Group + }{ + In1: in1, + } + lockGroupInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockGroupInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedGroupInterface.CreateCalls()) +func (mock *GroupInterfaceMock) CreateCalls() []struct { + In1 *v3.Group +} { + var calls []struct { + In1 *v3.Group + } + lockGroupInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockGroupInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *GroupInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("GroupInterfaceMock.DeleteFunc: method is nil but GroupInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockGroupInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockGroupInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedGroupInterface.DeleteCalls()) +func (mock *GroupInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockGroupInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockGroupInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *GroupInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("GroupInterfaceMock.DeleteCollectionFunc: method is nil but GroupInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockGroupInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockGroupInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedGroupInterface.DeleteCollectionCalls()) +func (mock *GroupInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockGroupInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockGroupInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *GroupInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("GroupInterfaceMock.DeleteNamespacedFunc: method is nil but GroupInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockGroupInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockGroupInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedGroupInterface.DeleteNamespacedCalls()) +func (mock *GroupInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockGroupInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockGroupInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *GroupInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.Group, error) { + if mock.GetFunc == nil { + panic("GroupInterfaceMock.GetFunc: method is nil but GroupInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockGroupInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockGroupInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedGroupInterface.GetCalls()) +func (mock *GroupInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockGroupInterfaceMockGet.RLock() + calls = mock.calls.Get + lockGroupInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *GroupInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.Group, error) { + if mock.GetNamespacedFunc == nil { + panic("GroupInterfaceMock.GetNamespacedFunc: method is nil but GroupInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockGroupInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockGroupInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedGroupInterface.GetNamespacedCalls()) +func (mock *GroupInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockGroupInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockGroupInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *GroupInterfaceMock) List(opts v1.ListOptions) (*v3.GroupList, error) { + if mock.ListFunc == nil { + panic("GroupInterfaceMock.ListFunc: method is nil but GroupInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockGroupInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockGroupInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedGroupInterface.ListCalls()) +func (mock *GroupInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockGroupInterfaceMockList.RLock() + calls = mock.calls.List + lockGroupInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *GroupInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("GroupInterfaceMock.ObjectClientFunc: method is nil but GroupInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockGroupInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockGroupInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedGroupInterface.ObjectClientCalls()) +func (mock *GroupInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockGroupInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockGroupInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *GroupInterfaceMock) Update(in1 *v3.Group) (*v3.Group, error) { + if mock.UpdateFunc == nil { + panic("GroupInterfaceMock.UpdateFunc: method is nil but GroupInterface.Update was just called") + } + callInfo := struct { + In1 *v3.Group + }{ + In1: in1, + } + lockGroupInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockGroupInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedGroupInterface.UpdateCalls()) +func (mock *GroupInterfaceMock) UpdateCalls() []struct { + In1 *v3.Group +} { + var calls []struct { + In1 *v3.Group + } + lockGroupInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockGroupInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *GroupInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("GroupInterfaceMock.WatchFunc: method is nil but GroupInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockGroupInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockGroupInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedGroupInterface.WatchCalls()) +func (mock *GroupInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockGroupInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockGroupInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockGroupsGetterMockGroups sync.RWMutex +) + +// Ensure, that GroupsGetterMock does implement GroupsGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.GroupsGetter = &GroupsGetterMock{} + +// GroupsGetterMock is a mock implementation of GroupsGetter. +// +// func TestSomethingThatUsesGroupsGetter(t *testing.T) { +// +// // make and configure a mocked GroupsGetter +// mockedGroupsGetter := &GroupsGetterMock{ +// GroupsFunc: func(namespace string) v3.GroupInterface { +// panic("mock out the Groups method") +// }, +// } +// +// // use mockedGroupsGetter in code that requires GroupsGetter +// // and then make assertions. +// +// } +type GroupsGetterMock struct { + // GroupsFunc mocks the Groups method. + GroupsFunc func(namespace string) v3.GroupInterface + + // calls tracks calls to the methods. + calls struct { + // Groups holds details about calls to the Groups method. + Groups []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// Groups calls GroupsFunc. +func (mock *GroupsGetterMock) Groups(namespace string) v3.GroupInterface { + if mock.GroupsFunc == nil { + panic("GroupsGetterMock.GroupsFunc: method is nil but GroupsGetter.Groups was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockGroupsGetterMockGroups.Lock() + mock.calls.Groups = append(mock.calls.Groups, callInfo) + lockGroupsGetterMockGroups.Unlock() + return mock.GroupsFunc(namespace) +} + +// GroupsCalls gets all the calls that were made to Groups. +// Check the length with: +// len(mockedGroupsGetter.GroupsCalls()) +func (mock *GroupsGetterMock) GroupsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockGroupsGetterMockGroups.RLock() + calls = mock.calls.Groups + lockGroupsGetterMockGroups.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_kontainer_driver_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_kontainer_driver_mock_test.go new file mode 100644 index 00000000..ee44204f --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_kontainer_driver_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockKontainerDriverListerMockGet sync.RWMutex + lockKontainerDriverListerMockList sync.RWMutex +) + +// Ensure, that KontainerDriverListerMock does implement KontainerDriverLister. +// If this is not the case, regenerate this file with moq. +var _ v3.KontainerDriverLister = &KontainerDriverListerMock{} + +// KontainerDriverListerMock is a mock implementation of KontainerDriverLister. +// +// func TestSomethingThatUsesKontainerDriverLister(t *testing.T) { +// +// // make and configure a mocked KontainerDriverLister +// mockedKontainerDriverLister := &KontainerDriverListerMock{ +// GetFunc: func(namespace string, name string) (*v3.KontainerDriver, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.KontainerDriver, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedKontainerDriverLister in code that requires KontainerDriverLister +// // and then make assertions. +// +// } +type KontainerDriverListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.KontainerDriver, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.KontainerDriver, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *KontainerDriverListerMock) Get(namespace string, name string) (*v3.KontainerDriver, error) { + if mock.GetFunc == nil { + panic("KontainerDriverListerMock.GetFunc: method is nil but KontainerDriverLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockKontainerDriverListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockKontainerDriverListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedKontainerDriverLister.GetCalls()) +func (mock *KontainerDriverListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockKontainerDriverListerMockGet.RLock() + calls = mock.calls.Get + lockKontainerDriverListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *KontainerDriverListerMock) List(namespace string, selector labels.Selector) ([]*v3.KontainerDriver, error) { + if mock.ListFunc == nil { + panic("KontainerDriverListerMock.ListFunc: method is nil but KontainerDriverLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockKontainerDriverListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockKontainerDriverListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedKontainerDriverLister.ListCalls()) +func (mock *KontainerDriverListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockKontainerDriverListerMockList.RLock() + calls = mock.calls.List + lockKontainerDriverListerMockList.RUnlock() + return calls +} + +var ( + lockKontainerDriverControllerMockAddClusterScopedHandler sync.RWMutex + lockKontainerDriverControllerMockAddHandler sync.RWMutex + lockKontainerDriverControllerMockEnqueue sync.RWMutex + lockKontainerDriverControllerMockGeneric sync.RWMutex + lockKontainerDriverControllerMockInformer sync.RWMutex + lockKontainerDriverControllerMockLister sync.RWMutex + lockKontainerDriverControllerMockStart sync.RWMutex + lockKontainerDriverControllerMockSync sync.RWMutex +) + +// Ensure, that KontainerDriverControllerMock does implement KontainerDriverController. +// If this is not the case, regenerate this file with moq. +var _ v3.KontainerDriverController = &KontainerDriverControllerMock{} + +// KontainerDriverControllerMock is a mock implementation of KontainerDriverController. +// +// func TestSomethingThatUsesKontainerDriverController(t *testing.T) { +// +// // make and configure a mocked KontainerDriverController +// mockedKontainerDriverController := &KontainerDriverControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.KontainerDriverHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.KontainerDriverHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.KontainerDriverLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedKontainerDriverController in code that requires KontainerDriverController +// // and then make assertions. +// +// } +type KontainerDriverControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.KontainerDriverHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.KontainerDriverHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.KontainerDriverLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.KontainerDriverHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.KontainerDriverHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *KontainerDriverControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.KontainerDriverHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("KontainerDriverControllerMock.AddClusterScopedHandlerFunc: method is nil but KontainerDriverController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.KontainerDriverHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockKontainerDriverControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockKontainerDriverControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedKontainerDriverController.AddClusterScopedHandlerCalls()) +func (mock *KontainerDriverControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.KontainerDriverHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.KontainerDriverHandlerFunc + } + lockKontainerDriverControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockKontainerDriverControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *KontainerDriverControllerMock) AddHandler(ctx context.Context, name string, handler v3.KontainerDriverHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("KontainerDriverControllerMock.AddHandlerFunc: method is nil but KontainerDriverController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.KontainerDriverHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockKontainerDriverControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockKontainerDriverControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedKontainerDriverController.AddHandlerCalls()) +func (mock *KontainerDriverControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.KontainerDriverHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.KontainerDriverHandlerFunc + } + lockKontainerDriverControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockKontainerDriverControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *KontainerDriverControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("KontainerDriverControllerMock.EnqueueFunc: method is nil but KontainerDriverController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockKontainerDriverControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockKontainerDriverControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedKontainerDriverController.EnqueueCalls()) +func (mock *KontainerDriverControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockKontainerDriverControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockKontainerDriverControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *KontainerDriverControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("KontainerDriverControllerMock.GenericFunc: method is nil but KontainerDriverController.Generic was just called") + } + callInfo := struct { + }{} + lockKontainerDriverControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockKontainerDriverControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedKontainerDriverController.GenericCalls()) +func (mock *KontainerDriverControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockKontainerDriverControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockKontainerDriverControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *KontainerDriverControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("KontainerDriverControllerMock.InformerFunc: method is nil but KontainerDriverController.Informer was just called") + } + callInfo := struct { + }{} + lockKontainerDriverControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockKontainerDriverControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedKontainerDriverController.InformerCalls()) +func (mock *KontainerDriverControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockKontainerDriverControllerMockInformer.RLock() + calls = mock.calls.Informer + lockKontainerDriverControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *KontainerDriverControllerMock) Lister() v3.KontainerDriverLister { + if mock.ListerFunc == nil { + panic("KontainerDriverControllerMock.ListerFunc: method is nil but KontainerDriverController.Lister was just called") + } + callInfo := struct { + }{} + lockKontainerDriverControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockKontainerDriverControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedKontainerDriverController.ListerCalls()) +func (mock *KontainerDriverControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockKontainerDriverControllerMockLister.RLock() + calls = mock.calls.Lister + lockKontainerDriverControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *KontainerDriverControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("KontainerDriverControllerMock.StartFunc: method is nil but KontainerDriverController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockKontainerDriverControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockKontainerDriverControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedKontainerDriverController.StartCalls()) +func (mock *KontainerDriverControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockKontainerDriverControllerMockStart.RLock() + calls = mock.calls.Start + lockKontainerDriverControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *KontainerDriverControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("KontainerDriverControllerMock.SyncFunc: method is nil but KontainerDriverController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockKontainerDriverControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockKontainerDriverControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedKontainerDriverController.SyncCalls()) +func (mock *KontainerDriverControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockKontainerDriverControllerMockSync.RLock() + calls = mock.calls.Sync + lockKontainerDriverControllerMockSync.RUnlock() + return calls +} + +var ( + lockKontainerDriverInterfaceMockAddClusterScopedHandler sync.RWMutex + lockKontainerDriverInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockKontainerDriverInterfaceMockAddHandler sync.RWMutex + lockKontainerDriverInterfaceMockAddLifecycle sync.RWMutex + lockKontainerDriverInterfaceMockController sync.RWMutex + lockKontainerDriverInterfaceMockCreate sync.RWMutex + lockKontainerDriverInterfaceMockDelete sync.RWMutex + lockKontainerDriverInterfaceMockDeleteCollection sync.RWMutex + lockKontainerDriverInterfaceMockDeleteNamespaced sync.RWMutex + lockKontainerDriverInterfaceMockGet sync.RWMutex + lockKontainerDriverInterfaceMockGetNamespaced sync.RWMutex + lockKontainerDriverInterfaceMockList sync.RWMutex + lockKontainerDriverInterfaceMockObjectClient sync.RWMutex + lockKontainerDriverInterfaceMockUpdate sync.RWMutex + lockKontainerDriverInterfaceMockWatch sync.RWMutex +) + +// Ensure, that KontainerDriverInterfaceMock does implement KontainerDriverInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.KontainerDriverInterface = &KontainerDriverInterfaceMock{} + +// KontainerDriverInterfaceMock is a mock implementation of KontainerDriverInterface. +// +// func TestSomethingThatUsesKontainerDriverInterface(t *testing.T) { +// +// // make and configure a mocked KontainerDriverInterface +// mockedKontainerDriverInterface := &KontainerDriverInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.KontainerDriverHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.KontainerDriverLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.KontainerDriverHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.KontainerDriverLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.KontainerDriverController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.KontainerDriver) (*v3.KontainerDriver, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.KontainerDriver, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.KontainerDriver, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.KontainerDriverList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.KontainerDriver) (*v3.KontainerDriver, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedKontainerDriverInterface in code that requires KontainerDriverInterface +// // and then make assertions. +// +// } +type KontainerDriverInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.KontainerDriverHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.KontainerDriverLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.KontainerDriverHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.KontainerDriverLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.KontainerDriverController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.KontainerDriver) (*v3.KontainerDriver, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.KontainerDriver, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.KontainerDriver, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.KontainerDriverList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.KontainerDriver) (*v3.KontainerDriver, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.KontainerDriverHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.KontainerDriverLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.KontainerDriverHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.KontainerDriverLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.KontainerDriver + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.KontainerDriver + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *KontainerDriverInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.KontainerDriverHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("KontainerDriverInterfaceMock.AddClusterScopedHandlerFunc: method is nil but KontainerDriverInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.KontainerDriverHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockKontainerDriverInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockKontainerDriverInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedKontainerDriverInterface.AddClusterScopedHandlerCalls()) +func (mock *KontainerDriverInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.KontainerDriverHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.KontainerDriverHandlerFunc + } + lockKontainerDriverInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockKontainerDriverInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *KontainerDriverInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.KontainerDriverLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("KontainerDriverInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but KontainerDriverInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.KontainerDriverLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockKontainerDriverInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockKontainerDriverInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedKontainerDriverInterface.AddClusterScopedLifecycleCalls()) +func (mock *KontainerDriverInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.KontainerDriverLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.KontainerDriverLifecycle + } + lockKontainerDriverInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockKontainerDriverInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *KontainerDriverInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.KontainerDriverHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("KontainerDriverInterfaceMock.AddHandlerFunc: method is nil but KontainerDriverInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.KontainerDriverHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockKontainerDriverInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockKontainerDriverInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedKontainerDriverInterface.AddHandlerCalls()) +func (mock *KontainerDriverInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.KontainerDriverHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.KontainerDriverHandlerFunc + } + lockKontainerDriverInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockKontainerDriverInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *KontainerDriverInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.KontainerDriverLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("KontainerDriverInterfaceMock.AddLifecycleFunc: method is nil but KontainerDriverInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.KontainerDriverLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockKontainerDriverInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockKontainerDriverInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedKontainerDriverInterface.AddLifecycleCalls()) +func (mock *KontainerDriverInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.KontainerDriverLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.KontainerDriverLifecycle + } + lockKontainerDriverInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockKontainerDriverInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *KontainerDriverInterfaceMock) Controller() v3.KontainerDriverController { + if mock.ControllerFunc == nil { + panic("KontainerDriverInterfaceMock.ControllerFunc: method is nil but KontainerDriverInterface.Controller was just called") + } + callInfo := struct { + }{} + lockKontainerDriverInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockKontainerDriverInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedKontainerDriverInterface.ControllerCalls()) +func (mock *KontainerDriverInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockKontainerDriverInterfaceMockController.RLock() + calls = mock.calls.Controller + lockKontainerDriverInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *KontainerDriverInterfaceMock) Create(in1 *v3.KontainerDriver) (*v3.KontainerDriver, error) { + if mock.CreateFunc == nil { + panic("KontainerDriverInterfaceMock.CreateFunc: method is nil but KontainerDriverInterface.Create was just called") + } + callInfo := struct { + In1 *v3.KontainerDriver + }{ + In1: in1, + } + lockKontainerDriverInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockKontainerDriverInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedKontainerDriverInterface.CreateCalls()) +func (mock *KontainerDriverInterfaceMock) CreateCalls() []struct { + In1 *v3.KontainerDriver +} { + var calls []struct { + In1 *v3.KontainerDriver + } + lockKontainerDriverInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockKontainerDriverInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *KontainerDriverInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("KontainerDriverInterfaceMock.DeleteFunc: method is nil but KontainerDriverInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockKontainerDriverInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockKontainerDriverInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedKontainerDriverInterface.DeleteCalls()) +func (mock *KontainerDriverInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockKontainerDriverInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockKontainerDriverInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *KontainerDriverInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("KontainerDriverInterfaceMock.DeleteCollectionFunc: method is nil but KontainerDriverInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockKontainerDriverInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockKontainerDriverInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedKontainerDriverInterface.DeleteCollectionCalls()) +func (mock *KontainerDriverInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockKontainerDriverInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockKontainerDriverInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *KontainerDriverInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("KontainerDriverInterfaceMock.DeleteNamespacedFunc: method is nil but KontainerDriverInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockKontainerDriverInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockKontainerDriverInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedKontainerDriverInterface.DeleteNamespacedCalls()) +func (mock *KontainerDriverInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockKontainerDriverInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockKontainerDriverInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *KontainerDriverInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.KontainerDriver, error) { + if mock.GetFunc == nil { + panic("KontainerDriverInterfaceMock.GetFunc: method is nil but KontainerDriverInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockKontainerDriverInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockKontainerDriverInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedKontainerDriverInterface.GetCalls()) +func (mock *KontainerDriverInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockKontainerDriverInterfaceMockGet.RLock() + calls = mock.calls.Get + lockKontainerDriverInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *KontainerDriverInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.KontainerDriver, error) { + if mock.GetNamespacedFunc == nil { + panic("KontainerDriverInterfaceMock.GetNamespacedFunc: method is nil but KontainerDriverInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockKontainerDriverInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockKontainerDriverInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedKontainerDriverInterface.GetNamespacedCalls()) +func (mock *KontainerDriverInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockKontainerDriverInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockKontainerDriverInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *KontainerDriverInterfaceMock) List(opts v1.ListOptions) (*v3.KontainerDriverList, error) { + if mock.ListFunc == nil { + panic("KontainerDriverInterfaceMock.ListFunc: method is nil but KontainerDriverInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockKontainerDriverInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockKontainerDriverInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedKontainerDriverInterface.ListCalls()) +func (mock *KontainerDriverInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockKontainerDriverInterfaceMockList.RLock() + calls = mock.calls.List + lockKontainerDriverInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *KontainerDriverInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("KontainerDriverInterfaceMock.ObjectClientFunc: method is nil but KontainerDriverInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockKontainerDriverInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockKontainerDriverInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedKontainerDriverInterface.ObjectClientCalls()) +func (mock *KontainerDriverInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockKontainerDriverInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockKontainerDriverInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *KontainerDriverInterfaceMock) Update(in1 *v3.KontainerDriver) (*v3.KontainerDriver, error) { + if mock.UpdateFunc == nil { + panic("KontainerDriverInterfaceMock.UpdateFunc: method is nil but KontainerDriverInterface.Update was just called") + } + callInfo := struct { + In1 *v3.KontainerDriver + }{ + In1: in1, + } + lockKontainerDriverInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockKontainerDriverInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedKontainerDriverInterface.UpdateCalls()) +func (mock *KontainerDriverInterfaceMock) UpdateCalls() []struct { + In1 *v3.KontainerDriver +} { + var calls []struct { + In1 *v3.KontainerDriver + } + lockKontainerDriverInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockKontainerDriverInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *KontainerDriverInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("KontainerDriverInterfaceMock.WatchFunc: method is nil but KontainerDriverInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockKontainerDriverInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockKontainerDriverInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedKontainerDriverInterface.WatchCalls()) +func (mock *KontainerDriverInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockKontainerDriverInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockKontainerDriverInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockKontainerDriversGetterMockKontainerDrivers sync.RWMutex +) + +// Ensure, that KontainerDriversGetterMock does implement KontainerDriversGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.KontainerDriversGetter = &KontainerDriversGetterMock{} + +// KontainerDriversGetterMock is a mock implementation of KontainerDriversGetter. +// +// func TestSomethingThatUsesKontainerDriversGetter(t *testing.T) { +// +// // make and configure a mocked KontainerDriversGetter +// mockedKontainerDriversGetter := &KontainerDriversGetterMock{ +// KontainerDriversFunc: func(namespace string) v3.KontainerDriverInterface { +// panic("mock out the KontainerDrivers method") +// }, +// } +// +// // use mockedKontainerDriversGetter in code that requires KontainerDriversGetter +// // and then make assertions. +// +// } +type KontainerDriversGetterMock struct { + // KontainerDriversFunc mocks the KontainerDrivers method. + KontainerDriversFunc func(namespace string) v3.KontainerDriverInterface + + // calls tracks calls to the methods. + calls struct { + // KontainerDrivers holds details about calls to the KontainerDrivers method. + KontainerDrivers []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// KontainerDrivers calls KontainerDriversFunc. +func (mock *KontainerDriversGetterMock) KontainerDrivers(namespace string) v3.KontainerDriverInterface { + if mock.KontainerDriversFunc == nil { + panic("KontainerDriversGetterMock.KontainerDriversFunc: method is nil but KontainerDriversGetter.KontainerDrivers was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockKontainerDriversGetterMockKontainerDrivers.Lock() + mock.calls.KontainerDrivers = append(mock.calls.KontainerDrivers, callInfo) + lockKontainerDriversGetterMockKontainerDrivers.Unlock() + return mock.KontainerDriversFunc(namespace) +} + +// KontainerDriversCalls gets all the calls that were made to KontainerDrivers. +// Check the length with: +// len(mockedKontainerDriversGetter.KontainerDriversCalls()) +func (mock *KontainerDriversGetterMock) KontainerDriversCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockKontainerDriversGetterMockKontainerDrivers.RLock() + calls = mock.calls.KontainerDrivers + lockKontainerDriversGetterMockKontainerDrivers.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_ldap_config_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_ldap_config_mock_test.go new file mode 100644 index 00000000..658c9ffa --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_ldap_config_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockLdapConfigListerMockGet sync.RWMutex + lockLdapConfigListerMockList sync.RWMutex +) + +// Ensure, that LdapConfigListerMock does implement LdapConfigLister. +// If this is not the case, regenerate this file with moq. +var _ v3.LdapConfigLister = &LdapConfigListerMock{} + +// LdapConfigListerMock is a mock implementation of LdapConfigLister. +// +// func TestSomethingThatUsesLdapConfigLister(t *testing.T) { +// +// // make and configure a mocked LdapConfigLister +// mockedLdapConfigLister := &LdapConfigListerMock{ +// GetFunc: func(namespace string, name string) (*v3.LdapConfig, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.LdapConfig, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedLdapConfigLister in code that requires LdapConfigLister +// // and then make assertions. +// +// } +type LdapConfigListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.LdapConfig, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.LdapConfig, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *LdapConfigListerMock) Get(namespace string, name string) (*v3.LdapConfig, error) { + if mock.GetFunc == nil { + panic("LdapConfigListerMock.GetFunc: method is nil but LdapConfigLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockLdapConfigListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockLdapConfigListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedLdapConfigLister.GetCalls()) +func (mock *LdapConfigListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockLdapConfigListerMockGet.RLock() + calls = mock.calls.Get + lockLdapConfigListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *LdapConfigListerMock) List(namespace string, selector labels.Selector) ([]*v3.LdapConfig, error) { + if mock.ListFunc == nil { + panic("LdapConfigListerMock.ListFunc: method is nil but LdapConfigLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockLdapConfigListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockLdapConfigListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedLdapConfigLister.ListCalls()) +func (mock *LdapConfigListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockLdapConfigListerMockList.RLock() + calls = mock.calls.List + lockLdapConfigListerMockList.RUnlock() + return calls +} + +var ( + lockLdapConfigControllerMockAddClusterScopedHandler sync.RWMutex + lockLdapConfigControllerMockAddHandler sync.RWMutex + lockLdapConfigControllerMockEnqueue sync.RWMutex + lockLdapConfigControllerMockGeneric sync.RWMutex + lockLdapConfigControllerMockInformer sync.RWMutex + lockLdapConfigControllerMockLister sync.RWMutex + lockLdapConfigControllerMockStart sync.RWMutex + lockLdapConfigControllerMockSync sync.RWMutex +) + +// Ensure, that LdapConfigControllerMock does implement LdapConfigController. +// If this is not the case, regenerate this file with moq. +var _ v3.LdapConfigController = &LdapConfigControllerMock{} + +// LdapConfigControllerMock is a mock implementation of LdapConfigController. +// +// func TestSomethingThatUsesLdapConfigController(t *testing.T) { +// +// // make and configure a mocked LdapConfigController +// mockedLdapConfigController := &LdapConfigControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.LdapConfigHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.LdapConfigHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.LdapConfigLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedLdapConfigController in code that requires LdapConfigController +// // and then make assertions. +// +// } +type LdapConfigControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.LdapConfigHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.LdapConfigHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.LdapConfigLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.LdapConfigHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.LdapConfigHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *LdapConfigControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.LdapConfigHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("LdapConfigControllerMock.AddClusterScopedHandlerFunc: method is nil but LdapConfigController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.LdapConfigHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockLdapConfigControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockLdapConfigControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedLdapConfigController.AddClusterScopedHandlerCalls()) +func (mock *LdapConfigControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.LdapConfigHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.LdapConfigHandlerFunc + } + lockLdapConfigControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockLdapConfigControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *LdapConfigControllerMock) AddHandler(ctx context.Context, name string, handler v3.LdapConfigHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("LdapConfigControllerMock.AddHandlerFunc: method is nil but LdapConfigController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.LdapConfigHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockLdapConfigControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockLdapConfigControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedLdapConfigController.AddHandlerCalls()) +func (mock *LdapConfigControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.LdapConfigHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.LdapConfigHandlerFunc + } + lockLdapConfigControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockLdapConfigControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *LdapConfigControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("LdapConfigControllerMock.EnqueueFunc: method is nil but LdapConfigController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockLdapConfigControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockLdapConfigControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedLdapConfigController.EnqueueCalls()) +func (mock *LdapConfigControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockLdapConfigControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockLdapConfigControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *LdapConfigControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("LdapConfigControllerMock.GenericFunc: method is nil but LdapConfigController.Generic was just called") + } + callInfo := struct { + }{} + lockLdapConfigControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockLdapConfigControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedLdapConfigController.GenericCalls()) +func (mock *LdapConfigControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockLdapConfigControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockLdapConfigControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *LdapConfigControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("LdapConfigControllerMock.InformerFunc: method is nil but LdapConfigController.Informer was just called") + } + callInfo := struct { + }{} + lockLdapConfigControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockLdapConfigControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedLdapConfigController.InformerCalls()) +func (mock *LdapConfigControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockLdapConfigControllerMockInformer.RLock() + calls = mock.calls.Informer + lockLdapConfigControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *LdapConfigControllerMock) Lister() v3.LdapConfigLister { + if mock.ListerFunc == nil { + panic("LdapConfigControllerMock.ListerFunc: method is nil but LdapConfigController.Lister was just called") + } + callInfo := struct { + }{} + lockLdapConfigControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockLdapConfigControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedLdapConfigController.ListerCalls()) +func (mock *LdapConfigControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockLdapConfigControllerMockLister.RLock() + calls = mock.calls.Lister + lockLdapConfigControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *LdapConfigControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("LdapConfigControllerMock.StartFunc: method is nil but LdapConfigController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockLdapConfigControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockLdapConfigControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedLdapConfigController.StartCalls()) +func (mock *LdapConfigControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockLdapConfigControllerMockStart.RLock() + calls = mock.calls.Start + lockLdapConfigControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *LdapConfigControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("LdapConfigControllerMock.SyncFunc: method is nil but LdapConfigController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockLdapConfigControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockLdapConfigControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedLdapConfigController.SyncCalls()) +func (mock *LdapConfigControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockLdapConfigControllerMockSync.RLock() + calls = mock.calls.Sync + lockLdapConfigControllerMockSync.RUnlock() + return calls +} + +var ( + lockLdapConfigInterfaceMockAddClusterScopedHandler sync.RWMutex + lockLdapConfigInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockLdapConfigInterfaceMockAddHandler sync.RWMutex + lockLdapConfigInterfaceMockAddLifecycle sync.RWMutex + lockLdapConfigInterfaceMockController sync.RWMutex + lockLdapConfigInterfaceMockCreate sync.RWMutex + lockLdapConfigInterfaceMockDelete sync.RWMutex + lockLdapConfigInterfaceMockDeleteCollection sync.RWMutex + lockLdapConfigInterfaceMockDeleteNamespaced sync.RWMutex + lockLdapConfigInterfaceMockGet sync.RWMutex + lockLdapConfigInterfaceMockGetNamespaced sync.RWMutex + lockLdapConfigInterfaceMockList sync.RWMutex + lockLdapConfigInterfaceMockObjectClient sync.RWMutex + lockLdapConfigInterfaceMockUpdate sync.RWMutex + lockLdapConfigInterfaceMockWatch sync.RWMutex +) + +// Ensure, that LdapConfigInterfaceMock does implement LdapConfigInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.LdapConfigInterface = &LdapConfigInterfaceMock{} + +// LdapConfigInterfaceMock is a mock implementation of LdapConfigInterface. +// +// func TestSomethingThatUsesLdapConfigInterface(t *testing.T) { +// +// // make and configure a mocked LdapConfigInterface +// mockedLdapConfigInterface := &LdapConfigInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.LdapConfigHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.LdapConfigLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.LdapConfigHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.LdapConfigLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.LdapConfigController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.LdapConfig) (*v3.LdapConfig, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.LdapConfig, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.LdapConfig, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.LdapConfigList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.LdapConfig) (*v3.LdapConfig, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedLdapConfigInterface in code that requires LdapConfigInterface +// // and then make assertions. +// +// } +type LdapConfigInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.LdapConfigHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.LdapConfigLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.LdapConfigHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.LdapConfigLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.LdapConfigController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.LdapConfig) (*v3.LdapConfig, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.LdapConfig, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.LdapConfig, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.LdapConfigList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.LdapConfig) (*v3.LdapConfig, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.LdapConfigHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.LdapConfigLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.LdapConfigHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.LdapConfigLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.LdapConfig + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.LdapConfig + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *LdapConfigInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.LdapConfigHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("LdapConfigInterfaceMock.AddClusterScopedHandlerFunc: method is nil but LdapConfigInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.LdapConfigHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockLdapConfigInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockLdapConfigInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedLdapConfigInterface.AddClusterScopedHandlerCalls()) +func (mock *LdapConfigInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.LdapConfigHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.LdapConfigHandlerFunc + } + lockLdapConfigInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockLdapConfigInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *LdapConfigInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.LdapConfigLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("LdapConfigInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but LdapConfigInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.LdapConfigLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockLdapConfigInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockLdapConfigInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedLdapConfigInterface.AddClusterScopedLifecycleCalls()) +func (mock *LdapConfigInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.LdapConfigLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.LdapConfigLifecycle + } + lockLdapConfigInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockLdapConfigInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *LdapConfigInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.LdapConfigHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("LdapConfigInterfaceMock.AddHandlerFunc: method is nil but LdapConfigInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.LdapConfigHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockLdapConfigInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockLdapConfigInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedLdapConfigInterface.AddHandlerCalls()) +func (mock *LdapConfigInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.LdapConfigHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.LdapConfigHandlerFunc + } + lockLdapConfigInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockLdapConfigInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *LdapConfigInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.LdapConfigLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("LdapConfigInterfaceMock.AddLifecycleFunc: method is nil but LdapConfigInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.LdapConfigLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockLdapConfigInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockLdapConfigInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedLdapConfigInterface.AddLifecycleCalls()) +func (mock *LdapConfigInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.LdapConfigLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.LdapConfigLifecycle + } + lockLdapConfigInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockLdapConfigInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *LdapConfigInterfaceMock) Controller() v3.LdapConfigController { + if mock.ControllerFunc == nil { + panic("LdapConfigInterfaceMock.ControllerFunc: method is nil but LdapConfigInterface.Controller was just called") + } + callInfo := struct { + }{} + lockLdapConfigInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockLdapConfigInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedLdapConfigInterface.ControllerCalls()) +func (mock *LdapConfigInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockLdapConfigInterfaceMockController.RLock() + calls = mock.calls.Controller + lockLdapConfigInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *LdapConfigInterfaceMock) Create(in1 *v3.LdapConfig) (*v3.LdapConfig, error) { + if mock.CreateFunc == nil { + panic("LdapConfigInterfaceMock.CreateFunc: method is nil but LdapConfigInterface.Create was just called") + } + callInfo := struct { + In1 *v3.LdapConfig + }{ + In1: in1, + } + lockLdapConfigInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockLdapConfigInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedLdapConfigInterface.CreateCalls()) +func (mock *LdapConfigInterfaceMock) CreateCalls() []struct { + In1 *v3.LdapConfig +} { + var calls []struct { + In1 *v3.LdapConfig + } + lockLdapConfigInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockLdapConfigInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *LdapConfigInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("LdapConfigInterfaceMock.DeleteFunc: method is nil but LdapConfigInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockLdapConfigInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockLdapConfigInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedLdapConfigInterface.DeleteCalls()) +func (mock *LdapConfigInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockLdapConfigInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockLdapConfigInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *LdapConfigInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("LdapConfigInterfaceMock.DeleteCollectionFunc: method is nil but LdapConfigInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockLdapConfigInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockLdapConfigInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedLdapConfigInterface.DeleteCollectionCalls()) +func (mock *LdapConfigInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockLdapConfigInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockLdapConfigInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *LdapConfigInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("LdapConfigInterfaceMock.DeleteNamespacedFunc: method is nil but LdapConfigInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockLdapConfigInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockLdapConfigInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedLdapConfigInterface.DeleteNamespacedCalls()) +func (mock *LdapConfigInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockLdapConfigInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockLdapConfigInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *LdapConfigInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.LdapConfig, error) { + if mock.GetFunc == nil { + panic("LdapConfigInterfaceMock.GetFunc: method is nil but LdapConfigInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockLdapConfigInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockLdapConfigInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedLdapConfigInterface.GetCalls()) +func (mock *LdapConfigInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockLdapConfigInterfaceMockGet.RLock() + calls = mock.calls.Get + lockLdapConfigInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *LdapConfigInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.LdapConfig, error) { + if mock.GetNamespacedFunc == nil { + panic("LdapConfigInterfaceMock.GetNamespacedFunc: method is nil but LdapConfigInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockLdapConfigInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockLdapConfigInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedLdapConfigInterface.GetNamespacedCalls()) +func (mock *LdapConfigInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockLdapConfigInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockLdapConfigInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *LdapConfigInterfaceMock) List(opts v1.ListOptions) (*v3.LdapConfigList, error) { + if mock.ListFunc == nil { + panic("LdapConfigInterfaceMock.ListFunc: method is nil but LdapConfigInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockLdapConfigInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockLdapConfigInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedLdapConfigInterface.ListCalls()) +func (mock *LdapConfigInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockLdapConfigInterfaceMockList.RLock() + calls = mock.calls.List + lockLdapConfigInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *LdapConfigInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("LdapConfigInterfaceMock.ObjectClientFunc: method is nil but LdapConfigInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockLdapConfigInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockLdapConfigInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedLdapConfigInterface.ObjectClientCalls()) +func (mock *LdapConfigInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockLdapConfigInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockLdapConfigInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *LdapConfigInterfaceMock) Update(in1 *v3.LdapConfig) (*v3.LdapConfig, error) { + if mock.UpdateFunc == nil { + panic("LdapConfigInterfaceMock.UpdateFunc: method is nil but LdapConfigInterface.Update was just called") + } + callInfo := struct { + In1 *v3.LdapConfig + }{ + In1: in1, + } + lockLdapConfigInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockLdapConfigInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedLdapConfigInterface.UpdateCalls()) +func (mock *LdapConfigInterfaceMock) UpdateCalls() []struct { + In1 *v3.LdapConfig +} { + var calls []struct { + In1 *v3.LdapConfig + } + lockLdapConfigInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockLdapConfigInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *LdapConfigInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("LdapConfigInterfaceMock.WatchFunc: method is nil but LdapConfigInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockLdapConfigInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockLdapConfigInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedLdapConfigInterface.WatchCalls()) +func (mock *LdapConfigInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockLdapConfigInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockLdapConfigInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockLdapConfigsGetterMockLdapConfigs sync.RWMutex +) + +// Ensure, that LdapConfigsGetterMock does implement LdapConfigsGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.LdapConfigsGetter = &LdapConfigsGetterMock{} + +// LdapConfigsGetterMock is a mock implementation of LdapConfigsGetter. +// +// func TestSomethingThatUsesLdapConfigsGetter(t *testing.T) { +// +// // make and configure a mocked LdapConfigsGetter +// mockedLdapConfigsGetter := &LdapConfigsGetterMock{ +// LdapConfigsFunc: func(namespace string) v3.LdapConfigInterface { +// panic("mock out the LdapConfigs method") +// }, +// } +// +// // use mockedLdapConfigsGetter in code that requires LdapConfigsGetter +// // and then make assertions. +// +// } +type LdapConfigsGetterMock struct { + // LdapConfigsFunc mocks the LdapConfigs method. + LdapConfigsFunc func(namespace string) v3.LdapConfigInterface + + // calls tracks calls to the methods. + calls struct { + // LdapConfigs holds details about calls to the LdapConfigs method. + LdapConfigs []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// LdapConfigs calls LdapConfigsFunc. +func (mock *LdapConfigsGetterMock) LdapConfigs(namespace string) v3.LdapConfigInterface { + if mock.LdapConfigsFunc == nil { + panic("LdapConfigsGetterMock.LdapConfigsFunc: method is nil but LdapConfigsGetter.LdapConfigs was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockLdapConfigsGetterMockLdapConfigs.Lock() + mock.calls.LdapConfigs = append(mock.calls.LdapConfigs, callInfo) + lockLdapConfigsGetterMockLdapConfigs.Unlock() + return mock.LdapConfigsFunc(namespace) +} + +// LdapConfigsCalls gets all the calls that were made to LdapConfigs. +// Check the length with: +// len(mockedLdapConfigsGetter.LdapConfigsCalls()) +func (mock *LdapConfigsGetterMock) LdapConfigsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockLdapConfigsGetterMockLdapConfigs.RLock() + calls = mock.calls.LdapConfigs + lockLdapConfigsGetterMockLdapConfigs.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_listen_config_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_listen_config_mock_test.go new file mode 100644 index 00000000..07cd2959 --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_listen_config_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockListenConfigListerMockGet sync.RWMutex + lockListenConfigListerMockList sync.RWMutex +) + +// Ensure, that ListenConfigListerMock does implement ListenConfigLister. +// If this is not the case, regenerate this file with moq. +var _ v3.ListenConfigLister = &ListenConfigListerMock{} + +// ListenConfigListerMock is a mock implementation of ListenConfigLister. +// +// func TestSomethingThatUsesListenConfigLister(t *testing.T) { +// +// // make and configure a mocked ListenConfigLister +// mockedListenConfigLister := &ListenConfigListerMock{ +// GetFunc: func(namespace string, name string) (*v3.ListenConfig, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.ListenConfig, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedListenConfigLister in code that requires ListenConfigLister +// // and then make assertions. +// +// } +type ListenConfigListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.ListenConfig, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.ListenConfig, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *ListenConfigListerMock) Get(namespace string, name string) (*v3.ListenConfig, error) { + if mock.GetFunc == nil { + panic("ListenConfigListerMock.GetFunc: method is nil but ListenConfigLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockListenConfigListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockListenConfigListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedListenConfigLister.GetCalls()) +func (mock *ListenConfigListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockListenConfigListerMockGet.RLock() + calls = mock.calls.Get + lockListenConfigListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ListenConfigListerMock) List(namespace string, selector labels.Selector) ([]*v3.ListenConfig, error) { + if mock.ListFunc == nil { + panic("ListenConfigListerMock.ListFunc: method is nil but ListenConfigLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockListenConfigListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockListenConfigListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedListenConfigLister.ListCalls()) +func (mock *ListenConfigListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockListenConfigListerMockList.RLock() + calls = mock.calls.List + lockListenConfigListerMockList.RUnlock() + return calls +} + +var ( + lockListenConfigControllerMockAddClusterScopedHandler sync.RWMutex + lockListenConfigControllerMockAddHandler sync.RWMutex + lockListenConfigControllerMockEnqueue sync.RWMutex + lockListenConfigControllerMockGeneric sync.RWMutex + lockListenConfigControllerMockInformer sync.RWMutex + lockListenConfigControllerMockLister sync.RWMutex + lockListenConfigControllerMockStart sync.RWMutex + lockListenConfigControllerMockSync sync.RWMutex +) + +// Ensure, that ListenConfigControllerMock does implement ListenConfigController. +// If this is not the case, regenerate this file with moq. +var _ v3.ListenConfigController = &ListenConfigControllerMock{} + +// ListenConfigControllerMock is a mock implementation of ListenConfigController. +// +// func TestSomethingThatUsesListenConfigController(t *testing.T) { +// +// // make and configure a mocked ListenConfigController +// mockedListenConfigController := &ListenConfigControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.ListenConfigHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.ListenConfigHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.ListenConfigLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedListenConfigController in code that requires ListenConfigController +// // and then make assertions. +// +// } +type ListenConfigControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.ListenConfigHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.ListenConfigHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.ListenConfigLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.ListenConfigHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.ListenConfigHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ListenConfigControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.ListenConfigHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ListenConfigControllerMock.AddClusterScopedHandlerFunc: method is nil but ListenConfigController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ListenConfigHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockListenConfigControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockListenConfigControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedListenConfigController.AddClusterScopedHandlerCalls()) +func (mock *ListenConfigControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ListenConfigHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ListenConfigHandlerFunc + } + lockListenConfigControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockListenConfigControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ListenConfigControllerMock) AddHandler(ctx context.Context, name string, handler v3.ListenConfigHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ListenConfigControllerMock.AddHandlerFunc: method is nil but ListenConfigController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.ListenConfigHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockListenConfigControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockListenConfigControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedListenConfigController.AddHandlerCalls()) +func (mock *ListenConfigControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.ListenConfigHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.ListenConfigHandlerFunc + } + lockListenConfigControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockListenConfigControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *ListenConfigControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("ListenConfigControllerMock.EnqueueFunc: method is nil but ListenConfigController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockListenConfigControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockListenConfigControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedListenConfigController.EnqueueCalls()) +func (mock *ListenConfigControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockListenConfigControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockListenConfigControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *ListenConfigControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("ListenConfigControllerMock.GenericFunc: method is nil but ListenConfigController.Generic was just called") + } + callInfo := struct { + }{} + lockListenConfigControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockListenConfigControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedListenConfigController.GenericCalls()) +func (mock *ListenConfigControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockListenConfigControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockListenConfigControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *ListenConfigControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("ListenConfigControllerMock.InformerFunc: method is nil but ListenConfigController.Informer was just called") + } + callInfo := struct { + }{} + lockListenConfigControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockListenConfigControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedListenConfigController.InformerCalls()) +func (mock *ListenConfigControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockListenConfigControllerMockInformer.RLock() + calls = mock.calls.Informer + lockListenConfigControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *ListenConfigControllerMock) Lister() v3.ListenConfigLister { + if mock.ListerFunc == nil { + panic("ListenConfigControllerMock.ListerFunc: method is nil but ListenConfigController.Lister was just called") + } + callInfo := struct { + }{} + lockListenConfigControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockListenConfigControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedListenConfigController.ListerCalls()) +func (mock *ListenConfigControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockListenConfigControllerMockLister.RLock() + calls = mock.calls.Lister + lockListenConfigControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *ListenConfigControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("ListenConfigControllerMock.StartFunc: method is nil but ListenConfigController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockListenConfigControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockListenConfigControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedListenConfigController.StartCalls()) +func (mock *ListenConfigControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockListenConfigControllerMockStart.RLock() + calls = mock.calls.Start + lockListenConfigControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *ListenConfigControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("ListenConfigControllerMock.SyncFunc: method is nil but ListenConfigController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockListenConfigControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockListenConfigControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedListenConfigController.SyncCalls()) +func (mock *ListenConfigControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockListenConfigControllerMockSync.RLock() + calls = mock.calls.Sync + lockListenConfigControllerMockSync.RUnlock() + return calls +} + +var ( + lockListenConfigInterfaceMockAddClusterScopedHandler sync.RWMutex + lockListenConfigInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockListenConfigInterfaceMockAddHandler sync.RWMutex + lockListenConfigInterfaceMockAddLifecycle sync.RWMutex + lockListenConfigInterfaceMockController sync.RWMutex + lockListenConfigInterfaceMockCreate sync.RWMutex + lockListenConfigInterfaceMockDelete sync.RWMutex + lockListenConfigInterfaceMockDeleteCollection sync.RWMutex + lockListenConfigInterfaceMockDeleteNamespaced sync.RWMutex + lockListenConfigInterfaceMockGet sync.RWMutex + lockListenConfigInterfaceMockGetNamespaced sync.RWMutex + lockListenConfigInterfaceMockList sync.RWMutex + lockListenConfigInterfaceMockObjectClient sync.RWMutex + lockListenConfigInterfaceMockUpdate sync.RWMutex + lockListenConfigInterfaceMockWatch sync.RWMutex +) + +// Ensure, that ListenConfigInterfaceMock does implement ListenConfigInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.ListenConfigInterface = &ListenConfigInterfaceMock{} + +// ListenConfigInterfaceMock is a mock implementation of ListenConfigInterface. +// +// func TestSomethingThatUsesListenConfigInterface(t *testing.T) { +// +// // make and configure a mocked ListenConfigInterface +// mockedListenConfigInterface := &ListenConfigInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.ListenConfigHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.ListenConfigLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.ListenConfigHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.ListenConfigLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.ListenConfigController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.ListenConfig) (*v3.ListenConfig, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.ListenConfig, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.ListenConfig, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.ListenConfigList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.ListenConfig) (*v3.ListenConfig, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedListenConfigInterface in code that requires ListenConfigInterface +// // and then make assertions. +// +// } +type ListenConfigInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.ListenConfigHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.ListenConfigLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.ListenConfigHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.ListenConfigLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.ListenConfigController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.ListenConfig) (*v3.ListenConfig, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.ListenConfig, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.ListenConfig, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.ListenConfigList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.ListenConfig) (*v3.ListenConfig, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.ListenConfigHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.ListenConfigLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.ListenConfigHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.ListenConfigLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.ListenConfig + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.ListenConfig + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ListenConfigInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.ListenConfigHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ListenConfigInterfaceMock.AddClusterScopedHandlerFunc: method is nil but ListenConfigInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ListenConfigHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockListenConfigInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockListenConfigInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedListenConfigInterface.AddClusterScopedHandlerCalls()) +func (mock *ListenConfigInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ListenConfigHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ListenConfigHandlerFunc + } + lockListenConfigInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockListenConfigInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *ListenConfigInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.ListenConfigLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("ListenConfigInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but ListenConfigInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ListenConfigLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockListenConfigInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockListenConfigInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedListenConfigInterface.AddClusterScopedLifecycleCalls()) +func (mock *ListenConfigInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ListenConfigLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ListenConfigLifecycle + } + lockListenConfigInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockListenConfigInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ListenConfigInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.ListenConfigHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ListenConfigInterfaceMock.AddHandlerFunc: method is nil but ListenConfigInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.ListenConfigHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockListenConfigInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockListenConfigInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedListenConfigInterface.AddHandlerCalls()) +func (mock *ListenConfigInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.ListenConfigHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.ListenConfigHandlerFunc + } + lockListenConfigInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockListenConfigInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *ListenConfigInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.ListenConfigLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("ListenConfigInterfaceMock.AddLifecycleFunc: method is nil but ListenConfigInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.ListenConfigLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockListenConfigInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockListenConfigInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedListenConfigInterface.AddLifecycleCalls()) +func (mock *ListenConfigInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.ListenConfigLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.ListenConfigLifecycle + } + lockListenConfigInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockListenConfigInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *ListenConfigInterfaceMock) Controller() v3.ListenConfigController { + if mock.ControllerFunc == nil { + panic("ListenConfigInterfaceMock.ControllerFunc: method is nil but ListenConfigInterface.Controller was just called") + } + callInfo := struct { + }{} + lockListenConfigInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockListenConfigInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedListenConfigInterface.ControllerCalls()) +func (mock *ListenConfigInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockListenConfigInterfaceMockController.RLock() + calls = mock.calls.Controller + lockListenConfigInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *ListenConfigInterfaceMock) Create(in1 *v3.ListenConfig) (*v3.ListenConfig, error) { + if mock.CreateFunc == nil { + panic("ListenConfigInterfaceMock.CreateFunc: method is nil but ListenConfigInterface.Create was just called") + } + callInfo := struct { + In1 *v3.ListenConfig + }{ + In1: in1, + } + lockListenConfigInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockListenConfigInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedListenConfigInterface.CreateCalls()) +func (mock *ListenConfigInterfaceMock) CreateCalls() []struct { + In1 *v3.ListenConfig +} { + var calls []struct { + In1 *v3.ListenConfig + } + lockListenConfigInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockListenConfigInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *ListenConfigInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("ListenConfigInterfaceMock.DeleteFunc: method is nil but ListenConfigInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockListenConfigInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockListenConfigInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedListenConfigInterface.DeleteCalls()) +func (mock *ListenConfigInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockListenConfigInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockListenConfigInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *ListenConfigInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("ListenConfigInterfaceMock.DeleteCollectionFunc: method is nil but ListenConfigInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockListenConfigInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockListenConfigInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedListenConfigInterface.DeleteCollectionCalls()) +func (mock *ListenConfigInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockListenConfigInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockListenConfigInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *ListenConfigInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("ListenConfigInterfaceMock.DeleteNamespacedFunc: method is nil but ListenConfigInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockListenConfigInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockListenConfigInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedListenConfigInterface.DeleteNamespacedCalls()) +func (mock *ListenConfigInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockListenConfigInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockListenConfigInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *ListenConfigInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.ListenConfig, error) { + if mock.GetFunc == nil { + panic("ListenConfigInterfaceMock.GetFunc: method is nil but ListenConfigInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockListenConfigInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockListenConfigInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedListenConfigInterface.GetCalls()) +func (mock *ListenConfigInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockListenConfigInterfaceMockGet.RLock() + calls = mock.calls.Get + lockListenConfigInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *ListenConfigInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.ListenConfig, error) { + if mock.GetNamespacedFunc == nil { + panic("ListenConfigInterfaceMock.GetNamespacedFunc: method is nil but ListenConfigInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockListenConfigInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockListenConfigInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedListenConfigInterface.GetNamespacedCalls()) +func (mock *ListenConfigInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockListenConfigInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockListenConfigInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ListenConfigInterfaceMock) List(opts v1.ListOptions) (*v3.ListenConfigList, error) { + if mock.ListFunc == nil { + panic("ListenConfigInterfaceMock.ListFunc: method is nil but ListenConfigInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockListenConfigInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockListenConfigInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedListenConfigInterface.ListCalls()) +func (mock *ListenConfigInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockListenConfigInterfaceMockList.RLock() + calls = mock.calls.List + lockListenConfigInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *ListenConfigInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("ListenConfigInterfaceMock.ObjectClientFunc: method is nil but ListenConfigInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockListenConfigInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockListenConfigInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedListenConfigInterface.ObjectClientCalls()) +func (mock *ListenConfigInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockListenConfigInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockListenConfigInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *ListenConfigInterfaceMock) Update(in1 *v3.ListenConfig) (*v3.ListenConfig, error) { + if mock.UpdateFunc == nil { + panic("ListenConfigInterfaceMock.UpdateFunc: method is nil but ListenConfigInterface.Update was just called") + } + callInfo := struct { + In1 *v3.ListenConfig + }{ + In1: in1, + } + lockListenConfigInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockListenConfigInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedListenConfigInterface.UpdateCalls()) +func (mock *ListenConfigInterfaceMock) UpdateCalls() []struct { + In1 *v3.ListenConfig +} { + var calls []struct { + In1 *v3.ListenConfig + } + lockListenConfigInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockListenConfigInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *ListenConfigInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("ListenConfigInterfaceMock.WatchFunc: method is nil but ListenConfigInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockListenConfigInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockListenConfigInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedListenConfigInterface.WatchCalls()) +func (mock *ListenConfigInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockListenConfigInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockListenConfigInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockListenConfigsGetterMockListenConfigs sync.RWMutex +) + +// Ensure, that ListenConfigsGetterMock does implement ListenConfigsGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.ListenConfigsGetter = &ListenConfigsGetterMock{} + +// ListenConfigsGetterMock is a mock implementation of ListenConfigsGetter. +// +// func TestSomethingThatUsesListenConfigsGetter(t *testing.T) { +// +// // make and configure a mocked ListenConfigsGetter +// mockedListenConfigsGetter := &ListenConfigsGetterMock{ +// ListenConfigsFunc: func(namespace string) v3.ListenConfigInterface { +// panic("mock out the ListenConfigs method") +// }, +// } +// +// // use mockedListenConfigsGetter in code that requires ListenConfigsGetter +// // and then make assertions. +// +// } +type ListenConfigsGetterMock struct { + // ListenConfigsFunc mocks the ListenConfigs method. + ListenConfigsFunc func(namespace string) v3.ListenConfigInterface + + // calls tracks calls to the methods. + calls struct { + // ListenConfigs holds details about calls to the ListenConfigs method. + ListenConfigs []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// ListenConfigs calls ListenConfigsFunc. +func (mock *ListenConfigsGetterMock) ListenConfigs(namespace string) v3.ListenConfigInterface { + if mock.ListenConfigsFunc == nil { + panic("ListenConfigsGetterMock.ListenConfigsFunc: method is nil but ListenConfigsGetter.ListenConfigs was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockListenConfigsGetterMockListenConfigs.Lock() + mock.calls.ListenConfigs = append(mock.calls.ListenConfigs, callInfo) + lockListenConfigsGetterMockListenConfigs.Unlock() + return mock.ListenConfigsFunc(namespace) +} + +// ListenConfigsCalls gets all the calls that were made to ListenConfigs. +// Check the length with: +// len(mockedListenConfigsGetter.ListenConfigsCalls()) +func (mock *ListenConfigsGetterMock) ListenConfigsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockListenConfigsGetterMockListenConfigs.RLock() + calls = mock.calls.ListenConfigs + lockListenConfigsGetterMockListenConfigs.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_monitor_metric_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_monitor_metric_mock_test.go new file mode 100644 index 00000000..3821ec0b --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_monitor_metric_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockMonitorMetricListerMockGet sync.RWMutex + lockMonitorMetricListerMockList sync.RWMutex +) + +// Ensure, that MonitorMetricListerMock does implement MonitorMetricLister. +// If this is not the case, regenerate this file with moq. +var _ v3.MonitorMetricLister = &MonitorMetricListerMock{} + +// MonitorMetricListerMock is a mock implementation of MonitorMetricLister. +// +// func TestSomethingThatUsesMonitorMetricLister(t *testing.T) { +// +// // make and configure a mocked MonitorMetricLister +// mockedMonitorMetricLister := &MonitorMetricListerMock{ +// GetFunc: func(namespace string, name string) (*v3.MonitorMetric, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.MonitorMetric, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedMonitorMetricLister in code that requires MonitorMetricLister +// // and then make assertions. +// +// } +type MonitorMetricListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.MonitorMetric, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.MonitorMetric, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *MonitorMetricListerMock) Get(namespace string, name string) (*v3.MonitorMetric, error) { + if mock.GetFunc == nil { + panic("MonitorMetricListerMock.GetFunc: method is nil but MonitorMetricLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockMonitorMetricListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockMonitorMetricListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedMonitorMetricLister.GetCalls()) +func (mock *MonitorMetricListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockMonitorMetricListerMockGet.RLock() + calls = mock.calls.Get + lockMonitorMetricListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *MonitorMetricListerMock) List(namespace string, selector labels.Selector) ([]*v3.MonitorMetric, error) { + if mock.ListFunc == nil { + panic("MonitorMetricListerMock.ListFunc: method is nil but MonitorMetricLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockMonitorMetricListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockMonitorMetricListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedMonitorMetricLister.ListCalls()) +func (mock *MonitorMetricListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockMonitorMetricListerMockList.RLock() + calls = mock.calls.List + lockMonitorMetricListerMockList.RUnlock() + return calls +} + +var ( + lockMonitorMetricControllerMockAddClusterScopedHandler sync.RWMutex + lockMonitorMetricControllerMockAddHandler sync.RWMutex + lockMonitorMetricControllerMockEnqueue sync.RWMutex + lockMonitorMetricControllerMockGeneric sync.RWMutex + lockMonitorMetricControllerMockInformer sync.RWMutex + lockMonitorMetricControllerMockLister sync.RWMutex + lockMonitorMetricControllerMockStart sync.RWMutex + lockMonitorMetricControllerMockSync sync.RWMutex +) + +// Ensure, that MonitorMetricControllerMock does implement MonitorMetricController. +// If this is not the case, regenerate this file with moq. +var _ v3.MonitorMetricController = &MonitorMetricControllerMock{} + +// MonitorMetricControllerMock is a mock implementation of MonitorMetricController. +// +// func TestSomethingThatUsesMonitorMetricController(t *testing.T) { +// +// // make and configure a mocked MonitorMetricController +// mockedMonitorMetricController := &MonitorMetricControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.MonitorMetricHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.MonitorMetricHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.MonitorMetricLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedMonitorMetricController in code that requires MonitorMetricController +// // and then make assertions. +// +// } +type MonitorMetricControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.MonitorMetricHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.MonitorMetricHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.MonitorMetricLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.MonitorMetricHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.MonitorMetricHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *MonitorMetricControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.MonitorMetricHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("MonitorMetricControllerMock.AddClusterScopedHandlerFunc: method is nil but MonitorMetricController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.MonitorMetricHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockMonitorMetricControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockMonitorMetricControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedMonitorMetricController.AddClusterScopedHandlerCalls()) +func (mock *MonitorMetricControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.MonitorMetricHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.MonitorMetricHandlerFunc + } + lockMonitorMetricControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockMonitorMetricControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *MonitorMetricControllerMock) AddHandler(ctx context.Context, name string, handler v3.MonitorMetricHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("MonitorMetricControllerMock.AddHandlerFunc: method is nil but MonitorMetricController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.MonitorMetricHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockMonitorMetricControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockMonitorMetricControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedMonitorMetricController.AddHandlerCalls()) +func (mock *MonitorMetricControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.MonitorMetricHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.MonitorMetricHandlerFunc + } + lockMonitorMetricControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockMonitorMetricControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *MonitorMetricControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("MonitorMetricControllerMock.EnqueueFunc: method is nil but MonitorMetricController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockMonitorMetricControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockMonitorMetricControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedMonitorMetricController.EnqueueCalls()) +func (mock *MonitorMetricControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockMonitorMetricControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockMonitorMetricControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *MonitorMetricControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("MonitorMetricControllerMock.GenericFunc: method is nil but MonitorMetricController.Generic was just called") + } + callInfo := struct { + }{} + lockMonitorMetricControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockMonitorMetricControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedMonitorMetricController.GenericCalls()) +func (mock *MonitorMetricControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockMonitorMetricControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockMonitorMetricControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *MonitorMetricControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("MonitorMetricControllerMock.InformerFunc: method is nil but MonitorMetricController.Informer was just called") + } + callInfo := struct { + }{} + lockMonitorMetricControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockMonitorMetricControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedMonitorMetricController.InformerCalls()) +func (mock *MonitorMetricControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockMonitorMetricControllerMockInformer.RLock() + calls = mock.calls.Informer + lockMonitorMetricControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *MonitorMetricControllerMock) Lister() v3.MonitorMetricLister { + if mock.ListerFunc == nil { + panic("MonitorMetricControllerMock.ListerFunc: method is nil but MonitorMetricController.Lister was just called") + } + callInfo := struct { + }{} + lockMonitorMetricControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockMonitorMetricControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedMonitorMetricController.ListerCalls()) +func (mock *MonitorMetricControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockMonitorMetricControllerMockLister.RLock() + calls = mock.calls.Lister + lockMonitorMetricControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *MonitorMetricControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("MonitorMetricControllerMock.StartFunc: method is nil but MonitorMetricController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockMonitorMetricControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockMonitorMetricControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedMonitorMetricController.StartCalls()) +func (mock *MonitorMetricControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockMonitorMetricControllerMockStart.RLock() + calls = mock.calls.Start + lockMonitorMetricControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *MonitorMetricControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("MonitorMetricControllerMock.SyncFunc: method is nil but MonitorMetricController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockMonitorMetricControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockMonitorMetricControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedMonitorMetricController.SyncCalls()) +func (mock *MonitorMetricControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockMonitorMetricControllerMockSync.RLock() + calls = mock.calls.Sync + lockMonitorMetricControllerMockSync.RUnlock() + return calls +} + +var ( + lockMonitorMetricInterfaceMockAddClusterScopedHandler sync.RWMutex + lockMonitorMetricInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockMonitorMetricInterfaceMockAddHandler sync.RWMutex + lockMonitorMetricInterfaceMockAddLifecycle sync.RWMutex + lockMonitorMetricInterfaceMockController sync.RWMutex + lockMonitorMetricInterfaceMockCreate sync.RWMutex + lockMonitorMetricInterfaceMockDelete sync.RWMutex + lockMonitorMetricInterfaceMockDeleteCollection sync.RWMutex + lockMonitorMetricInterfaceMockDeleteNamespaced sync.RWMutex + lockMonitorMetricInterfaceMockGet sync.RWMutex + lockMonitorMetricInterfaceMockGetNamespaced sync.RWMutex + lockMonitorMetricInterfaceMockList sync.RWMutex + lockMonitorMetricInterfaceMockObjectClient sync.RWMutex + lockMonitorMetricInterfaceMockUpdate sync.RWMutex + lockMonitorMetricInterfaceMockWatch sync.RWMutex +) + +// Ensure, that MonitorMetricInterfaceMock does implement MonitorMetricInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.MonitorMetricInterface = &MonitorMetricInterfaceMock{} + +// MonitorMetricInterfaceMock is a mock implementation of MonitorMetricInterface. +// +// func TestSomethingThatUsesMonitorMetricInterface(t *testing.T) { +// +// // make and configure a mocked MonitorMetricInterface +// mockedMonitorMetricInterface := &MonitorMetricInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.MonitorMetricHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.MonitorMetricLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.MonitorMetricHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.MonitorMetricLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.MonitorMetricController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.MonitorMetric) (*v3.MonitorMetric, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.MonitorMetric, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.MonitorMetric, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.MonitorMetricList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.MonitorMetric) (*v3.MonitorMetric, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedMonitorMetricInterface in code that requires MonitorMetricInterface +// // and then make assertions. +// +// } +type MonitorMetricInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.MonitorMetricHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.MonitorMetricLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.MonitorMetricHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.MonitorMetricLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.MonitorMetricController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.MonitorMetric) (*v3.MonitorMetric, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.MonitorMetric, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.MonitorMetric, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.MonitorMetricList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.MonitorMetric) (*v3.MonitorMetric, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.MonitorMetricHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.MonitorMetricLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.MonitorMetricHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.MonitorMetricLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.MonitorMetric + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.MonitorMetric + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *MonitorMetricInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.MonitorMetricHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("MonitorMetricInterfaceMock.AddClusterScopedHandlerFunc: method is nil but MonitorMetricInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.MonitorMetricHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockMonitorMetricInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockMonitorMetricInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedMonitorMetricInterface.AddClusterScopedHandlerCalls()) +func (mock *MonitorMetricInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.MonitorMetricHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.MonitorMetricHandlerFunc + } + lockMonitorMetricInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockMonitorMetricInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *MonitorMetricInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.MonitorMetricLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("MonitorMetricInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but MonitorMetricInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.MonitorMetricLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockMonitorMetricInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockMonitorMetricInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedMonitorMetricInterface.AddClusterScopedLifecycleCalls()) +func (mock *MonitorMetricInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.MonitorMetricLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.MonitorMetricLifecycle + } + lockMonitorMetricInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockMonitorMetricInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *MonitorMetricInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.MonitorMetricHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("MonitorMetricInterfaceMock.AddHandlerFunc: method is nil but MonitorMetricInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.MonitorMetricHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockMonitorMetricInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockMonitorMetricInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedMonitorMetricInterface.AddHandlerCalls()) +func (mock *MonitorMetricInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.MonitorMetricHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.MonitorMetricHandlerFunc + } + lockMonitorMetricInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockMonitorMetricInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *MonitorMetricInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.MonitorMetricLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("MonitorMetricInterfaceMock.AddLifecycleFunc: method is nil but MonitorMetricInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.MonitorMetricLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockMonitorMetricInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockMonitorMetricInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedMonitorMetricInterface.AddLifecycleCalls()) +func (mock *MonitorMetricInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.MonitorMetricLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.MonitorMetricLifecycle + } + lockMonitorMetricInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockMonitorMetricInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *MonitorMetricInterfaceMock) Controller() v3.MonitorMetricController { + if mock.ControllerFunc == nil { + panic("MonitorMetricInterfaceMock.ControllerFunc: method is nil but MonitorMetricInterface.Controller was just called") + } + callInfo := struct { + }{} + lockMonitorMetricInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockMonitorMetricInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedMonitorMetricInterface.ControllerCalls()) +func (mock *MonitorMetricInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockMonitorMetricInterfaceMockController.RLock() + calls = mock.calls.Controller + lockMonitorMetricInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *MonitorMetricInterfaceMock) Create(in1 *v3.MonitorMetric) (*v3.MonitorMetric, error) { + if mock.CreateFunc == nil { + panic("MonitorMetricInterfaceMock.CreateFunc: method is nil but MonitorMetricInterface.Create was just called") + } + callInfo := struct { + In1 *v3.MonitorMetric + }{ + In1: in1, + } + lockMonitorMetricInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockMonitorMetricInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedMonitorMetricInterface.CreateCalls()) +func (mock *MonitorMetricInterfaceMock) CreateCalls() []struct { + In1 *v3.MonitorMetric +} { + var calls []struct { + In1 *v3.MonitorMetric + } + lockMonitorMetricInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockMonitorMetricInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *MonitorMetricInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("MonitorMetricInterfaceMock.DeleteFunc: method is nil but MonitorMetricInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockMonitorMetricInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockMonitorMetricInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedMonitorMetricInterface.DeleteCalls()) +func (mock *MonitorMetricInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockMonitorMetricInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockMonitorMetricInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *MonitorMetricInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("MonitorMetricInterfaceMock.DeleteCollectionFunc: method is nil but MonitorMetricInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockMonitorMetricInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockMonitorMetricInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedMonitorMetricInterface.DeleteCollectionCalls()) +func (mock *MonitorMetricInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockMonitorMetricInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockMonitorMetricInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *MonitorMetricInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("MonitorMetricInterfaceMock.DeleteNamespacedFunc: method is nil but MonitorMetricInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockMonitorMetricInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockMonitorMetricInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedMonitorMetricInterface.DeleteNamespacedCalls()) +func (mock *MonitorMetricInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockMonitorMetricInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockMonitorMetricInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *MonitorMetricInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.MonitorMetric, error) { + if mock.GetFunc == nil { + panic("MonitorMetricInterfaceMock.GetFunc: method is nil but MonitorMetricInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockMonitorMetricInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockMonitorMetricInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedMonitorMetricInterface.GetCalls()) +func (mock *MonitorMetricInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockMonitorMetricInterfaceMockGet.RLock() + calls = mock.calls.Get + lockMonitorMetricInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *MonitorMetricInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.MonitorMetric, error) { + if mock.GetNamespacedFunc == nil { + panic("MonitorMetricInterfaceMock.GetNamespacedFunc: method is nil but MonitorMetricInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockMonitorMetricInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockMonitorMetricInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedMonitorMetricInterface.GetNamespacedCalls()) +func (mock *MonitorMetricInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockMonitorMetricInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockMonitorMetricInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *MonitorMetricInterfaceMock) List(opts v1.ListOptions) (*v3.MonitorMetricList, error) { + if mock.ListFunc == nil { + panic("MonitorMetricInterfaceMock.ListFunc: method is nil but MonitorMetricInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockMonitorMetricInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockMonitorMetricInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedMonitorMetricInterface.ListCalls()) +func (mock *MonitorMetricInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockMonitorMetricInterfaceMockList.RLock() + calls = mock.calls.List + lockMonitorMetricInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *MonitorMetricInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("MonitorMetricInterfaceMock.ObjectClientFunc: method is nil but MonitorMetricInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockMonitorMetricInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockMonitorMetricInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedMonitorMetricInterface.ObjectClientCalls()) +func (mock *MonitorMetricInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockMonitorMetricInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockMonitorMetricInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *MonitorMetricInterfaceMock) Update(in1 *v3.MonitorMetric) (*v3.MonitorMetric, error) { + if mock.UpdateFunc == nil { + panic("MonitorMetricInterfaceMock.UpdateFunc: method is nil but MonitorMetricInterface.Update was just called") + } + callInfo := struct { + In1 *v3.MonitorMetric + }{ + In1: in1, + } + lockMonitorMetricInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockMonitorMetricInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedMonitorMetricInterface.UpdateCalls()) +func (mock *MonitorMetricInterfaceMock) UpdateCalls() []struct { + In1 *v3.MonitorMetric +} { + var calls []struct { + In1 *v3.MonitorMetric + } + lockMonitorMetricInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockMonitorMetricInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *MonitorMetricInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("MonitorMetricInterfaceMock.WatchFunc: method is nil but MonitorMetricInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockMonitorMetricInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockMonitorMetricInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedMonitorMetricInterface.WatchCalls()) +func (mock *MonitorMetricInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockMonitorMetricInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockMonitorMetricInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockMonitorMetricsGetterMockMonitorMetrics sync.RWMutex +) + +// Ensure, that MonitorMetricsGetterMock does implement MonitorMetricsGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.MonitorMetricsGetter = &MonitorMetricsGetterMock{} + +// MonitorMetricsGetterMock is a mock implementation of MonitorMetricsGetter. +// +// func TestSomethingThatUsesMonitorMetricsGetter(t *testing.T) { +// +// // make and configure a mocked MonitorMetricsGetter +// mockedMonitorMetricsGetter := &MonitorMetricsGetterMock{ +// MonitorMetricsFunc: func(namespace string) v3.MonitorMetricInterface { +// panic("mock out the MonitorMetrics method") +// }, +// } +// +// // use mockedMonitorMetricsGetter in code that requires MonitorMetricsGetter +// // and then make assertions. +// +// } +type MonitorMetricsGetterMock struct { + // MonitorMetricsFunc mocks the MonitorMetrics method. + MonitorMetricsFunc func(namespace string) v3.MonitorMetricInterface + + // calls tracks calls to the methods. + calls struct { + // MonitorMetrics holds details about calls to the MonitorMetrics method. + MonitorMetrics []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// MonitorMetrics calls MonitorMetricsFunc. +func (mock *MonitorMetricsGetterMock) MonitorMetrics(namespace string) v3.MonitorMetricInterface { + if mock.MonitorMetricsFunc == nil { + panic("MonitorMetricsGetterMock.MonitorMetricsFunc: method is nil but MonitorMetricsGetter.MonitorMetrics was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockMonitorMetricsGetterMockMonitorMetrics.Lock() + mock.calls.MonitorMetrics = append(mock.calls.MonitorMetrics, callInfo) + lockMonitorMetricsGetterMockMonitorMetrics.Unlock() + return mock.MonitorMetricsFunc(namespace) +} + +// MonitorMetricsCalls gets all the calls that were made to MonitorMetrics. +// Check the length with: +// len(mockedMonitorMetricsGetter.MonitorMetricsCalls()) +func (mock *MonitorMetricsGetterMock) MonitorMetricsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockMonitorMetricsGetterMockMonitorMetrics.RLock() + calls = mock.calls.MonitorMetrics + lockMonitorMetricsGetterMockMonitorMetrics.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_multi_cluster_app_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_multi_cluster_app_mock_test.go new file mode 100644 index 00000000..8740475f --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_multi_cluster_app_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockMultiClusterAppListerMockGet sync.RWMutex + lockMultiClusterAppListerMockList sync.RWMutex +) + +// Ensure, that MultiClusterAppListerMock does implement MultiClusterAppLister. +// If this is not the case, regenerate this file with moq. +var _ v3.MultiClusterAppLister = &MultiClusterAppListerMock{} + +// MultiClusterAppListerMock is a mock implementation of MultiClusterAppLister. +// +// func TestSomethingThatUsesMultiClusterAppLister(t *testing.T) { +// +// // make and configure a mocked MultiClusterAppLister +// mockedMultiClusterAppLister := &MultiClusterAppListerMock{ +// GetFunc: func(namespace string, name string) (*v3.MultiClusterApp, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.MultiClusterApp, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedMultiClusterAppLister in code that requires MultiClusterAppLister +// // and then make assertions. +// +// } +type MultiClusterAppListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.MultiClusterApp, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.MultiClusterApp, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *MultiClusterAppListerMock) Get(namespace string, name string) (*v3.MultiClusterApp, error) { + if mock.GetFunc == nil { + panic("MultiClusterAppListerMock.GetFunc: method is nil but MultiClusterAppLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockMultiClusterAppListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockMultiClusterAppListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedMultiClusterAppLister.GetCalls()) +func (mock *MultiClusterAppListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockMultiClusterAppListerMockGet.RLock() + calls = mock.calls.Get + lockMultiClusterAppListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *MultiClusterAppListerMock) List(namespace string, selector labels.Selector) ([]*v3.MultiClusterApp, error) { + if mock.ListFunc == nil { + panic("MultiClusterAppListerMock.ListFunc: method is nil but MultiClusterAppLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockMultiClusterAppListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockMultiClusterAppListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedMultiClusterAppLister.ListCalls()) +func (mock *MultiClusterAppListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockMultiClusterAppListerMockList.RLock() + calls = mock.calls.List + lockMultiClusterAppListerMockList.RUnlock() + return calls +} + +var ( + lockMultiClusterAppControllerMockAddClusterScopedHandler sync.RWMutex + lockMultiClusterAppControllerMockAddHandler sync.RWMutex + lockMultiClusterAppControllerMockEnqueue sync.RWMutex + lockMultiClusterAppControllerMockGeneric sync.RWMutex + lockMultiClusterAppControllerMockInformer sync.RWMutex + lockMultiClusterAppControllerMockLister sync.RWMutex + lockMultiClusterAppControllerMockStart sync.RWMutex + lockMultiClusterAppControllerMockSync sync.RWMutex +) + +// Ensure, that MultiClusterAppControllerMock does implement MultiClusterAppController. +// If this is not the case, regenerate this file with moq. +var _ v3.MultiClusterAppController = &MultiClusterAppControllerMock{} + +// MultiClusterAppControllerMock is a mock implementation of MultiClusterAppController. +// +// func TestSomethingThatUsesMultiClusterAppController(t *testing.T) { +// +// // make and configure a mocked MultiClusterAppController +// mockedMultiClusterAppController := &MultiClusterAppControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.MultiClusterAppHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.MultiClusterAppHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.MultiClusterAppLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedMultiClusterAppController in code that requires MultiClusterAppController +// // and then make assertions. +// +// } +type MultiClusterAppControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.MultiClusterAppHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.MultiClusterAppHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.MultiClusterAppLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.MultiClusterAppHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.MultiClusterAppHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *MultiClusterAppControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.MultiClusterAppHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("MultiClusterAppControllerMock.AddClusterScopedHandlerFunc: method is nil but MultiClusterAppController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.MultiClusterAppHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockMultiClusterAppControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockMultiClusterAppControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedMultiClusterAppController.AddClusterScopedHandlerCalls()) +func (mock *MultiClusterAppControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.MultiClusterAppHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.MultiClusterAppHandlerFunc + } + lockMultiClusterAppControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockMultiClusterAppControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *MultiClusterAppControllerMock) AddHandler(ctx context.Context, name string, handler v3.MultiClusterAppHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("MultiClusterAppControllerMock.AddHandlerFunc: method is nil but MultiClusterAppController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.MultiClusterAppHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockMultiClusterAppControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockMultiClusterAppControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedMultiClusterAppController.AddHandlerCalls()) +func (mock *MultiClusterAppControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.MultiClusterAppHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.MultiClusterAppHandlerFunc + } + lockMultiClusterAppControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockMultiClusterAppControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *MultiClusterAppControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("MultiClusterAppControllerMock.EnqueueFunc: method is nil but MultiClusterAppController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockMultiClusterAppControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockMultiClusterAppControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedMultiClusterAppController.EnqueueCalls()) +func (mock *MultiClusterAppControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockMultiClusterAppControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockMultiClusterAppControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *MultiClusterAppControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("MultiClusterAppControllerMock.GenericFunc: method is nil but MultiClusterAppController.Generic was just called") + } + callInfo := struct { + }{} + lockMultiClusterAppControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockMultiClusterAppControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedMultiClusterAppController.GenericCalls()) +func (mock *MultiClusterAppControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockMultiClusterAppControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockMultiClusterAppControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *MultiClusterAppControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("MultiClusterAppControllerMock.InformerFunc: method is nil but MultiClusterAppController.Informer was just called") + } + callInfo := struct { + }{} + lockMultiClusterAppControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockMultiClusterAppControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedMultiClusterAppController.InformerCalls()) +func (mock *MultiClusterAppControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockMultiClusterAppControllerMockInformer.RLock() + calls = mock.calls.Informer + lockMultiClusterAppControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *MultiClusterAppControllerMock) Lister() v3.MultiClusterAppLister { + if mock.ListerFunc == nil { + panic("MultiClusterAppControllerMock.ListerFunc: method is nil but MultiClusterAppController.Lister was just called") + } + callInfo := struct { + }{} + lockMultiClusterAppControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockMultiClusterAppControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedMultiClusterAppController.ListerCalls()) +func (mock *MultiClusterAppControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockMultiClusterAppControllerMockLister.RLock() + calls = mock.calls.Lister + lockMultiClusterAppControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *MultiClusterAppControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("MultiClusterAppControllerMock.StartFunc: method is nil but MultiClusterAppController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockMultiClusterAppControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockMultiClusterAppControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedMultiClusterAppController.StartCalls()) +func (mock *MultiClusterAppControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockMultiClusterAppControllerMockStart.RLock() + calls = mock.calls.Start + lockMultiClusterAppControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *MultiClusterAppControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("MultiClusterAppControllerMock.SyncFunc: method is nil but MultiClusterAppController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockMultiClusterAppControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockMultiClusterAppControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedMultiClusterAppController.SyncCalls()) +func (mock *MultiClusterAppControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockMultiClusterAppControllerMockSync.RLock() + calls = mock.calls.Sync + lockMultiClusterAppControllerMockSync.RUnlock() + return calls +} + +var ( + lockMultiClusterAppInterfaceMockAddClusterScopedHandler sync.RWMutex + lockMultiClusterAppInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockMultiClusterAppInterfaceMockAddHandler sync.RWMutex + lockMultiClusterAppInterfaceMockAddLifecycle sync.RWMutex + lockMultiClusterAppInterfaceMockController sync.RWMutex + lockMultiClusterAppInterfaceMockCreate sync.RWMutex + lockMultiClusterAppInterfaceMockDelete sync.RWMutex + lockMultiClusterAppInterfaceMockDeleteCollection sync.RWMutex + lockMultiClusterAppInterfaceMockDeleteNamespaced sync.RWMutex + lockMultiClusterAppInterfaceMockGet sync.RWMutex + lockMultiClusterAppInterfaceMockGetNamespaced sync.RWMutex + lockMultiClusterAppInterfaceMockList sync.RWMutex + lockMultiClusterAppInterfaceMockObjectClient sync.RWMutex + lockMultiClusterAppInterfaceMockUpdate sync.RWMutex + lockMultiClusterAppInterfaceMockWatch sync.RWMutex +) + +// Ensure, that MultiClusterAppInterfaceMock does implement MultiClusterAppInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.MultiClusterAppInterface = &MultiClusterAppInterfaceMock{} + +// MultiClusterAppInterfaceMock is a mock implementation of MultiClusterAppInterface. +// +// func TestSomethingThatUsesMultiClusterAppInterface(t *testing.T) { +// +// // make and configure a mocked MultiClusterAppInterface +// mockedMultiClusterAppInterface := &MultiClusterAppInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.MultiClusterAppHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.MultiClusterAppLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.MultiClusterAppHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.MultiClusterAppLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.MultiClusterAppController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.MultiClusterApp) (*v3.MultiClusterApp, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.MultiClusterApp, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.MultiClusterApp, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.MultiClusterAppList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.MultiClusterApp) (*v3.MultiClusterApp, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedMultiClusterAppInterface in code that requires MultiClusterAppInterface +// // and then make assertions. +// +// } +type MultiClusterAppInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.MultiClusterAppHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.MultiClusterAppLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.MultiClusterAppHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.MultiClusterAppLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.MultiClusterAppController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.MultiClusterApp) (*v3.MultiClusterApp, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.MultiClusterApp, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.MultiClusterApp, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.MultiClusterAppList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.MultiClusterApp) (*v3.MultiClusterApp, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.MultiClusterAppHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.MultiClusterAppLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.MultiClusterAppHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.MultiClusterAppLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.MultiClusterApp + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.MultiClusterApp + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *MultiClusterAppInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.MultiClusterAppHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("MultiClusterAppInterfaceMock.AddClusterScopedHandlerFunc: method is nil but MultiClusterAppInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.MultiClusterAppHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockMultiClusterAppInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockMultiClusterAppInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedMultiClusterAppInterface.AddClusterScopedHandlerCalls()) +func (mock *MultiClusterAppInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.MultiClusterAppHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.MultiClusterAppHandlerFunc + } + lockMultiClusterAppInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockMultiClusterAppInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *MultiClusterAppInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.MultiClusterAppLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("MultiClusterAppInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but MultiClusterAppInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.MultiClusterAppLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockMultiClusterAppInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockMultiClusterAppInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedMultiClusterAppInterface.AddClusterScopedLifecycleCalls()) +func (mock *MultiClusterAppInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.MultiClusterAppLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.MultiClusterAppLifecycle + } + lockMultiClusterAppInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockMultiClusterAppInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *MultiClusterAppInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.MultiClusterAppHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("MultiClusterAppInterfaceMock.AddHandlerFunc: method is nil but MultiClusterAppInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.MultiClusterAppHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockMultiClusterAppInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockMultiClusterAppInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedMultiClusterAppInterface.AddHandlerCalls()) +func (mock *MultiClusterAppInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.MultiClusterAppHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.MultiClusterAppHandlerFunc + } + lockMultiClusterAppInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockMultiClusterAppInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *MultiClusterAppInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.MultiClusterAppLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("MultiClusterAppInterfaceMock.AddLifecycleFunc: method is nil but MultiClusterAppInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.MultiClusterAppLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockMultiClusterAppInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockMultiClusterAppInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedMultiClusterAppInterface.AddLifecycleCalls()) +func (mock *MultiClusterAppInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.MultiClusterAppLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.MultiClusterAppLifecycle + } + lockMultiClusterAppInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockMultiClusterAppInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *MultiClusterAppInterfaceMock) Controller() v3.MultiClusterAppController { + if mock.ControllerFunc == nil { + panic("MultiClusterAppInterfaceMock.ControllerFunc: method is nil but MultiClusterAppInterface.Controller was just called") + } + callInfo := struct { + }{} + lockMultiClusterAppInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockMultiClusterAppInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedMultiClusterAppInterface.ControllerCalls()) +func (mock *MultiClusterAppInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockMultiClusterAppInterfaceMockController.RLock() + calls = mock.calls.Controller + lockMultiClusterAppInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *MultiClusterAppInterfaceMock) Create(in1 *v3.MultiClusterApp) (*v3.MultiClusterApp, error) { + if mock.CreateFunc == nil { + panic("MultiClusterAppInterfaceMock.CreateFunc: method is nil but MultiClusterAppInterface.Create was just called") + } + callInfo := struct { + In1 *v3.MultiClusterApp + }{ + In1: in1, + } + lockMultiClusterAppInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockMultiClusterAppInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedMultiClusterAppInterface.CreateCalls()) +func (mock *MultiClusterAppInterfaceMock) CreateCalls() []struct { + In1 *v3.MultiClusterApp +} { + var calls []struct { + In1 *v3.MultiClusterApp + } + lockMultiClusterAppInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockMultiClusterAppInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *MultiClusterAppInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("MultiClusterAppInterfaceMock.DeleteFunc: method is nil but MultiClusterAppInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockMultiClusterAppInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockMultiClusterAppInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedMultiClusterAppInterface.DeleteCalls()) +func (mock *MultiClusterAppInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockMultiClusterAppInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockMultiClusterAppInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *MultiClusterAppInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("MultiClusterAppInterfaceMock.DeleteCollectionFunc: method is nil but MultiClusterAppInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockMultiClusterAppInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockMultiClusterAppInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedMultiClusterAppInterface.DeleteCollectionCalls()) +func (mock *MultiClusterAppInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockMultiClusterAppInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockMultiClusterAppInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *MultiClusterAppInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("MultiClusterAppInterfaceMock.DeleteNamespacedFunc: method is nil but MultiClusterAppInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockMultiClusterAppInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockMultiClusterAppInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedMultiClusterAppInterface.DeleteNamespacedCalls()) +func (mock *MultiClusterAppInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockMultiClusterAppInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockMultiClusterAppInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *MultiClusterAppInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.MultiClusterApp, error) { + if mock.GetFunc == nil { + panic("MultiClusterAppInterfaceMock.GetFunc: method is nil but MultiClusterAppInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockMultiClusterAppInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockMultiClusterAppInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedMultiClusterAppInterface.GetCalls()) +func (mock *MultiClusterAppInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockMultiClusterAppInterfaceMockGet.RLock() + calls = mock.calls.Get + lockMultiClusterAppInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *MultiClusterAppInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.MultiClusterApp, error) { + if mock.GetNamespacedFunc == nil { + panic("MultiClusterAppInterfaceMock.GetNamespacedFunc: method is nil but MultiClusterAppInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockMultiClusterAppInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockMultiClusterAppInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedMultiClusterAppInterface.GetNamespacedCalls()) +func (mock *MultiClusterAppInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockMultiClusterAppInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockMultiClusterAppInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *MultiClusterAppInterfaceMock) List(opts v1.ListOptions) (*v3.MultiClusterAppList, error) { + if mock.ListFunc == nil { + panic("MultiClusterAppInterfaceMock.ListFunc: method is nil but MultiClusterAppInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockMultiClusterAppInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockMultiClusterAppInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedMultiClusterAppInterface.ListCalls()) +func (mock *MultiClusterAppInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockMultiClusterAppInterfaceMockList.RLock() + calls = mock.calls.List + lockMultiClusterAppInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *MultiClusterAppInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("MultiClusterAppInterfaceMock.ObjectClientFunc: method is nil but MultiClusterAppInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockMultiClusterAppInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockMultiClusterAppInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedMultiClusterAppInterface.ObjectClientCalls()) +func (mock *MultiClusterAppInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockMultiClusterAppInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockMultiClusterAppInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *MultiClusterAppInterfaceMock) Update(in1 *v3.MultiClusterApp) (*v3.MultiClusterApp, error) { + if mock.UpdateFunc == nil { + panic("MultiClusterAppInterfaceMock.UpdateFunc: method is nil but MultiClusterAppInterface.Update was just called") + } + callInfo := struct { + In1 *v3.MultiClusterApp + }{ + In1: in1, + } + lockMultiClusterAppInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockMultiClusterAppInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedMultiClusterAppInterface.UpdateCalls()) +func (mock *MultiClusterAppInterfaceMock) UpdateCalls() []struct { + In1 *v3.MultiClusterApp +} { + var calls []struct { + In1 *v3.MultiClusterApp + } + lockMultiClusterAppInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockMultiClusterAppInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *MultiClusterAppInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("MultiClusterAppInterfaceMock.WatchFunc: method is nil but MultiClusterAppInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockMultiClusterAppInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockMultiClusterAppInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedMultiClusterAppInterface.WatchCalls()) +func (mock *MultiClusterAppInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockMultiClusterAppInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockMultiClusterAppInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockMultiClusterAppsGetterMockMultiClusterApps sync.RWMutex +) + +// Ensure, that MultiClusterAppsGetterMock does implement MultiClusterAppsGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.MultiClusterAppsGetter = &MultiClusterAppsGetterMock{} + +// MultiClusterAppsGetterMock is a mock implementation of MultiClusterAppsGetter. +// +// func TestSomethingThatUsesMultiClusterAppsGetter(t *testing.T) { +// +// // make and configure a mocked MultiClusterAppsGetter +// mockedMultiClusterAppsGetter := &MultiClusterAppsGetterMock{ +// MultiClusterAppsFunc: func(namespace string) v3.MultiClusterAppInterface { +// panic("mock out the MultiClusterApps method") +// }, +// } +// +// // use mockedMultiClusterAppsGetter in code that requires MultiClusterAppsGetter +// // and then make assertions. +// +// } +type MultiClusterAppsGetterMock struct { + // MultiClusterAppsFunc mocks the MultiClusterApps method. + MultiClusterAppsFunc func(namespace string) v3.MultiClusterAppInterface + + // calls tracks calls to the methods. + calls struct { + // MultiClusterApps holds details about calls to the MultiClusterApps method. + MultiClusterApps []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// MultiClusterApps calls MultiClusterAppsFunc. +func (mock *MultiClusterAppsGetterMock) MultiClusterApps(namespace string) v3.MultiClusterAppInterface { + if mock.MultiClusterAppsFunc == nil { + panic("MultiClusterAppsGetterMock.MultiClusterAppsFunc: method is nil but MultiClusterAppsGetter.MultiClusterApps was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockMultiClusterAppsGetterMockMultiClusterApps.Lock() + mock.calls.MultiClusterApps = append(mock.calls.MultiClusterApps, callInfo) + lockMultiClusterAppsGetterMockMultiClusterApps.Unlock() + return mock.MultiClusterAppsFunc(namespace) +} + +// MultiClusterAppsCalls gets all the calls that were made to MultiClusterApps. +// Check the length with: +// len(mockedMultiClusterAppsGetter.MultiClusterAppsCalls()) +func (mock *MultiClusterAppsGetterMock) MultiClusterAppsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockMultiClusterAppsGetterMockMultiClusterApps.RLock() + calls = mock.calls.MultiClusterApps + lockMultiClusterAppsGetterMockMultiClusterApps.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_multi_cluster_app_revision_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_multi_cluster_app_revision_mock_test.go new file mode 100644 index 00000000..d83e6f19 --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_multi_cluster_app_revision_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockMultiClusterAppRevisionListerMockGet sync.RWMutex + lockMultiClusterAppRevisionListerMockList sync.RWMutex +) + +// Ensure, that MultiClusterAppRevisionListerMock does implement MultiClusterAppRevisionLister. +// If this is not the case, regenerate this file with moq. +var _ v3.MultiClusterAppRevisionLister = &MultiClusterAppRevisionListerMock{} + +// MultiClusterAppRevisionListerMock is a mock implementation of MultiClusterAppRevisionLister. +// +// func TestSomethingThatUsesMultiClusterAppRevisionLister(t *testing.T) { +// +// // make and configure a mocked MultiClusterAppRevisionLister +// mockedMultiClusterAppRevisionLister := &MultiClusterAppRevisionListerMock{ +// GetFunc: func(namespace string, name string) (*v3.MultiClusterAppRevision, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.MultiClusterAppRevision, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedMultiClusterAppRevisionLister in code that requires MultiClusterAppRevisionLister +// // and then make assertions. +// +// } +type MultiClusterAppRevisionListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.MultiClusterAppRevision, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.MultiClusterAppRevision, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *MultiClusterAppRevisionListerMock) Get(namespace string, name string) (*v3.MultiClusterAppRevision, error) { + if mock.GetFunc == nil { + panic("MultiClusterAppRevisionListerMock.GetFunc: method is nil but MultiClusterAppRevisionLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockMultiClusterAppRevisionListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockMultiClusterAppRevisionListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedMultiClusterAppRevisionLister.GetCalls()) +func (mock *MultiClusterAppRevisionListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockMultiClusterAppRevisionListerMockGet.RLock() + calls = mock.calls.Get + lockMultiClusterAppRevisionListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *MultiClusterAppRevisionListerMock) List(namespace string, selector labels.Selector) ([]*v3.MultiClusterAppRevision, error) { + if mock.ListFunc == nil { + panic("MultiClusterAppRevisionListerMock.ListFunc: method is nil but MultiClusterAppRevisionLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockMultiClusterAppRevisionListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockMultiClusterAppRevisionListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedMultiClusterAppRevisionLister.ListCalls()) +func (mock *MultiClusterAppRevisionListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockMultiClusterAppRevisionListerMockList.RLock() + calls = mock.calls.List + lockMultiClusterAppRevisionListerMockList.RUnlock() + return calls +} + +var ( + lockMultiClusterAppRevisionControllerMockAddClusterScopedHandler sync.RWMutex + lockMultiClusterAppRevisionControllerMockAddHandler sync.RWMutex + lockMultiClusterAppRevisionControllerMockEnqueue sync.RWMutex + lockMultiClusterAppRevisionControllerMockGeneric sync.RWMutex + lockMultiClusterAppRevisionControllerMockInformer sync.RWMutex + lockMultiClusterAppRevisionControllerMockLister sync.RWMutex + lockMultiClusterAppRevisionControllerMockStart sync.RWMutex + lockMultiClusterAppRevisionControllerMockSync sync.RWMutex +) + +// Ensure, that MultiClusterAppRevisionControllerMock does implement MultiClusterAppRevisionController. +// If this is not the case, regenerate this file with moq. +var _ v3.MultiClusterAppRevisionController = &MultiClusterAppRevisionControllerMock{} + +// MultiClusterAppRevisionControllerMock is a mock implementation of MultiClusterAppRevisionController. +// +// func TestSomethingThatUsesMultiClusterAppRevisionController(t *testing.T) { +// +// // make and configure a mocked MultiClusterAppRevisionController +// mockedMultiClusterAppRevisionController := &MultiClusterAppRevisionControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.MultiClusterAppRevisionHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.MultiClusterAppRevisionHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.MultiClusterAppRevisionLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedMultiClusterAppRevisionController in code that requires MultiClusterAppRevisionController +// // and then make assertions. +// +// } +type MultiClusterAppRevisionControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.MultiClusterAppRevisionHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.MultiClusterAppRevisionHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.MultiClusterAppRevisionLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.MultiClusterAppRevisionHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.MultiClusterAppRevisionHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *MultiClusterAppRevisionControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.MultiClusterAppRevisionHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("MultiClusterAppRevisionControllerMock.AddClusterScopedHandlerFunc: method is nil but MultiClusterAppRevisionController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.MultiClusterAppRevisionHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockMultiClusterAppRevisionControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockMultiClusterAppRevisionControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedMultiClusterAppRevisionController.AddClusterScopedHandlerCalls()) +func (mock *MultiClusterAppRevisionControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.MultiClusterAppRevisionHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.MultiClusterAppRevisionHandlerFunc + } + lockMultiClusterAppRevisionControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockMultiClusterAppRevisionControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *MultiClusterAppRevisionControllerMock) AddHandler(ctx context.Context, name string, handler v3.MultiClusterAppRevisionHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("MultiClusterAppRevisionControllerMock.AddHandlerFunc: method is nil but MultiClusterAppRevisionController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.MultiClusterAppRevisionHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockMultiClusterAppRevisionControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockMultiClusterAppRevisionControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedMultiClusterAppRevisionController.AddHandlerCalls()) +func (mock *MultiClusterAppRevisionControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.MultiClusterAppRevisionHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.MultiClusterAppRevisionHandlerFunc + } + lockMultiClusterAppRevisionControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockMultiClusterAppRevisionControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *MultiClusterAppRevisionControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("MultiClusterAppRevisionControllerMock.EnqueueFunc: method is nil but MultiClusterAppRevisionController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockMultiClusterAppRevisionControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockMultiClusterAppRevisionControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedMultiClusterAppRevisionController.EnqueueCalls()) +func (mock *MultiClusterAppRevisionControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockMultiClusterAppRevisionControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockMultiClusterAppRevisionControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *MultiClusterAppRevisionControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("MultiClusterAppRevisionControllerMock.GenericFunc: method is nil but MultiClusterAppRevisionController.Generic was just called") + } + callInfo := struct { + }{} + lockMultiClusterAppRevisionControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockMultiClusterAppRevisionControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedMultiClusterAppRevisionController.GenericCalls()) +func (mock *MultiClusterAppRevisionControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockMultiClusterAppRevisionControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockMultiClusterAppRevisionControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *MultiClusterAppRevisionControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("MultiClusterAppRevisionControllerMock.InformerFunc: method is nil but MultiClusterAppRevisionController.Informer was just called") + } + callInfo := struct { + }{} + lockMultiClusterAppRevisionControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockMultiClusterAppRevisionControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedMultiClusterAppRevisionController.InformerCalls()) +func (mock *MultiClusterAppRevisionControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockMultiClusterAppRevisionControllerMockInformer.RLock() + calls = mock.calls.Informer + lockMultiClusterAppRevisionControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *MultiClusterAppRevisionControllerMock) Lister() v3.MultiClusterAppRevisionLister { + if mock.ListerFunc == nil { + panic("MultiClusterAppRevisionControllerMock.ListerFunc: method is nil but MultiClusterAppRevisionController.Lister was just called") + } + callInfo := struct { + }{} + lockMultiClusterAppRevisionControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockMultiClusterAppRevisionControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedMultiClusterAppRevisionController.ListerCalls()) +func (mock *MultiClusterAppRevisionControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockMultiClusterAppRevisionControllerMockLister.RLock() + calls = mock.calls.Lister + lockMultiClusterAppRevisionControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *MultiClusterAppRevisionControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("MultiClusterAppRevisionControllerMock.StartFunc: method is nil but MultiClusterAppRevisionController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockMultiClusterAppRevisionControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockMultiClusterAppRevisionControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedMultiClusterAppRevisionController.StartCalls()) +func (mock *MultiClusterAppRevisionControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockMultiClusterAppRevisionControllerMockStart.RLock() + calls = mock.calls.Start + lockMultiClusterAppRevisionControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *MultiClusterAppRevisionControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("MultiClusterAppRevisionControllerMock.SyncFunc: method is nil but MultiClusterAppRevisionController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockMultiClusterAppRevisionControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockMultiClusterAppRevisionControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedMultiClusterAppRevisionController.SyncCalls()) +func (mock *MultiClusterAppRevisionControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockMultiClusterAppRevisionControllerMockSync.RLock() + calls = mock.calls.Sync + lockMultiClusterAppRevisionControllerMockSync.RUnlock() + return calls +} + +var ( + lockMultiClusterAppRevisionInterfaceMockAddClusterScopedHandler sync.RWMutex + lockMultiClusterAppRevisionInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockMultiClusterAppRevisionInterfaceMockAddHandler sync.RWMutex + lockMultiClusterAppRevisionInterfaceMockAddLifecycle sync.RWMutex + lockMultiClusterAppRevisionInterfaceMockController sync.RWMutex + lockMultiClusterAppRevisionInterfaceMockCreate sync.RWMutex + lockMultiClusterAppRevisionInterfaceMockDelete sync.RWMutex + lockMultiClusterAppRevisionInterfaceMockDeleteCollection sync.RWMutex + lockMultiClusterAppRevisionInterfaceMockDeleteNamespaced sync.RWMutex + lockMultiClusterAppRevisionInterfaceMockGet sync.RWMutex + lockMultiClusterAppRevisionInterfaceMockGetNamespaced sync.RWMutex + lockMultiClusterAppRevisionInterfaceMockList sync.RWMutex + lockMultiClusterAppRevisionInterfaceMockObjectClient sync.RWMutex + lockMultiClusterAppRevisionInterfaceMockUpdate sync.RWMutex + lockMultiClusterAppRevisionInterfaceMockWatch sync.RWMutex +) + +// Ensure, that MultiClusterAppRevisionInterfaceMock does implement MultiClusterAppRevisionInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.MultiClusterAppRevisionInterface = &MultiClusterAppRevisionInterfaceMock{} + +// MultiClusterAppRevisionInterfaceMock is a mock implementation of MultiClusterAppRevisionInterface. +// +// func TestSomethingThatUsesMultiClusterAppRevisionInterface(t *testing.T) { +// +// // make and configure a mocked MultiClusterAppRevisionInterface +// mockedMultiClusterAppRevisionInterface := &MultiClusterAppRevisionInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.MultiClusterAppRevisionHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.MultiClusterAppRevisionLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.MultiClusterAppRevisionHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.MultiClusterAppRevisionLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.MultiClusterAppRevisionController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.MultiClusterAppRevision) (*v3.MultiClusterAppRevision, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.MultiClusterAppRevision, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.MultiClusterAppRevision, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.MultiClusterAppRevisionList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.MultiClusterAppRevision) (*v3.MultiClusterAppRevision, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedMultiClusterAppRevisionInterface in code that requires MultiClusterAppRevisionInterface +// // and then make assertions. +// +// } +type MultiClusterAppRevisionInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.MultiClusterAppRevisionHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.MultiClusterAppRevisionLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.MultiClusterAppRevisionHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.MultiClusterAppRevisionLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.MultiClusterAppRevisionController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.MultiClusterAppRevision) (*v3.MultiClusterAppRevision, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.MultiClusterAppRevision, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.MultiClusterAppRevision, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.MultiClusterAppRevisionList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.MultiClusterAppRevision) (*v3.MultiClusterAppRevision, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.MultiClusterAppRevisionHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.MultiClusterAppRevisionLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.MultiClusterAppRevisionHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.MultiClusterAppRevisionLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.MultiClusterAppRevision + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.MultiClusterAppRevision + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *MultiClusterAppRevisionInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.MultiClusterAppRevisionHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("MultiClusterAppRevisionInterfaceMock.AddClusterScopedHandlerFunc: method is nil but MultiClusterAppRevisionInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.MultiClusterAppRevisionHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockMultiClusterAppRevisionInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockMultiClusterAppRevisionInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedMultiClusterAppRevisionInterface.AddClusterScopedHandlerCalls()) +func (mock *MultiClusterAppRevisionInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.MultiClusterAppRevisionHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.MultiClusterAppRevisionHandlerFunc + } + lockMultiClusterAppRevisionInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockMultiClusterAppRevisionInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *MultiClusterAppRevisionInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.MultiClusterAppRevisionLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("MultiClusterAppRevisionInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but MultiClusterAppRevisionInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.MultiClusterAppRevisionLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockMultiClusterAppRevisionInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockMultiClusterAppRevisionInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedMultiClusterAppRevisionInterface.AddClusterScopedLifecycleCalls()) +func (mock *MultiClusterAppRevisionInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.MultiClusterAppRevisionLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.MultiClusterAppRevisionLifecycle + } + lockMultiClusterAppRevisionInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockMultiClusterAppRevisionInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *MultiClusterAppRevisionInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.MultiClusterAppRevisionHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("MultiClusterAppRevisionInterfaceMock.AddHandlerFunc: method is nil but MultiClusterAppRevisionInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.MultiClusterAppRevisionHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockMultiClusterAppRevisionInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockMultiClusterAppRevisionInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedMultiClusterAppRevisionInterface.AddHandlerCalls()) +func (mock *MultiClusterAppRevisionInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.MultiClusterAppRevisionHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.MultiClusterAppRevisionHandlerFunc + } + lockMultiClusterAppRevisionInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockMultiClusterAppRevisionInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *MultiClusterAppRevisionInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.MultiClusterAppRevisionLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("MultiClusterAppRevisionInterfaceMock.AddLifecycleFunc: method is nil but MultiClusterAppRevisionInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.MultiClusterAppRevisionLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockMultiClusterAppRevisionInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockMultiClusterAppRevisionInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedMultiClusterAppRevisionInterface.AddLifecycleCalls()) +func (mock *MultiClusterAppRevisionInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.MultiClusterAppRevisionLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.MultiClusterAppRevisionLifecycle + } + lockMultiClusterAppRevisionInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockMultiClusterAppRevisionInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *MultiClusterAppRevisionInterfaceMock) Controller() v3.MultiClusterAppRevisionController { + if mock.ControllerFunc == nil { + panic("MultiClusterAppRevisionInterfaceMock.ControllerFunc: method is nil but MultiClusterAppRevisionInterface.Controller was just called") + } + callInfo := struct { + }{} + lockMultiClusterAppRevisionInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockMultiClusterAppRevisionInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedMultiClusterAppRevisionInterface.ControllerCalls()) +func (mock *MultiClusterAppRevisionInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockMultiClusterAppRevisionInterfaceMockController.RLock() + calls = mock.calls.Controller + lockMultiClusterAppRevisionInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *MultiClusterAppRevisionInterfaceMock) Create(in1 *v3.MultiClusterAppRevision) (*v3.MultiClusterAppRevision, error) { + if mock.CreateFunc == nil { + panic("MultiClusterAppRevisionInterfaceMock.CreateFunc: method is nil but MultiClusterAppRevisionInterface.Create was just called") + } + callInfo := struct { + In1 *v3.MultiClusterAppRevision + }{ + In1: in1, + } + lockMultiClusterAppRevisionInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockMultiClusterAppRevisionInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedMultiClusterAppRevisionInterface.CreateCalls()) +func (mock *MultiClusterAppRevisionInterfaceMock) CreateCalls() []struct { + In1 *v3.MultiClusterAppRevision +} { + var calls []struct { + In1 *v3.MultiClusterAppRevision + } + lockMultiClusterAppRevisionInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockMultiClusterAppRevisionInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *MultiClusterAppRevisionInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("MultiClusterAppRevisionInterfaceMock.DeleteFunc: method is nil but MultiClusterAppRevisionInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockMultiClusterAppRevisionInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockMultiClusterAppRevisionInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedMultiClusterAppRevisionInterface.DeleteCalls()) +func (mock *MultiClusterAppRevisionInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockMultiClusterAppRevisionInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockMultiClusterAppRevisionInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *MultiClusterAppRevisionInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("MultiClusterAppRevisionInterfaceMock.DeleteCollectionFunc: method is nil but MultiClusterAppRevisionInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockMultiClusterAppRevisionInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockMultiClusterAppRevisionInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedMultiClusterAppRevisionInterface.DeleteCollectionCalls()) +func (mock *MultiClusterAppRevisionInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockMultiClusterAppRevisionInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockMultiClusterAppRevisionInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *MultiClusterAppRevisionInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("MultiClusterAppRevisionInterfaceMock.DeleteNamespacedFunc: method is nil but MultiClusterAppRevisionInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockMultiClusterAppRevisionInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockMultiClusterAppRevisionInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedMultiClusterAppRevisionInterface.DeleteNamespacedCalls()) +func (mock *MultiClusterAppRevisionInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockMultiClusterAppRevisionInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockMultiClusterAppRevisionInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *MultiClusterAppRevisionInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.MultiClusterAppRevision, error) { + if mock.GetFunc == nil { + panic("MultiClusterAppRevisionInterfaceMock.GetFunc: method is nil but MultiClusterAppRevisionInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockMultiClusterAppRevisionInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockMultiClusterAppRevisionInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedMultiClusterAppRevisionInterface.GetCalls()) +func (mock *MultiClusterAppRevisionInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockMultiClusterAppRevisionInterfaceMockGet.RLock() + calls = mock.calls.Get + lockMultiClusterAppRevisionInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *MultiClusterAppRevisionInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.MultiClusterAppRevision, error) { + if mock.GetNamespacedFunc == nil { + panic("MultiClusterAppRevisionInterfaceMock.GetNamespacedFunc: method is nil but MultiClusterAppRevisionInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockMultiClusterAppRevisionInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockMultiClusterAppRevisionInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedMultiClusterAppRevisionInterface.GetNamespacedCalls()) +func (mock *MultiClusterAppRevisionInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockMultiClusterAppRevisionInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockMultiClusterAppRevisionInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *MultiClusterAppRevisionInterfaceMock) List(opts v1.ListOptions) (*v3.MultiClusterAppRevisionList, error) { + if mock.ListFunc == nil { + panic("MultiClusterAppRevisionInterfaceMock.ListFunc: method is nil but MultiClusterAppRevisionInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockMultiClusterAppRevisionInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockMultiClusterAppRevisionInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedMultiClusterAppRevisionInterface.ListCalls()) +func (mock *MultiClusterAppRevisionInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockMultiClusterAppRevisionInterfaceMockList.RLock() + calls = mock.calls.List + lockMultiClusterAppRevisionInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *MultiClusterAppRevisionInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("MultiClusterAppRevisionInterfaceMock.ObjectClientFunc: method is nil but MultiClusterAppRevisionInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockMultiClusterAppRevisionInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockMultiClusterAppRevisionInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedMultiClusterAppRevisionInterface.ObjectClientCalls()) +func (mock *MultiClusterAppRevisionInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockMultiClusterAppRevisionInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockMultiClusterAppRevisionInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *MultiClusterAppRevisionInterfaceMock) Update(in1 *v3.MultiClusterAppRevision) (*v3.MultiClusterAppRevision, error) { + if mock.UpdateFunc == nil { + panic("MultiClusterAppRevisionInterfaceMock.UpdateFunc: method is nil but MultiClusterAppRevisionInterface.Update was just called") + } + callInfo := struct { + In1 *v3.MultiClusterAppRevision + }{ + In1: in1, + } + lockMultiClusterAppRevisionInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockMultiClusterAppRevisionInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedMultiClusterAppRevisionInterface.UpdateCalls()) +func (mock *MultiClusterAppRevisionInterfaceMock) UpdateCalls() []struct { + In1 *v3.MultiClusterAppRevision +} { + var calls []struct { + In1 *v3.MultiClusterAppRevision + } + lockMultiClusterAppRevisionInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockMultiClusterAppRevisionInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *MultiClusterAppRevisionInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("MultiClusterAppRevisionInterfaceMock.WatchFunc: method is nil but MultiClusterAppRevisionInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockMultiClusterAppRevisionInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockMultiClusterAppRevisionInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedMultiClusterAppRevisionInterface.WatchCalls()) +func (mock *MultiClusterAppRevisionInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockMultiClusterAppRevisionInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockMultiClusterAppRevisionInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockMultiClusterAppRevisionsGetterMockMultiClusterAppRevisions sync.RWMutex +) + +// Ensure, that MultiClusterAppRevisionsGetterMock does implement MultiClusterAppRevisionsGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.MultiClusterAppRevisionsGetter = &MultiClusterAppRevisionsGetterMock{} + +// MultiClusterAppRevisionsGetterMock is a mock implementation of MultiClusterAppRevisionsGetter. +// +// func TestSomethingThatUsesMultiClusterAppRevisionsGetter(t *testing.T) { +// +// // make and configure a mocked MultiClusterAppRevisionsGetter +// mockedMultiClusterAppRevisionsGetter := &MultiClusterAppRevisionsGetterMock{ +// MultiClusterAppRevisionsFunc: func(namespace string) v3.MultiClusterAppRevisionInterface { +// panic("mock out the MultiClusterAppRevisions method") +// }, +// } +// +// // use mockedMultiClusterAppRevisionsGetter in code that requires MultiClusterAppRevisionsGetter +// // and then make assertions. +// +// } +type MultiClusterAppRevisionsGetterMock struct { + // MultiClusterAppRevisionsFunc mocks the MultiClusterAppRevisions method. + MultiClusterAppRevisionsFunc func(namespace string) v3.MultiClusterAppRevisionInterface + + // calls tracks calls to the methods. + calls struct { + // MultiClusterAppRevisions holds details about calls to the MultiClusterAppRevisions method. + MultiClusterAppRevisions []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// MultiClusterAppRevisions calls MultiClusterAppRevisionsFunc. +func (mock *MultiClusterAppRevisionsGetterMock) MultiClusterAppRevisions(namespace string) v3.MultiClusterAppRevisionInterface { + if mock.MultiClusterAppRevisionsFunc == nil { + panic("MultiClusterAppRevisionsGetterMock.MultiClusterAppRevisionsFunc: method is nil but MultiClusterAppRevisionsGetter.MultiClusterAppRevisions was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockMultiClusterAppRevisionsGetterMockMultiClusterAppRevisions.Lock() + mock.calls.MultiClusterAppRevisions = append(mock.calls.MultiClusterAppRevisions, callInfo) + lockMultiClusterAppRevisionsGetterMockMultiClusterAppRevisions.Unlock() + return mock.MultiClusterAppRevisionsFunc(namespace) +} + +// MultiClusterAppRevisionsCalls gets all the calls that were made to MultiClusterAppRevisions. +// Check the length with: +// len(mockedMultiClusterAppRevisionsGetter.MultiClusterAppRevisionsCalls()) +func (mock *MultiClusterAppRevisionsGetterMock) MultiClusterAppRevisionsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockMultiClusterAppRevisionsGetterMockMultiClusterAppRevisions.RLock() + calls = mock.calls.MultiClusterAppRevisions + lockMultiClusterAppRevisionsGetterMockMultiClusterAppRevisions.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_node_driver_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_node_driver_mock_test.go new file mode 100644 index 00000000..75c68616 --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_node_driver_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockNodeDriverListerMockGet sync.RWMutex + lockNodeDriverListerMockList sync.RWMutex +) + +// Ensure, that NodeDriverListerMock does implement NodeDriverLister. +// If this is not the case, regenerate this file with moq. +var _ v3.NodeDriverLister = &NodeDriverListerMock{} + +// NodeDriverListerMock is a mock implementation of NodeDriverLister. +// +// func TestSomethingThatUsesNodeDriverLister(t *testing.T) { +// +// // make and configure a mocked NodeDriverLister +// mockedNodeDriverLister := &NodeDriverListerMock{ +// GetFunc: func(namespace string, name string) (*v3.NodeDriver, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.NodeDriver, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedNodeDriverLister in code that requires NodeDriverLister +// // and then make assertions. +// +// } +type NodeDriverListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.NodeDriver, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.NodeDriver, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *NodeDriverListerMock) Get(namespace string, name string) (*v3.NodeDriver, error) { + if mock.GetFunc == nil { + panic("NodeDriverListerMock.GetFunc: method is nil but NodeDriverLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockNodeDriverListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockNodeDriverListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedNodeDriverLister.GetCalls()) +func (mock *NodeDriverListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockNodeDriverListerMockGet.RLock() + calls = mock.calls.Get + lockNodeDriverListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *NodeDriverListerMock) List(namespace string, selector labels.Selector) ([]*v3.NodeDriver, error) { + if mock.ListFunc == nil { + panic("NodeDriverListerMock.ListFunc: method is nil but NodeDriverLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockNodeDriverListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockNodeDriverListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedNodeDriverLister.ListCalls()) +func (mock *NodeDriverListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockNodeDriverListerMockList.RLock() + calls = mock.calls.List + lockNodeDriverListerMockList.RUnlock() + return calls +} + +var ( + lockNodeDriverControllerMockAddClusterScopedHandler sync.RWMutex + lockNodeDriverControllerMockAddHandler sync.RWMutex + lockNodeDriverControllerMockEnqueue sync.RWMutex + lockNodeDriverControllerMockGeneric sync.RWMutex + lockNodeDriverControllerMockInformer sync.RWMutex + lockNodeDriverControllerMockLister sync.RWMutex + lockNodeDriverControllerMockStart sync.RWMutex + lockNodeDriverControllerMockSync sync.RWMutex +) + +// Ensure, that NodeDriverControllerMock does implement NodeDriverController. +// If this is not the case, regenerate this file with moq. +var _ v3.NodeDriverController = &NodeDriverControllerMock{} + +// NodeDriverControllerMock is a mock implementation of NodeDriverController. +// +// func TestSomethingThatUsesNodeDriverController(t *testing.T) { +// +// // make and configure a mocked NodeDriverController +// mockedNodeDriverController := &NodeDriverControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.NodeDriverHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.NodeDriverHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.NodeDriverLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedNodeDriverController in code that requires NodeDriverController +// // and then make assertions. +// +// } +type NodeDriverControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.NodeDriverHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.NodeDriverHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.NodeDriverLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.NodeDriverHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.NodeDriverHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *NodeDriverControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.NodeDriverHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("NodeDriverControllerMock.AddClusterScopedHandlerFunc: method is nil but NodeDriverController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.NodeDriverHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockNodeDriverControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockNodeDriverControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedNodeDriverController.AddClusterScopedHandlerCalls()) +func (mock *NodeDriverControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.NodeDriverHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.NodeDriverHandlerFunc + } + lockNodeDriverControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockNodeDriverControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *NodeDriverControllerMock) AddHandler(ctx context.Context, name string, handler v3.NodeDriverHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("NodeDriverControllerMock.AddHandlerFunc: method is nil but NodeDriverController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.NodeDriverHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockNodeDriverControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockNodeDriverControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedNodeDriverController.AddHandlerCalls()) +func (mock *NodeDriverControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.NodeDriverHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.NodeDriverHandlerFunc + } + lockNodeDriverControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockNodeDriverControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *NodeDriverControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("NodeDriverControllerMock.EnqueueFunc: method is nil but NodeDriverController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockNodeDriverControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockNodeDriverControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedNodeDriverController.EnqueueCalls()) +func (mock *NodeDriverControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockNodeDriverControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockNodeDriverControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *NodeDriverControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("NodeDriverControllerMock.GenericFunc: method is nil but NodeDriverController.Generic was just called") + } + callInfo := struct { + }{} + lockNodeDriverControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockNodeDriverControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedNodeDriverController.GenericCalls()) +func (mock *NodeDriverControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockNodeDriverControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockNodeDriverControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *NodeDriverControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("NodeDriverControllerMock.InformerFunc: method is nil but NodeDriverController.Informer was just called") + } + callInfo := struct { + }{} + lockNodeDriverControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockNodeDriverControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedNodeDriverController.InformerCalls()) +func (mock *NodeDriverControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockNodeDriverControllerMockInformer.RLock() + calls = mock.calls.Informer + lockNodeDriverControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *NodeDriverControllerMock) Lister() v3.NodeDriverLister { + if mock.ListerFunc == nil { + panic("NodeDriverControllerMock.ListerFunc: method is nil but NodeDriverController.Lister was just called") + } + callInfo := struct { + }{} + lockNodeDriverControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockNodeDriverControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedNodeDriverController.ListerCalls()) +func (mock *NodeDriverControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockNodeDriverControllerMockLister.RLock() + calls = mock.calls.Lister + lockNodeDriverControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *NodeDriverControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("NodeDriverControllerMock.StartFunc: method is nil but NodeDriverController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockNodeDriverControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockNodeDriverControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedNodeDriverController.StartCalls()) +func (mock *NodeDriverControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockNodeDriverControllerMockStart.RLock() + calls = mock.calls.Start + lockNodeDriverControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *NodeDriverControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("NodeDriverControllerMock.SyncFunc: method is nil but NodeDriverController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockNodeDriverControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockNodeDriverControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedNodeDriverController.SyncCalls()) +func (mock *NodeDriverControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockNodeDriverControllerMockSync.RLock() + calls = mock.calls.Sync + lockNodeDriverControllerMockSync.RUnlock() + return calls +} + +var ( + lockNodeDriverInterfaceMockAddClusterScopedHandler sync.RWMutex + lockNodeDriverInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockNodeDriverInterfaceMockAddHandler sync.RWMutex + lockNodeDriverInterfaceMockAddLifecycle sync.RWMutex + lockNodeDriverInterfaceMockController sync.RWMutex + lockNodeDriverInterfaceMockCreate sync.RWMutex + lockNodeDriverInterfaceMockDelete sync.RWMutex + lockNodeDriverInterfaceMockDeleteCollection sync.RWMutex + lockNodeDriverInterfaceMockDeleteNamespaced sync.RWMutex + lockNodeDriverInterfaceMockGet sync.RWMutex + lockNodeDriverInterfaceMockGetNamespaced sync.RWMutex + lockNodeDriverInterfaceMockList sync.RWMutex + lockNodeDriverInterfaceMockObjectClient sync.RWMutex + lockNodeDriverInterfaceMockUpdate sync.RWMutex + lockNodeDriverInterfaceMockWatch sync.RWMutex +) + +// Ensure, that NodeDriverInterfaceMock does implement NodeDriverInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.NodeDriverInterface = &NodeDriverInterfaceMock{} + +// NodeDriverInterfaceMock is a mock implementation of NodeDriverInterface. +// +// func TestSomethingThatUsesNodeDriverInterface(t *testing.T) { +// +// // make and configure a mocked NodeDriverInterface +// mockedNodeDriverInterface := &NodeDriverInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.NodeDriverHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.NodeDriverLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.NodeDriverHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.NodeDriverLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.NodeDriverController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.NodeDriver) (*v3.NodeDriver, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.NodeDriver, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.NodeDriver, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.NodeDriverList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.NodeDriver) (*v3.NodeDriver, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedNodeDriverInterface in code that requires NodeDriverInterface +// // and then make assertions. +// +// } +type NodeDriverInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.NodeDriverHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.NodeDriverLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.NodeDriverHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.NodeDriverLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.NodeDriverController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.NodeDriver) (*v3.NodeDriver, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.NodeDriver, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.NodeDriver, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.NodeDriverList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.NodeDriver) (*v3.NodeDriver, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.NodeDriverHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.NodeDriverLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.NodeDriverHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.NodeDriverLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.NodeDriver + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.NodeDriver + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *NodeDriverInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.NodeDriverHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("NodeDriverInterfaceMock.AddClusterScopedHandlerFunc: method is nil but NodeDriverInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.NodeDriverHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockNodeDriverInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockNodeDriverInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedNodeDriverInterface.AddClusterScopedHandlerCalls()) +func (mock *NodeDriverInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.NodeDriverHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.NodeDriverHandlerFunc + } + lockNodeDriverInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockNodeDriverInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *NodeDriverInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.NodeDriverLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("NodeDriverInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but NodeDriverInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.NodeDriverLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockNodeDriverInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockNodeDriverInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedNodeDriverInterface.AddClusterScopedLifecycleCalls()) +func (mock *NodeDriverInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.NodeDriverLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.NodeDriverLifecycle + } + lockNodeDriverInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockNodeDriverInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *NodeDriverInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.NodeDriverHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("NodeDriverInterfaceMock.AddHandlerFunc: method is nil but NodeDriverInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.NodeDriverHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockNodeDriverInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockNodeDriverInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedNodeDriverInterface.AddHandlerCalls()) +func (mock *NodeDriverInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.NodeDriverHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.NodeDriverHandlerFunc + } + lockNodeDriverInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockNodeDriverInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *NodeDriverInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.NodeDriverLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("NodeDriverInterfaceMock.AddLifecycleFunc: method is nil but NodeDriverInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.NodeDriverLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockNodeDriverInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockNodeDriverInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedNodeDriverInterface.AddLifecycleCalls()) +func (mock *NodeDriverInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.NodeDriverLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.NodeDriverLifecycle + } + lockNodeDriverInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockNodeDriverInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *NodeDriverInterfaceMock) Controller() v3.NodeDriverController { + if mock.ControllerFunc == nil { + panic("NodeDriverInterfaceMock.ControllerFunc: method is nil but NodeDriverInterface.Controller was just called") + } + callInfo := struct { + }{} + lockNodeDriverInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockNodeDriverInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedNodeDriverInterface.ControllerCalls()) +func (mock *NodeDriverInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockNodeDriverInterfaceMockController.RLock() + calls = mock.calls.Controller + lockNodeDriverInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *NodeDriverInterfaceMock) Create(in1 *v3.NodeDriver) (*v3.NodeDriver, error) { + if mock.CreateFunc == nil { + panic("NodeDriverInterfaceMock.CreateFunc: method is nil but NodeDriverInterface.Create was just called") + } + callInfo := struct { + In1 *v3.NodeDriver + }{ + In1: in1, + } + lockNodeDriverInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockNodeDriverInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedNodeDriverInterface.CreateCalls()) +func (mock *NodeDriverInterfaceMock) CreateCalls() []struct { + In1 *v3.NodeDriver +} { + var calls []struct { + In1 *v3.NodeDriver + } + lockNodeDriverInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockNodeDriverInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *NodeDriverInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("NodeDriverInterfaceMock.DeleteFunc: method is nil but NodeDriverInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockNodeDriverInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockNodeDriverInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedNodeDriverInterface.DeleteCalls()) +func (mock *NodeDriverInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockNodeDriverInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockNodeDriverInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *NodeDriverInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("NodeDriverInterfaceMock.DeleteCollectionFunc: method is nil but NodeDriverInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockNodeDriverInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockNodeDriverInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedNodeDriverInterface.DeleteCollectionCalls()) +func (mock *NodeDriverInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockNodeDriverInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockNodeDriverInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *NodeDriverInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("NodeDriverInterfaceMock.DeleteNamespacedFunc: method is nil but NodeDriverInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockNodeDriverInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockNodeDriverInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedNodeDriverInterface.DeleteNamespacedCalls()) +func (mock *NodeDriverInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockNodeDriverInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockNodeDriverInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *NodeDriverInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.NodeDriver, error) { + if mock.GetFunc == nil { + panic("NodeDriverInterfaceMock.GetFunc: method is nil but NodeDriverInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockNodeDriverInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockNodeDriverInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedNodeDriverInterface.GetCalls()) +func (mock *NodeDriverInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockNodeDriverInterfaceMockGet.RLock() + calls = mock.calls.Get + lockNodeDriverInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *NodeDriverInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.NodeDriver, error) { + if mock.GetNamespacedFunc == nil { + panic("NodeDriverInterfaceMock.GetNamespacedFunc: method is nil but NodeDriverInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockNodeDriverInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockNodeDriverInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedNodeDriverInterface.GetNamespacedCalls()) +func (mock *NodeDriverInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockNodeDriverInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockNodeDriverInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *NodeDriverInterfaceMock) List(opts v1.ListOptions) (*v3.NodeDriverList, error) { + if mock.ListFunc == nil { + panic("NodeDriverInterfaceMock.ListFunc: method is nil but NodeDriverInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockNodeDriverInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockNodeDriverInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedNodeDriverInterface.ListCalls()) +func (mock *NodeDriverInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockNodeDriverInterfaceMockList.RLock() + calls = mock.calls.List + lockNodeDriverInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *NodeDriverInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("NodeDriverInterfaceMock.ObjectClientFunc: method is nil but NodeDriverInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockNodeDriverInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockNodeDriverInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedNodeDriverInterface.ObjectClientCalls()) +func (mock *NodeDriverInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockNodeDriverInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockNodeDriverInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *NodeDriverInterfaceMock) Update(in1 *v3.NodeDriver) (*v3.NodeDriver, error) { + if mock.UpdateFunc == nil { + panic("NodeDriverInterfaceMock.UpdateFunc: method is nil but NodeDriverInterface.Update was just called") + } + callInfo := struct { + In1 *v3.NodeDriver + }{ + In1: in1, + } + lockNodeDriverInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockNodeDriverInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedNodeDriverInterface.UpdateCalls()) +func (mock *NodeDriverInterfaceMock) UpdateCalls() []struct { + In1 *v3.NodeDriver +} { + var calls []struct { + In1 *v3.NodeDriver + } + lockNodeDriverInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockNodeDriverInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *NodeDriverInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("NodeDriverInterfaceMock.WatchFunc: method is nil but NodeDriverInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockNodeDriverInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockNodeDriverInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedNodeDriverInterface.WatchCalls()) +func (mock *NodeDriverInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockNodeDriverInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockNodeDriverInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockNodeDriversGetterMockNodeDrivers sync.RWMutex +) + +// Ensure, that NodeDriversGetterMock does implement NodeDriversGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.NodeDriversGetter = &NodeDriversGetterMock{} + +// NodeDriversGetterMock is a mock implementation of NodeDriversGetter. +// +// func TestSomethingThatUsesNodeDriversGetter(t *testing.T) { +// +// // make and configure a mocked NodeDriversGetter +// mockedNodeDriversGetter := &NodeDriversGetterMock{ +// NodeDriversFunc: func(namespace string) v3.NodeDriverInterface { +// panic("mock out the NodeDrivers method") +// }, +// } +// +// // use mockedNodeDriversGetter in code that requires NodeDriversGetter +// // and then make assertions. +// +// } +type NodeDriversGetterMock struct { + // NodeDriversFunc mocks the NodeDrivers method. + NodeDriversFunc func(namespace string) v3.NodeDriverInterface + + // calls tracks calls to the methods. + calls struct { + // NodeDrivers holds details about calls to the NodeDrivers method. + NodeDrivers []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// NodeDrivers calls NodeDriversFunc. +func (mock *NodeDriversGetterMock) NodeDrivers(namespace string) v3.NodeDriverInterface { + if mock.NodeDriversFunc == nil { + panic("NodeDriversGetterMock.NodeDriversFunc: method is nil but NodeDriversGetter.NodeDrivers was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockNodeDriversGetterMockNodeDrivers.Lock() + mock.calls.NodeDrivers = append(mock.calls.NodeDrivers, callInfo) + lockNodeDriversGetterMockNodeDrivers.Unlock() + return mock.NodeDriversFunc(namespace) +} + +// NodeDriversCalls gets all the calls that were made to NodeDrivers. +// Check the length with: +// len(mockedNodeDriversGetter.NodeDriversCalls()) +func (mock *NodeDriversGetterMock) NodeDriversCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockNodeDriversGetterMockNodeDrivers.RLock() + calls = mock.calls.NodeDrivers + lockNodeDriversGetterMockNodeDrivers.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_node_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_node_mock_test.go new file mode 100644 index 00000000..431e688e --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_node_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockNodeListerMockGet sync.RWMutex + lockNodeListerMockList sync.RWMutex +) + +// Ensure, that NodeListerMock does implement NodeLister. +// If this is not the case, regenerate this file with moq. +var _ v3.NodeLister = &NodeListerMock{} + +// NodeListerMock is a mock implementation of NodeLister. +// +// func TestSomethingThatUsesNodeLister(t *testing.T) { +// +// // make and configure a mocked NodeLister +// mockedNodeLister := &NodeListerMock{ +// GetFunc: func(namespace string, name string) (*v3.Node, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.Node, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedNodeLister in code that requires NodeLister +// // and then make assertions. +// +// } +type NodeListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.Node, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.Node, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *NodeListerMock) Get(namespace string, name string) (*v3.Node, error) { + if mock.GetFunc == nil { + panic("NodeListerMock.GetFunc: method is nil but NodeLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockNodeListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockNodeListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedNodeLister.GetCalls()) +func (mock *NodeListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockNodeListerMockGet.RLock() + calls = mock.calls.Get + lockNodeListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *NodeListerMock) List(namespace string, selector labels.Selector) ([]*v3.Node, error) { + if mock.ListFunc == nil { + panic("NodeListerMock.ListFunc: method is nil but NodeLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockNodeListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockNodeListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedNodeLister.ListCalls()) +func (mock *NodeListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockNodeListerMockList.RLock() + calls = mock.calls.List + lockNodeListerMockList.RUnlock() + return calls +} + +var ( + lockNodeControllerMockAddClusterScopedHandler sync.RWMutex + lockNodeControllerMockAddHandler sync.RWMutex + lockNodeControllerMockEnqueue sync.RWMutex + lockNodeControllerMockGeneric sync.RWMutex + lockNodeControllerMockInformer sync.RWMutex + lockNodeControllerMockLister sync.RWMutex + lockNodeControllerMockStart sync.RWMutex + lockNodeControllerMockSync sync.RWMutex +) + +// Ensure, that NodeControllerMock does implement NodeController. +// If this is not the case, regenerate this file with moq. +var _ v3.NodeController = &NodeControllerMock{} + +// NodeControllerMock is a mock implementation of NodeController. +// +// func TestSomethingThatUsesNodeController(t *testing.T) { +// +// // make and configure a mocked NodeController +// mockedNodeController := &NodeControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.NodeHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.NodeHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.NodeLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedNodeController in code that requires NodeController +// // and then make assertions. +// +// } +type NodeControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.NodeHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.NodeHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.NodeLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.NodeHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.NodeHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *NodeControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.NodeHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("NodeControllerMock.AddClusterScopedHandlerFunc: method is nil but NodeController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.NodeHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockNodeControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockNodeControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedNodeController.AddClusterScopedHandlerCalls()) +func (mock *NodeControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.NodeHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.NodeHandlerFunc + } + lockNodeControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockNodeControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *NodeControllerMock) AddHandler(ctx context.Context, name string, handler v3.NodeHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("NodeControllerMock.AddHandlerFunc: method is nil but NodeController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.NodeHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockNodeControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockNodeControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedNodeController.AddHandlerCalls()) +func (mock *NodeControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.NodeHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.NodeHandlerFunc + } + lockNodeControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockNodeControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *NodeControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("NodeControllerMock.EnqueueFunc: method is nil but NodeController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockNodeControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockNodeControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedNodeController.EnqueueCalls()) +func (mock *NodeControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockNodeControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockNodeControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *NodeControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("NodeControllerMock.GenericFunc: method is nil but NodeController.Generic was just called") + } + callInfo := struct { + }{} + lockNodeControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockNodeControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedNodeController.GenericCalls()) +func (mock *NodeControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockNodeControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockNodeControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *NodeControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("NodeControllerMock.InformerFunc: method is nil but NodeController.Informer was just called") + } + callInfo := struct { + }{} + lockNodeControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockNodeControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedNodeController.InformerCalls()) +func (mock *NodeControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockNodeControllerMockInformer.RLock() + calls = mock.calls.Informer + lockNodeControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *NodeControllerMock) Lister() v3.NodeLister { + if mock.ListerFunc == nil { + panic("NodeControllerMock.ListerFunc: method is nil but NodeController.Lister was just called") + } + callInfo := struct { + }{} + lockNodeControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockNodeControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedNodeController.ListerCalls()) +func (mock *NodeControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockNodeControllerMockLister.RLock() + calls = mock.calls.Lister + lockNodeControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *NodeControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("NodeControllerMock.StartFunc: method is nil but NodeController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockNodeControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockNodeControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedNodeController.StartCalls()) +func (mock *NodeControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockNodeControllerMockStart.RLock() + calls = mock.calls.Start + lockNodeControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *NodeControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("NodeControllerMock.SyncFunc: method is nil but NodeController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockNodeControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockNodeControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedNodeController.SyncCalls()) +func (mock *NodeControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockNodeControllerMockSync.RLock() + calls = mock.calls.Sync + lockNodeControllerMockSync.RUnlock() + return calls +} + +var ( + lockNodeInterfaceMockAddClusterScopedHandler sync.RWMutex + lockNodeInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockNodeInterfaceMockAddHandler sync.RWMutex + lockNodeInterfaceMockAddLifecycle sync.RWMutex + lockNodeInterfaceMockController sync.RWMutex + lockNodeInterfaceMockCreate sync.RWMutex + lockNodeInterfaceMockDelete sync.RWMutex + lockNodeInterfaceMockDeleteCollection sync.RWMutex + lockNodeInterfaceMockDeleteNamespaced sync.RWMutex + lockNodeInterfaceMockGet sync.RWMutex + lockNodeInterfaceMockGetNamespaced sync.RWMutex + lockNodeInterfaceMockList sync.RWMutex + lockNodeInterfaceMockObjectClient sync.RWMutex + lockNodeInterfaceMockUpdate sync.RWMutex + lockNodeInterfaceMockWatch sync.RWMutex +) + +// Ensure, that NodeInterfaceMock does implement NodeInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.NodeInterface = &NodeInterfaceMock{} + +// NodeInterfaceMock is a mock implementation of NodeInterface. +// +// func TestSomethingThatUsesNodeInterface(t *testing.T) { +// +// // make and configure a mocked NodeInterface +// mockedNodeInterface := &NodeInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.NodeHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.NodeLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.NodeHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.NodeLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.NodeController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.Node) (*v3.Node, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.Node, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.Node, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.NodeList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.Node) (*v3.Node, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedNodeInterface in code that requires NodeInterface +// // and then make assertions. +// +// } +type NodeInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.NodeHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.NodeLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.NodeHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.NodeLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.NodeController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.Node) (*v3.Node, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.Node, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.Node, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.NodeList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.Node) (*v3.Node, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.NodeHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.NodeLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.NodeHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.NodeLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.Node + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.Node + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *NodeInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.NodeHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("NodeInterfaceMock.AddClusterScopedHandlerFunc: method is nil but NodeInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.NodeHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockNodeInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockNodeInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedNodeInterface.AddClusterScopedHandlerCalls()) +func (mock *NodeInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.NodeHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.NodeHandlerFunc + } + lockNodeInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockNodeInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *NodeInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.NodeLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("NodeInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but NodeInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.NodeLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockNodeInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockNodeInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedNodeInterface.AddClusterScopedLifecycleCalls()) +func (mock *NodeInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.NodeLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.NodeLifecycle + } + lockNodeInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockNodeInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *NodeInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.NodeHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("NodeInterfaceMock.AddHandlerFunc: method is nil but NodeInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.NodeHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockNodeInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockNodeInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedNodeInterface.AddHandlerCalls()) +func (mock *NodeInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.NodeHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.NodeHandlerFunc + } + lockNodeInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockNodeInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *NodeInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.NodeLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("NodeInterfaceMock.AddLifecycleFunc: method is nil but NodeInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.NodeLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockNodeInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockNodeInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedNodeInterface.AddLifecycleCalls()) +func (mock *NodeInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.NodeLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.NodeLifecycle + } + lockNodeInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockNodeInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *NodeInterfaceMock) Controller() v3.NodeController { + if mock.ControllerFunc == nil { + panic("NodeInterfaceMock.ControllerFunc: method is nil but NodeInterface.Controller was just called") + } + callInfo := struct { + }{} + lockNodeInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockNodeInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedNodeInterface.ControllerCalls()) +func (mock *NodeInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockNodeInterfaceMockController.RLock() + calls = mock.calls.Controller + lockNodeInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *NodeInterfaceMock) Create(in1 *v3.Node) (*v3.Node, error) { + if mock.CreateFunc == nil { + panic("NodeInterfaceMock.CreateFunc: method is nil but NodeInterface.Create was just called") + } + callInfo := struct { + In1 *v3.Node + }{ + In1: in1, + } + lockNodeInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockNodeInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedNodeInterface.CreateCalls()) +func (mock *NodeInterfaceMock) CreateCalls() []struct { + In1 *v3.Node +} { + var calls []struct { + In1 *v3.Node + } + lockNodeInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockNodeInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *NodeInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("NodeInterfaceMock.DeleteFunc: method is nil but NodeInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockNodeInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockNodeInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedNodeInterface.DeleteCalls()) +func (mock *NodeInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockNodeInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockNodeInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *NodeInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("NodeInterfaceMock.DeleteCollectionFunc: method is nil but NodeInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockNodeInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockNodeInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedNodeInterface.DeleteCollectionCalls()) +func (mock *NodeInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockNodeInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockNodeInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *NodeInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("NodeInterfaceMock.DeleteNamespacedFunc: method is nil but NodeInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockNodeInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockNodeInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedNodeInterface.DeleteNamespacedCalls()) +func (mock *NodeInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockNodeInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockNodeInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *NodeInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.Node, error) { + if mock.GetFunc == nil { + panic("NodeInterfaceMock.GetFunc: method is nil but NodeInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockNodeInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockNodeInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedNodeInterface.GetCalls()) +func (mock *NodeInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockNodeInterfaceMockGet.RLock() + calls = mock.calls.Get + lockNodeInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *NodeInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.Node, error) { + if mock.GetNamespacedFunc == nil { + panic("NodeInterfaceMock.GetNamespacedFunc: method is nil but NodeInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockNodeInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockNodeInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedNodeInterface.GetNamespacedCalls()) +func (mock *NodeInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockNodeInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockNodeInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *NodeInterfaceMock) List(opts v1.ListOptions) (*v3.NodeList, error) { + if mock.ListFunc == nil { + panic("NodeInterfaceMock.ListFunc: method is nil but NodeInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockNodeInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockNodeInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedNodeInterface.ListCalls()) +func (mock *NodeInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockNodeInterfaceMockList.RLock() + calls = mock.calls.List + lockNodeInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *NodeInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("NodeInterfaceMock.ObjectClientFunc: method is nil but NodeInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockNodeInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockNodeInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedNodeInterface.ObjectClientCalls()) +func (mock *NodeInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockNodeInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockNodeInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *NodeInterfaceMock) Update(in1 *v3.Node) (*v3.Node, error) { + if mock.UpdateFunc == nil { + panic("NodeInterfaceMock.UpdateFunc: method is nil but NodeInterface.Update was just called") + } + callInfo := struct { + In1 *v3.Node + }{ + In1: in1, + } + lockNodeInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockNodeInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedNodeInterface.UpdateCalls()) +func (mock *NodeInterfaceMock) UpdateCalls() []struct { + In1 *v3.Node +} { + var calls []struct { + In1 *v3.Node + } + lockNodeInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockNodeInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *NodeInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("NodeInterfaceMock.WatchFunc: method is nil but NodeInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockNodeInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockNodeInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedNodeInterface.WatchCalls()) +func (mock *NodeInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockNodeInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockNodeInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockNodesGetterMockNodes sync.RWMutex +) + +// Ensure, that NodesGetterMock does implement NodesGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.NodesGetter = &NodesGetterMock{} + +// NodesGetterMock is a mock implementation of NodesGetter. +// +// func TestSomethingThatUsesNodesGetter(t *testing.T) { +// +// // make and configure a mocked NodesGetter +// mockedNodesGetter := &NodesGetterMock{ +// NodesFunc: func(namespace string) v3.NodeInterface { +// panic("mock out the Nodes method") +// }, +// } +// +// // use mockedNodesGetter in code that requires NodesGetter +// // and then make assertions. +// +// } +type NodesGetterMock struct { + // NodesFunc mocks the Nodes method. + NodesFunc func(namespace string) v3.NodeInterface + + // calls tracks calls to the methods. + calls struct { + // Nodes holds details about calls to the Nodes method. + Nodes []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// Nodes calls NodesFunc. +func (mock *NodesGetterMock) Nodes(namespace string) v3.NodeInterface { + if mock.NodesFunc == nil { + panic("NodesGetterMock.NodesFunc: method is nil but NodesGetter.Nodes was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockNodesGetterMockNodes.Lock() + mock.calls.Nodes = append(mock.calls.Nodes, callInfo) + lockNodesGetterMockNodes.Unlock() + return mock.NodesFunc(namespace) +} + +// NodesCalls gets all the calls that were made to Nodes. +// Check the length with: +// len(mockedNodesGetter.NodesCalls()) +func (mock *NodesGetterMock) NodesCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockNodesGetterMockNodes.RLock() + calls = mock.calls.Nodes + lockNodesGetterMockNodes.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_node_pool_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_node_pool_mock_test.go new file mode 100644 index 00000000..241359cf --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_node_pool_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockNodePoolListerMockGet sync.RWMutex + lockNodePoolListerMockList sync.RWMutex +) + +// Ensure, that NodePoolListerMock does implement NodePoolLister. +// If this is not the case, regenerate this file with moq. +var _ v3.NodePoolLister = &NodePoolListerMock{} + +// NodePoolListerMock is a mock implementation of NodePoolLister. +// +// func TestSomethingThatUsesNodePoolLister(t *testing.T) { +// +// // make and configure a mocked NodePoolLister +// mockedNodePoolLister := &NodePoolListerMock{ +// GetFunc: func(namespace string, name string) (*v3.NodePool, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.NodePool, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedNodePoolLister in code that requires NodePoolLister +// // and then make assertions. +// +// } +type NodePoolListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.NodePool, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.NodePool, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *NodePoolListerMock) Get(namespace string, name string) (*v3.NodePool, error) { + if mock.GetFunc == nil { + panic("NodePoolListerMock.GetFunc: method is nil but NodePoolLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockNodePoolListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockNodePoolListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedNodePoolLister.GetCalls()) +func (mock *NodePoolListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockNodePoolListerMockGet.RLock() + calls = mock.calls.Get + lockNodePoolListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *NodePoolListerMock) List(namespace string, selector labels.Selector) ([]*v3.NodePool, error) { + if mock.ListFunc == nil { + panic("NodePoolListerMock.ListFunc: method is nil but NodePoolLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockNodePoolListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockNodePoolListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedNodePoolLister.ListCalls()) +func (mock *NodePoolListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockNodePoolListerMockList.RLock() + calls = mock.calls.List + lockNodePoolListerMockList.RUnlock() + return calls +} + +var ( + lockNodePoolControllerMockAddClusterScopedHandler sync.RWMutex + lockNodePoolControllerMockAddHandler sync.RWMutex + lockNodePoolControllerMockEnqueue sync.RWMutex + lockNodePoolControllerMockGeneric sync.RWMutex + lockNodePoolControllerMockInformer sync.RWMutex + lockNodePoolControllerMockLister sync.RWMutex + lockNodePoolControllerMockStart sync.RWMutex + lockNodePoolControllerMockSync sync.RWMutex +) + +// Ensure, that NodePoolControllerMock does implement NodePoolController. +// If this is not the case, regenerate this file with moq. +var _ v3.NodePoolController = &NodePoolControllerMock{} + +// NodePoolControllerMock is a mock implementation of NodePoolController. +// +// func TestSomethingThatUsesNodePoolController(t *testing.T) { +// +// // make and configure a mocked NodePoolController +// mockedNodePoolController := &NodePoolControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.NodePoolHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.NodePoolHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.NodePoolLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedNodePoolController in code that requires NodePoolController +// // and then make assertions. +// +// } +type NodePoolControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.NodePoolHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.NodePoolHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.NodePoolLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.NodePoolHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.NodePoolHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *NodePoolControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.NodePoolHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("NodePoolControllerMock.AddClusterScopedHandlerFunc: method is nil but NodePoolController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.NodePoolHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockNodePoolControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockNodePoolControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedNodePoolController.AddClusterScopedHandlerCalls()) +func (mock *NodePoolControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.NodePoolHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.NodePoolHandlerFunc + } + lockNodePoolControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockNodePoolControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *NodePoolControllerMock) AddHandler(ctx context.Context, name string, handler v3.NodePoolHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("NodePoolControllerMock.AddHandlerFunc: method is nil but NodePoolController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.NodePoolHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockNodePoolControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockNodePoolControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedNodePoolController.AddHandlerCalls()) +func (mock *NodePoolControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.NodePoolHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.NodePoolHandlerFunc + } + lockNodePoolControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockNodePoolControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *NodePoolControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("NodePoolControllerMock.EnqueueFunc: method is nil but NodePoolController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockNodePoolControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockNodePoolControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedNodePoolController.EnqueueCalls()) +func (mock *NodePoolControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockNodePoolControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockNodePoolControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *NodePoolControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("NodePoolControllerMock.GenericFunc: method is nil but NodePoolController.Generic was just called") + } + callInfo := struct { + }{} + lockNodePoolControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockNodePoolControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedNodePoolController.GenericCalls()) +func (mock *NodePoolControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockNodePoolControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockNodePoolControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *NodePoolControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("NodePoolControllerMock.InformerFunc: method is nil but NodePoolController.Informer was just called") + } + callInfo := struct { + }{} + lockNodePoolControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockNodePoolControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedNodePoolController.InformerCalls()) +func (mock *NodePoolControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockNodePoolControllerMockInformer.RLock() + calls = mock.calls.Informer + lockNodePoolControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *NodePoolControllerMock) Lister() v3.NodePoolLister { + if mock.ListerFunc == nil { + panic("NodePoolControllerMock.ListerFunc: method is nil but NodePoolController.Lister was just called") + } + callInfo := struct { + }{} + lockNodePoolControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockNodePoolControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedNodePoolController.ListerCalls()) +func (mock *NodePoolControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockNodePoolControllerMockLister.RLock() + calls = mock.calls.Lister + lockNodePoolControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *NodePoolControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("NodePoolControllerMock.StartFunc: method is nil but NodePoolController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockNodePoolControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockNodePoolControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedNodePoolController.StartCalls()) +func (mock *NodePoolControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockNodePoolControllerMockStart.RLock() + calls = mock.calls.Start + lockNodePoolControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *NodePoolControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("NodePoolControllerMock.SyncFunc: method is nil but NodePoolController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockNodePoolControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockNodePoolControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedNodePoolController.SyncCalls()) +func (mock *NodePoolControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockNodePoolControllerMockSync.RLock() + calls = mock.calls.Sync + lockNodePoolControllerMockSync.RUnlock() + return calls +} + +var ( + lockNodePoolInterfaceMockAddClusterScopedHandler sync.RWMutex + lockNodePoolInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockNodePoolInterfaceMockAddHandler sync.RWMutex + lockNodePoolInterfaceMockAddLifecycle sync.RWMutex + lockNodePoolInterfaceMockController sync.RWMutex + lockNodePoolInterfaceMockCreate sync.RWMutex + lockNodePoolInterfaceMockDelete sync.RWMutex + lockNodePoolInterfaceMockDeleteCollection sync.RWMutex + lockNodePoolInterfaceMockDeleteNamespaced sync.RWMutex + lockNodePoolInterfaceMockGet sync.RWMutex + lockNodePoolInterfaceMockGetNamespaced sync.RWMutex + lockNodePoolInterfaceMockList sync.RWMutex + lockNodePoolInterfaceMockObjectClient sync.RWMutex + lockNodePoolInterfaceMockUpdate sync.RWMutex + lockNodePoolInterfaceMockWatch sync.RWMutex +) + +// Ensure, that NodePoolInterfaceMock does implement NodePoolInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.NodePoolInterface = &NodePoolInterfaceMock{} + +// NodePoolInterfaceMock is a mock implementation of NodePoolInterface. +// +// func TestSomethingThatUsesNodePoolInterface(t *testing.T) { +// +// // make and configure a mocked NodePoolInterface +// mockedNodePoolInterface := &NodePoolInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.NodePoolHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.NodePoolLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.NodePoolHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.NodePoolLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.NodePoolController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.NodePool) (*v3.NodePool, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.NodePool, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.NodePool, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.NodePoolList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.NodePool) (*v3.NodePool, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedNodePoolInterface in code that requires NodePoolInterface +// // and then make assertions. +// +// } +type NodePoolInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.NodePoolHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.NodePoolLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.NodePoolHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.NodePoolLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.NodePoolController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.NodePool) (*v3.NodePool, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.NodePool, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.NodePool, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.NodePoolList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.NodePool) (*v3.NodePool, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.NodePoolHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.NodePoolLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.NodePoolHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.NodePoolLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.NodePool + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.NodePool + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *NodePoolInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.NodePoolHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("NodePoolInterfaceMock.AddClusterScopedHandlerFunc: method is nil but NodePoolInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.NodePoolHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockNodePoolInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockNodePoolInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedNodePoolInterface.AddClusterScopedHandlerCalls()) +func (mock *NodePoolInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.NodePoolHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.NodePoolHandlerFunc + } + lockNodePoolInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockNodePoolInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *NodePoolInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.NodePoolLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("NodePoolInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but NodePoolInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.NodePoolLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockNodePoolInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockNodePoolInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedNodePoolInterface.AddClusterScopedLifecycleCalls()) +func (mock *NodePoolInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.NodePoolLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.NodePoolLifecycle + } + lockNodePoolInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockNodePoolInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *NodePoolInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.NodePoolHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("NodePoolInterfaceMock.AddHandlerFunc: method is nil but NodePoolInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.NodePoolHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockNodePoolInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockNodePoolInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedNodePoolInterface.AddHandlerCalls()) +func (mock *NodePoolInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.NodePoolHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.NodePoolHandlerFunc + } + lockNodePoolInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockNodePoolInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *NodePoolInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.NodePoolLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("NodePoolInterfaceMock.AddLifecycleFunc: method is nil but NodePoolInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.NodePoolLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockNodePoolInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockNodePoolInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedNodePoolInterface.AddLifecycleCalls()) +func (mock *NodePoolInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.NodePoolLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.NodePoolLifecycle + } + lockNodePoolInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockNodePoolInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *NodePoolInterfaceMock) Controller() v3.NodePoolController { + if mock.ControllerFunc == nil { + panic("NodePoolInterfaceMock.ControllerFunc: method is nil but NodePoolInterface.Controller was just called") + } + callInfo := struct { + }{} + lockNodePoolInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockNodePoolInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedNodePoolInterface.ControllerCalls()) +func (mock *NodePoolInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockNodePoolInterfaceMockController.RLock() + calls = mock.calls.Controller + lockNodePoolInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *NodePoolInterfaceMock) Create(in1 *v3.NodePool) (*v3.NodePool, error) { + if mock.CreateFunc == nil { + panic("NodePoolInterfaceMock.CreateFunc: method is nil but NodePoolInterface.Create was just called") + } + callInfo := struct { + In1 *v3.NodePool + }{ + In1: in1, + } + lockNodePoolInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockNodePoolInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedNodePoolInterface.CreateCalls()) +func (mock *NodePoolInterfaceMock) CreateCalls() []struct { + In1 *v3.NodePool +} { + var calls []struct { + In1 *v3.NodePool + } + lockNodePoolInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockNodePoolInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *NodePoolInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("NodePoolInterfaceMock.DeleteFunc: method is nil but NodePoolInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockNodePoolInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockNodePoolInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedNodePoolInterface.DeleteCalls()) +func (mock *NodePoolInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockNodePoolInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockNodePoolInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *NodePoolInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("NodePoolInterfaceMock.DeleteCollectionFunc: method is nil but NodePoolInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockNodePoolInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockNodePoolInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedNodePoolInterface.DeleteCollectionCalls()) +func (mock *NodePoolInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockNodePoolInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockNodePoolInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *NodePoolInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("NodePoolInterfaceMock.DeleteNamespacedFunc: method is nil but NodePoolInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockNodePoolInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockNodePoolInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedNodePoolInterface.DeleteNamespacedCalls()) +func (mock *NodePoolInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockNodePoolInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockNodePoolInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *NodePoolInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.NodePool, error) { + if mock.GetFunc == nil { + panic("NodePoolInterfaceMock.GetFunc: method is nil but NodePoolInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockNodePoolInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockNodePoolInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedNodePoolInterface.GetCalls()) +func (mock *NodePoolInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockNodePoolInterfaceMockGet.RLock() + calls = mock.calls.Get + lockNodePoolInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *NodePoolInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.NodePool, error) { + if mock.GetNamespacedFunc == nil { + panic("NodePoolInterfaceMock.GetNamespacedFunc: method is nil but NodePoolInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockNodePoolInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockNodePoolInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedNodePoolInterface.GetNamespacedCalls()) +func (mock *NodePoolInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockNodePoolInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockNodePoolInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *NodePoolInterfaceMock) List(opts v1.ListOptions) (*v3.NodePoolList, error) { + if mock.ListFunc == nil { + panic("NodePoolInterfaceMock.ListFunc: method is nil but NodePoolInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockNodePoolInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockNodePoolInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedNodePoolInterface.ListCalls()) +func (mock *NodePoolInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockNodePoolInterfaceMockList.RLock() + calls = mock.calls.List + lockNodePoolInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *NodePoolInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("NodePoolInterfaceMock.ObjectClientFunc: method is nil but NodePoolInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockNodePoolInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockNodePoolInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedNodePoolInterface.ObjectClientCalls()) +func (mock *NodePoolInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockNodePoolInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockNodePoolInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *NodePoolInterfaceMock) Update(in1 *v3.NodePool) (*v3.NodePool, error) { + if mock.UpdateFunc == nil { + panic("NodePoolInterfaceMock.UpdateFunc: method is nil but NodePoolInterface.Update was just called") + } + callInfo := struct { + In1 *v3.NodePool + }{ + In1: in1, + } + lockNodePoolInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockNodePoolInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedNodePoolInterface.UpdateCalls()) +func (mock *NodePoolInterfaceMock) UpdateCalls() []struct { + In1 *v3.NodePool +} { + var calls []struct { + In1 *v3.NodePool + } + lockNodePoolInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockNodePoolInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *NodePoolInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("NodePoolInterfaceMock.WatchFunc: method is nil but NodePoolInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockNodePoolInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockNodePoolInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedNodePoolInterface.WatchCalls()) +func (mock *NodePoolInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockNodePoolInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockNodePoolInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockNodePoolsGetterMockNodePools sync.RWMutex +) + +// Ensure, that NodePoolsGetterMock does implement NodePoolsGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.NodePoolsGetter = &NodePoolsGetterMock{} + +// NodePoolsGetterMock is a mock implementation of NodePoolsGetter. +// +// func TestSomethingThatUsesNodePoolsGetter(t *testing.T) { +// +// // make and configure a mocked NodePoolsGetter +// mockedNodePoolsGetter := &NodePoolsGetterMock{ +// NodePoolsFunc: func(namespace string) v3.NodePoolInterface { +// panic("mock out the NodePools method") +// }, +// } +// +// // use mockedNodePoolsGetter in code that requires NodePoolsGetter +// // and then make assertions. +// +// } +type NodePoolsGetterMock struct { + // NodePoolsFunc mocks the NodePools method. + NodePoolsFunc func(namespace string) v3.NodePoolInterface + + // calls tracks calls to the methods. + calls struct { + // NodePools holds details about calls to the NodePools method. + NodePools []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// NodePools calls NodePoolsFunc. +func (mock *NodePoolsGetterMock) NodePools(namespace string) v3.NodePoolInterface { + if mock.NodePoolsFunc == nil { + panic("NodePoolsGetterMock.NodePoolsFunc: method is nil but NodePoolsGetter.NodePools was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockNodePoolsGetterMockNodePools.Lock() + mock.calls.NodePools = append(mock.calls.NodePools, callInfo) + lockNodePoolsGetterMockNodePools.Unlock() + return mock.NodePoolsFunc(namespace) +} + +// NodePoolsCalls gets all the calls that were made to NodePools. +// Check the length with: +// len(mockedNodePoolsGetter.NodePoolsCalls()) +func (mock *NodePoolsGetterMock) NodePoolsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockNodePoolsGetterMockNodePools.RLock() + calls = mock.calls.NodePools + lockNodePoolsGetterMockNodePools.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_node_template_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_node_template_mock_test.go new file mode 100644 index 00000000..4aef7797 --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_node_template_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockNodeTemplateListerMockGet sync.RWMutex + lockNodeTemplateListerMockList sync.RWMutex +) + +// Ensure, that NodeTemplateListerMock does implement NodeTemplateLister. +// If this is not the case, regenerate this file with moq. +var _ v3.NodeTemplateLister = &NodeTemplateListerMock{} + +// NodeTemplateListerMock is a mock implementation of NodeTemplateLister. +// +// func TestSomethingThatUsesNodeTemplateLister(t *testing.T) { +// +// // make and configure a mocked NodeTemplateLister +// mockedNodeTemplateLister := &NodeTemplateListerMock{ +// GetFunc: func(namespace string, name string) (*v3.NodeTemplate, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.NodeTemplate, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedNodeTemplateLister in code that requires NodeTemplateLister +// // and then make assertions. +// +// } +type NodeTemplateListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.NodeTemplate, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.NodeTemplate, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *NodeTemplateListerMock) Get(namespace string, name string) (*v3.NodeTemplate, error) { + if mock.GetFunc == nil { + panic("NodeTemplateListerMock.GetFunc: method is nil but NodeTemplateLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockNodeTemplateListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockNodeTemplateListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedNodeTemplateLister.GetCalls()) +func (mock *NodeTemplateListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockNodeTemplateListerMockGet.RLock() + calls = mock.calls.Get + lockNodeTemplateListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *NodeTemplateListerMock) List(namespace string, selector labels.Selector) ([]*v3.NodeTemplate, error) { + if mock.ListFunc == nil { + panic("NodeTemplateListerMock.ListFunc: method is nil but NodeTemplateLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockNodeTemplateListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockNodeTemplateListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedNodeTemplateLister.ListCalls()) +func (mock *NodeTemplateListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockNodeTemplateListerMockList.RLock() + calls = mock.calls.List + lockNodeTemplateListerMockList.RUnlock() + return calls +} + +var ( + lockNodeTemplateControllerMockAddClusterScopedHandler sync.RWMutex + lockNodeTemplateControllerMockAddHandler sync.RWMutex + lockNodeTemplateControllerMockEnqueue sync.RWMutex + lockNodeTemplateControllerMockGeneric sync.RWMutex + lockNodeTemplateControllerMockInformer sync.RWMutex + lockNodeTemplateControllerMockLister sync.RWMutex + lockNodeTemplateControllerMockStart sync.RWMutex + lockNodeTemplateControllerMockSync sync.RWMutex +) + +// Ensure, that NodeTemplateControllerMock does implement NodeTemplateController. +// If this is not the case, regenerate this file with moq. +var _ v3.NodeTemplateController = &NodeTemplateControllerMock{} + +// NodeTemplateControllerMock is a mock implementation of NodeTemplateController. +// +// func TestSomethingThatUsesNodeTemplateController(t *testing.T) { +// +// // make and configure a mocked NodeTemplateController +// mockedNodeTemplateController := &NodeTemplateControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.NodeTemplateHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.NodeTemplateHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.NodeTemplateLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedNodeTemplateController in code that requires NodeTemplateController +// // and then make assertions. +// +// } +type NodeTemplateControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.NodeTemplateHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.NodeTemplateHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.NodeTemplateLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.NodeTemplateHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.NodeTemplateHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *NodeTemplateControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.NodeTemplateHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("NodeTemplateControllerMock.AddClusterScopedHandlerFunc: method is nil but NodeTemplateController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.NodeTemplateHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockNodeTemplateControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockNodeTemplateControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedNodeTemplateController.AddClusterScopedHandlerCalls()) +func (mock *NodeTemplateControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.NodeTemplateHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.NodeTemplateHandlerFunc + } + lockNodeTemplateControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockNodeTemplateControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *NodeTemplateControllerMock) AddHandler(ctx context.Context, name string, handler v3.NodeTemplateHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("NodeTemplateControllerMock.AddHandlerFunc: method is nil but NodeTemplateController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.NodeTemplateHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockNodeTemplateControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockNodeTemplateControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedNodeTemplateController.AddHandlerCalls()) +func (mock *NodeTemplateControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.NodeTemplateHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.NodeTemplateHandlerFunc + } + lockNodeTemplateControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockNodeTemplateControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *NodeTemplateControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("NodeTemplateControllerMock.EnqueueFunc: method is nil but NodeTemplateController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockNodeTemplateControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockNodeTemplateControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedNodeTemplateController.EnqueueCalls()) +func (mock *NodeTemplateControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockNodeTemplateControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockNodeTemplateControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *NodeTemplateControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("NodeTemplateControllerMock.GenericFunc: method is nil but NodeTemplateController.Generic was just called") + } + callInfo := struct { + }{} + lockNodeTemplateControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockNodeTemplateControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedNodeTemplateController.GenericCalls()) +func (mock *NodeTemplateControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockNodeTemplateControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockNodeTemplateControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *NodeTemplateControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("NodeTemplateControllerMock.InformerFunc: method is nil but NodeTemplateController.Informer was just called") + } + callInfo := struct { + }{} + lockNodeTemplateControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockNodeTemplateControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedNodeTemplateController.InformerCalls()) +func (mock *NodeTemplateControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockNodeTemplateControllerMockInformer.RLock() + calls = mock.calls.Informer + lockNodeTemplateControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *NodeTemplateControllerMock) Lister() v3.NodeTemplateLister { + if mock.ListerFunc == nil { + panic("NodeTemplateControllerMock.ListerFunc: method is nil but NodeTemplateController.Lister was just called") + } + callInfo := struct { + }{} + lockNodeTemplateControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockNodeTemplateControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedNodeTemplateController.ListerCalls()) +func (mock *NodeTemplateControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockNodeTemplateControllerMockLister.RLock() + calls = mock.calls.Lister + lockNodeTemplateControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *NodeTemplateControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("NodeTemplateControllerMock.StartFunc: method is nil but NodeTemplateController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockNodeTemplateControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockNodeTemplateControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedNodeTemplateController.StartCalls()) +func (mock *NodeTemplateControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockNodeTemplateControllerMockStart.RLock() + calls = mock.calls.Start + lockNodeTemplateControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *NodeTemplateControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("NodeTemplateControllerMock.SyncFunc: method is nil but NodeTemplateController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockNodeTemplateControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockNodeTemplateControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedNodeTemplateController.SyncCalls()) +func (mock *NodeTemplateControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockNodeTemplateControllerMockSync.RLock() + calls = mock.calls.Sync + lockNodeTemplateControllerMockSync.RUnlock() + return calls +} + +var ( + lockNodeTemplateInterfaceMockAddClusterScopedHandler sync.RWMutex + lockNodeTemplateInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockNodeTemplateInterfaceMockAddHandler sync.RWMutex + lockNodeTemplateInterfaceMockAddLifecycle sync.RWMutex + lockNodeTemplateInterfaceMockController sync.RWMutex + lockNodeTemplateInterfaceMockCreate sync.RWMutex + lockNodeTemplateInterfaceMockDelete sync.RWMutex + lockNodeTemplateInterfaceMockDeleteCollection sync.RWMutex + lockNodeTemplateInterfaceMockDeleteNamespaced sync.RWMutex + lockNodeTemplateInterfaceMockGet sync.RWMutex + lockNodeTemplateInterfaceMockGetNamespaced sync.RWMutex + lockNodeTemplateInterfaceMockList sync.RWMutex + lockNodeTemplateInterfaceMockObjectClient sync.RWMutex + lockNodeTemplateInterfaceMockUpdate sync.RWMutex + lockNodeTemplateInterfaceMockWatch sync.RWMutex +) + +// Ensure, that NodeTemplateInterfaceMock does implement NodeTemplateInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.NodeTemplateInterface = &NodeTemplateInterfaceMock{} + +// NodeTemplateInterfaceMock is a mock implementation of NodeTemplateInterface. +// +// func TestSomethingThatUsesNodeTemplateInterface(t *testing.T) { +// +// // make and configure a mocked NodeTemplateInterface +// mockedNodeTemplateInterface := &NodeTemplateInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.NodeTemplateHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.NodeTemplateLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.NodeTemplateHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.NodeTemplateLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.NodeTemplateController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.NodeTemplate) (*v3.NodeTemplate, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.NodeTemplate, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.NodeTemplate, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.NodeTemplateList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.NodeTemplate) (*v3.NodeTemplate, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedNodeTemplateInterface in code that requires NodeTemplateInterface +// // and then make assertions. +// +// } +type NodeTemplateInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.NodeTemplateHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.NodeTemplateLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.NodeTemplateHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.NodeTemplateLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.NodeTemplateController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.NodeTemplate) (*v3.NodeTemplate, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.NodeTemplate, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.NodeTemplate, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.NodeTemplateList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.NodeTemplate) (*v3.NodeTemplate, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.NodeTemplateHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.NodeTemplateLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.NodeTemplateHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.NodeTemplateLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.NodeTemplate + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.NodeTemplate + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *NodeTemplateInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.NodeTemplateHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("NodeTemplateInterfaceMock.AddClusterScopedHandlerFunc: method is nil but NodeTemplateInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.NodeTemplateHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockNodeTemplateInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockNodeTemplateInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedNodeTemplateInterface.AddClusterScopedHandlerCalls()) +func (mock *NodeTemplateInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.NodeTemplateHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.NodeTemplateHandlerFunc + } + lockNodeTemplateInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockNodeTemplateInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *NodeTemplateInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.NodeTemplateLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("NodeTemplateInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but NodeTemplateInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.NodeTemplateLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockNodeTemplateInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockNodeTemplateInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedNodeTemplateInterface.AddClusterScopedLifecycleCalls()) +func (mock *NodeTemplateInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.NodeTemplateLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.NodeTemplateLifecycle + } + lockNodeTemplateInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockNodeTemplateInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *NodeTemplateInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.NodeTemplateHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("NodeTemplateInterfaceMock.AddHandlerFunc: method is nil but NodeTemplateInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.NodeTemplateHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockNodeTemplateInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockNodeTemplateInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedNodeTemplateInterface.AddHandlerCalls()) +func (mock *NodeTemplateInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.NodeTemplateHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.NodeTemplateHandlerFunc + } + lockNodeTemplateInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockNodeTemplateInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *NodeTemplateInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.NodeTemplateLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("NodeTemplateInterfaceMock.AddLifecycleFunc: method is nil but NodeTemplateInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.NodeTemplateLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockNodeTemplateInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockNodeTemplateInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedNodeTemplateInterface.AddLifecycleCalls()) +func (mock *NodeTemplateInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.NodeTemplateLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.NodeTemplateLifecycle + } + lockNodeTemplateInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockNodeTemplateInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *NodeTemplateInterfaceMock) Controller() v3.NodeTemplateController { + if mock.ControllerFunc == nil { + panic("NodeTemplateInterfaceMock.ControllerFunc: method is nil but NodeTemplateInterface.Controller was just called") + } + callInfo := struct { + }{} + lockNodeTemplateInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockNodeTemplateInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedNodeTemplateInterface.ControllerCalls()) +func (mock *NodeTemplateInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockNodeTemplateInterfaceMockController.RLock() + calls = mock.calls.Controller + lockNodeTemplateInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *NodeTemplateInterfaceMock) Create(in1 *v3.NodeTemplate) (*v3.NodeTemplate, error) { + if mock.CreateFunc == nil { + panic("NodeTemplateInterfaceMock.CreateFunc: method is nil but NodeTemplateInterface.Create was just called") + } + callInfo := struct { + In1 *v3.NodeTemplate + }{ + In1: in1, + } + lockNodeTemplateInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockNodeTemplateInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedNodeTemplateInterface.CreateCalls()) +func (mock *NodeTemplateInterfaceMock) CreateCalls() []struct { + In1 *v3.NodeTemplate +} { + var calls []struct { + In1 *v3.NodeTemplate + } + lockNodeTemplateInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockNodeTemplateInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *NodeTemplateInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("NodeTemplateInterfaceMock.DeleteFunc: method is nil but NodeTemplateInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockNodeTemplateInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockNodeTemplateInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedNodeTemplateInterface.DeleteCalls()) +func (mock *NodeTemplateInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockNodeTemplateInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockNodeTemplateInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *NodeTemplateInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("NodeTemplateInterfaceMock.DeleteCollectionFunc: method is nil but NodeTemplateInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockNodeTemplateInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockNodeTemplateInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedNodeTemplateInterface.DeleteCollectionCalls()) +func (mock *NodeTemplateInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockNodeTemplateInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockNodeTemplateInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *NodeTemplateInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("NodeTemplateInterfaceMock.DeleteNamespacedFunc: method is nil but NodeTemplateInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockNodeTemplateInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockNodeTemplateInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedNodeTemplateInterface.DeleteNamespacedCalls()) +func (mock *NodeTemplateInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockNodeTemplateInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockNodeTemplateInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *NodeTemplateInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.NodeTemplate, error) { + if mock.GetFunc == nil { + panic("NodeTemplateInterfaceMock.GetFunc: method is nil but NodeTemplateInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockNodeTemplateInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockNodeTemplateInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedNodeTemplateInterface.GetCalls()) +func (mock *NodeTemplateInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockNodeTemplateInterfaceMockGet.RLock() + calls = mock.calls.Get + lockNodeTemplateInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *NodeTemplateInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.NodeTemplate, error) { + if mock.GetNamespacedFunc == nil { + panic("NodeTemplateInterfaceMock.GetNamespacedFunc: method is nil but NodeTemplateInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockNodeTemplateInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockNodeTemplateInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedNodeTemplateInterface.GetNamespacedCalls()) +func (mock *NodeTemplateInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockNodeTemplateInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockNodeTemplateInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *NodeTemplateInterfaceMock) List(opts v1.ListOptions) (*v3.NodeTemplateList, error) { + if mock.ListFunc == nil { + panic("NodeTemplateInterfaceMock.ListFunc: method is nil but NodeTemplateInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockNodeTemplateInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockNodeTemplateInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedNodeTemplateInterface.ListCalls()) +func (mock *NodeTemplateInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockNodeTemplateInterfaceMockList.RLock() + calls = mock.calls.List + lockNodeTemplateInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *NodeTemplateInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("NodeTemplateInterfaceMock.ObjectClientFunc: method is nil but NodeTemplateInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockNodeTemplateInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockNodeTemplateInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedNodeTemplateInterface.ObjectClientCalls()) +func (mock *NodeTemplateInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockNodeTemplateInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockNodeTemplateInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *NodeTemplateInterfaceMock) Update(in1 *v3.NodeTemplate) (*v3.NodeTemplate, error) { + if mock.UpdateFunc == nil { + panic("NodeTemplateInterfaceMock.UpdateFunc: method is nil but NodeTemplateInterface.Update was just called") + } + callInfo := struct { + In1 *v3.NodeTemplate + }{ + In1: in1, + } + lockNodeTemplateInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockNodeTemplateInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedNodeTemplateInterface.UpdateCalls()) +func (mock *NodeTemplateInterfaceMock) UpdateCalls() []struct { + In1 *v3.NodeTemplate +} { + var calls []struct { + In1 *v3.NodeTemplate + } + lockNodeTemplateInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockNodeTemplateInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *NodeTemplateInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("NodeTemplateInterfaceMock.WatchFunc: method is nil but NodeTemplateInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockNodeTemplateInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockNodeTemplateInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedNodeTemplateInterface.WatchCalls()) +func (mock *NodeTemplateInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockNodeTemplateInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockNodeTemplateInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockNodeTemplatesGetterMockNodeTemplates sync.RWMutex +) + +// Ensure, that NodeTemplatesGetterMock does implement NodeTemplatesGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.NodeTemplatesGetter = &NodeTemplatesGetterMock{} + +// NodeTemplatesGetterMock is a mock implementation of NodeTemplatesGetter. +// +// func TestSomethingThatUsesNodeTemplatesGetter(t *testing.T) { +// +// // make and configure a mocked NodeTemplatesGetter +// mockedNodeTemplatesGetter := &NodeTemplatesGetterMock{ +// NodeTemplatesFunc: func(namespace string) v3.NodeTemplateInterface { +// panic("mock out the NodeTemplates method") +// }, +// } +// +// // use mockedNodeTemplatesGetter in code that requires NodeTemplatesGetter +// // and then make assertions. +// +// } +type NodeTemplatesGetterMock struct { + // NodeTemplatesFunc mocks the NodeTemplates method. + NodeTemplatesFunc func(namespace string) v3.NodeTemplateInterface + + // calls tracks calls to the methods. + calls struct { + // NodeTemplates holds details about calls to the NodeTemplates method. + NodeTemplates []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// NodeTemplates calls NodeTemplatesFunc. +func (mock *NodeTemplatesGetterMock) NodeTemplates(namespace string) v3.NodeTemplateInterface { + if mock.NodeTemplatesFunc == nil { + panic("NodeTemplatesGetterMock.NodeTemplatesFunc: method is nil but NodeTemplatesGetter.NodeTemplates was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockNodeTemplatesGetterMockNodeTemplates.Lock() + mock.calls.NodeTemplates = append(mock.calls.NodeTemplates, callInfo) + lockNodeTemplatesGetterMockNodeTemplates.Unlock() + return mock.NodeTemplatesFunc(namespace) +} + +// NodeTemplatesCalls gets all the calls that were made to NodeTemplates. +// Check the length with: +// len(mockedNodeTemplatesGetter.NodeTemplatesCalls()) +func (mock *NodeTemplatesGetterMock) NodeTemplatesCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockNodeTemplatesGetterMockNodeTemplates.RLock() + calls = mock.calls.NodeTemplates + lockNodeTemplatesGetterMockNodeTemplates.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_notifier_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_notifier_mock_test.go new file mode 100644 index 00000000..ebdc9ef2 --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_notifier_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockNotifierListerMockGet sync.RWMutex + lockNotifierListerMockList sync.RWMutex +) + +// Ensure, that NotifierListerMock does implement NotifierLister. +// If this is not the case, regenerate this file with moq. +var _ v3.NotifierLister = &NotifierListerMock{} + +// NotifierListerMock is a mock implementation of NotifierLister. +// +// func TestSomethingThatUsesNotifierLister(t *testing.T) { +// +// // make and configure a mocked NotifierLister +// mockedNotifierLister := &NotifierListerMock{ +// GetFunc: func(namespace string, name string) (*v3.Notifier, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.Notifier, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedNotifierLister in code that requires NotifierLister +// // and then make assertions. +// +// } +type NotifierListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.Notifier, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.Notifier, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *NotifierListerMock) Get(namespace string, name string) (*v3.Notifier, error) { + if mock.GetFunc == nil { + panic("NotifierListerMock.GetFunc: method is nil but NotifierLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockNotifierListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockNotifierListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedNotifierLister.GetCalls()) +func (mock *NotifierListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockNotifierListerMockGet.RLock() + calls = mock.calls.Get + lockNotifierListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *NotifierListerMock) List(namespace string, selector labels.Selector) ([]*v3.Notifier, error) { + if mock.ListFunc == nil { + panic("NotifierListerMock.ListFunc: method is nil but NotifierLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockNotifierListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockNotifierListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedNotifierLister.ListCalls()) +func (mock *NotifierListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockNotifierListerMockList.RLock() + calls = mock.calls.List + lockNotifierListerMockList.RUnlock() + return calls +} + +var ( + lockNotifierControllerMockAddClusterScopedHandler sync.RWMutex + lockNotifierControllerMockAddHandler sync.RWMutex + lockNotifierControllerMockEnqueue sync.RWMutex + lockNotifierControllerMockGeneric sync.RWMutex + lockNotifierControllerMockInformer sync.RWMutex + lockNotifierControllerMockLister sync.RWMutex + lockNotifierControllerMockStart sync.RWMutex + lockNotifierControllerMockSync sync.RWMutex +) + +// Ensure, that NotifierControllerMock does implement NotifierController. +// If this is not the case, regenerate this file with moq. +var _ v3.NotifierController = &NotifierControllerMock{} + +// NotifierControllerMock is a mock implementation of NotifierController. +// +// func TestSomethingThatUsesNotifierController(t *testing.T) { +// +// // make and configure a mocked NotifierController +// mockedNotifierController := &NotifierControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.NotifierHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.NotifierHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.NotifierLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedNotifierController in code that requires NotifierController +// // and then make assertions. +// +// } +type NotifierControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.NotifierHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.NotifierHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.NotifierLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.NotifierHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.NotifierHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *NotifierControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.NotifierHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("NotifierControllerMock.AddClusterScopedHandlerFunc: method is nil but NotifierController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.NotifierHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockNotifierControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockNotifierControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedNotifierController.AddClusterScopedHandlerCalls()) +func (mock *NotifierControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.NotifierHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.NotifierHandlerFunc + } + lockNotifierControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockNotifierControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *NotifierControllerMock) AddHandler(ctx context.Context, name string, handler v3.NotifierHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("NotifierControllerMock.AddHandlerFunc: method is nil but NotifierController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.NotifierHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockNotifierControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockNotifierControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedNotifierController.AddHandlerCalls()) +func (mock *NotifierControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.NotifierHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.NotifierHandlerFunc + } + lockNotifierControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockNotifierControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *NotifierControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("NotifierControllerMock.EnqueueFunc: method is nil but NotifierController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockNotifierControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockNotifierControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedNotifierController.EnqueueCalls()) +func (mock *NotifierControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockNotifierControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockNotifierControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *NotifierControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("NotifierControllerMock.GenericFunc: method is nil but NotifierController.Generic was just called") + } + callInfo := struct { + }{} + lockNotifierControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockNotifierControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedNotifierController.GenericCalls()) +func (mock *NotifierControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockNotifierControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockNotifierControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *NotifierControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("NotifierControllerMock.InformerFunc: method is nil but NotifierController.Informer was just called") + } + callInfo := struct { + }{} + lockNotifierControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockNotifierControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedNotifierController.InformerCalls()) +func (mock *NotifierControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockNotifierControllerMockInformer.RLock() + calls = mock.calls.Informer + lockNotifierControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *NotifierControllerMock) Lister() v3.NotifierLister { + if mock.ListerFunc == nil { + panic("NotifierControllerMock.ListerFunc: method is nil but NotifierController.Lister was just called") + } + callInfo := struct { + }{} + lockNotifierControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockNotifierControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedNotifierController.ListerCalls()) +func (mock *NotifierControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockNotifierControllerMockLister.RLock() + calls = mock.calls.Lister + lockNotifierControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *NotifierControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("NotifierControllerMock.StartFunc: method is nil but NotifierController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockNotifierControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockNotifierControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedNotifierController.StartCalls()) +func (mock *NotifierControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockNotifierControllerMockStart.RLock() + calls = mock.calls.Start + lockNotifierControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *NotifierControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("NotifierControllerMock.SyncFunc: method is nil but NotifierController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockNotifierControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockNotifierControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedNotifierController.SyncCalls()) +func (mock *NotifierControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockNotifierControllerMockSync.RLock() + calls = mock.calls.Sync + lockNotifierControllerMockSync.RUnlock() + return calls +} + +var ( + lockNotifierInterfaceMockAddClusterScopedHandler sync.RWMutex + lockNotifierInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockNotifierInterfaceMockAddHandler sync.RWMutex + lockNotifierInterfaceMockAddLifecycle sync.RWMutex + lockNotifierInterfaceMockController sync.RWMutex + lockNotifierInterfaceMockCreate sync.RWMutex + lockNotifierInterfaceMockDelete sync.RWMutex + lockNotifierInterfaceMockDeleteCollection sync.RWMutex + lockNotifierInterfaceMockDeleteNamespaced sync.RWMutex + lockNotifierInterfaceMockGet sync.RWMutex + lockNotifierInterfaceMockGetNamespaced sync.RWMutex + lockNotifierInterfaceMockList sync.RWMutex + lockNotifierInterfaceMockObjectClient sync.RWMutex + lockNotifierInterfaceMockUpdate sync.RWMutex + lockNotifierInterfaceMockWatch sync.RWMutex +) + +// Ensure, that NotifierInterfaceMock does implement NotifierInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.NotifierInterface = &NotifierInterfaceMock{} + +// NotifierInterfaceMock is a mock implementation of NotifierInterface. +// +// func TestSomethingThatUsesNotifierInterface(t *testing.T) { +// +// // make and configure a mocked NotifierInterface +// mockedNotifierInterface := &NotifierInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.NotifierHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.NotifierLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.NotifierHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.NotifierLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.NotifierController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.Notifier) (*v3.Notifier, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.Notifier, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.Notifier, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.NotifierList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.Notifier) (*v3.Notifier, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedNotifierInterface in code that requires NotifierInterface +// // and then make assertions. +// +// } +type NotifierInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.NotifierHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.NotifierLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.NotifierHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.NotifierLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.NotifierController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.Notifier) (*v3.Notifier, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.Notifier, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.Notifier, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.NotifierList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.Notifier) (*v3.Notifier, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.NotifierHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.NotifierLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.NotifierHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.NotifierLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.Notifier + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.Notifier + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *NotifierInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.NotifierHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("NotifierInterfaceMock.AddClusterScopedHandlerFunc: method is nil but NotifierInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.NotifierHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockNotifierInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockNotifierInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedNotifierInterface.AddClusterScopedHandlerCalls()) +func (mock *NotifierInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.NotifierHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.NotifierHandlerFunc + } + lockNotifierInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockNotifierInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *NotifierInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.NotifierLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("NotifierInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but NotifierInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.NotifierLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockNotifierInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockNotifierInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedNotifierInterface.AddClusterScopedLifecycleCalls()) +func (mock *NotifierInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.NotifierLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.NotifierLifecycle + } + lockNotifierInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockNotifierInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *NotifierInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.NotifierHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("NotifierInterfaceMock.AddHandlerFunc: method is nil but NotifierInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.NotifierHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockNotifierInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockNotifierInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedNotifierInterface.AddHandlerCalls()) +func (mock *NotifierInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.NotifierHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.NotifierHandlerFunc + } + lockNotifierInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockNotifierInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *NotifierInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.NotifierLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("NotifierInterfaceMock.AddLifecycleFunc: method is nil but NotifierInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.NotifierLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockNotifierInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockNotifierInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedNotifierInterface.AddLifecycleCalls()) +func (mock *NotifierInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.NotifierLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.NotifierLifecycle + } + lockNotifierInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockNotifierInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *NotifierInterfaceMock) Controller() v3.NotifierController { + if mock.ControllerFunc == nil { + panic("NotifierInterfaceMock.ControllerFunc: method is nil but NotifierInterface.Controller was just called") + } + callInfo := struct { + }{} + lockNotifierInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockNotifierInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedNotifierInterface.ControllerCalls()) +func (mock *NotifierInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockNotifierInterfaceMockController.RLock() + calls = mock.calls.Controller + lockNotifierInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *NotifierInterfaceMock) Create(in1 *v3.Notifier) (*v3.Notifier, error) { + if mock.CreateFunc == nil { + panic("NotifierInterfaceMock.CreateFunc: method is nil but NotifierInterface.Create was just called") + } + callInfo := struct { + In1 *v3.Notifier + }{ + In1: in1, + } + lockNotifierInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockNotifierInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedNotifierInterface.CreateCalls()) +func (mock *NotifierInterfaceMock) CreateCalls() []struct { + In1 *v3.Notifier +} { + var calls []struct { + In1 *v3.Notifier + } + lockNotifierInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockNotifierInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *NotifierInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("NotifierInterfaceMock.DeleteFunc: method is nil but NotifierInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockNotifierInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockNotifierInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedNotifierInterface.DeleteCalls()) +func (mock *NotifierInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockNotifierInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockNotifierInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *NotifierInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("NotifierInterfaceMock.DeleteCollectionFunc: method is nil but NotifierInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockNotifierInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockNotifierInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedNotifierInterface.DeleteCollectionCalls()) +func (mock *NotifierInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockNotifierInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockNotifierInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *NotifierInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("NotifierInterfaceMock.DeleteNamespacedFunc: method is nil but NotifierInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockNotifierInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockNotifierInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedNotifierInterface.DeleteNamespacedCalls()) +func (mock *NotifierInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockNotifierInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockNotifierInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *NotifierInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.Notifier, error) { + if mock.GetFunc == nil { + panic("NotifierInterfaceMock.GetFunc: method is nil but NotifierInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockNotifierInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockNotifierInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedNotifierInterface.GetCalls()) +func (mock *NotifierInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockNotifierInterfaceMockGet.RLock() + calls = mock.calls.Get + lockNotifierInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *NotifierInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.Notifier, error) { + if mock.GetNamespacedFunc == nil { + panic("NotifierInterfaceMock.GetNamespacedFunc: method is nil but NotifierInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockNotifierInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockNotifierInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedNotifierInterface.GetNamespacedCalls()) +func (mock *NotifierInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockNotifierInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockNotifierInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *NotifierInterfaceMock) List(opts v1.ListOptions) (*v3.NotifierList, error) { + if mock.ListFunc == nil { + panic("NotifierInterfaceMock.ListFunc: method is nil but NotifierInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockNotifierInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockNotifierInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedNotifierInterface.ListCalls()) +func (mock *NotifierInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockNotifierInterfaceMockList.RLock() + calls = mock.calls.List + lockNotifierInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *NotifierInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("NotifierInterfaceMock.ObjectClientFunc: method is nil but NotifierInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockNotifierInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockNotifierInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedNotifierInterface.ObjectClientCalls()) +func (mock *NotifierInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockNotifierInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockNotifierInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *NotifierInterfaceMock) Update(in1 *v3.Notifier) (*v3.Notifier, error) { + if mock.UpdateFunc == nil { + panic("NotifierInterfaceMock.UpdateFunc: method is nil but NotifierInterface.Update was just called") + } + callInfo := struct { + In1 *v3.Notifier + }{ + In1: in1, + } + lockNotifierInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockNotifierInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedNotifierInterface.UpdateCalls()) +func (mock *NotifierInterfaceMock) UpdateCalls() []struct { + In1 *v3.Notifier +} { + var calls []struct { + In1 *v3.Notifier + } + lockNotifierInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockNotifierInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *NotifierInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("NotifierInterfaceMock.WatchFunc: method is nil but NotifierInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockNotifierInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockNotifierInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedNotifierInterface.WatchCalls()) +func (mock *NotifierInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockNotifierInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockNotifierInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockNotifiersGetterMockNotifiers sync.RWMutex +) + +// Ensure, that NotifiersGetterMock does implement NotifiersGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.NotifiersGetter = &NotifiersGetterMock{} + +// NotifiersGetterMock is a mock implementation of NotifiersGetter. +// +// func TestSomethingThatUsesNotifiersGetter(t *testing.T) { +// +// // make and configure a mocked NotifiersGetter +// mockedNotifiersGetter := &NotifiersGetterMock{ +// NotifiersFunc: func(namespace string) v3.NotifierInterface { +// panic("mock out the Notifiers method") +// }, +// } +// +// // use mockedNotifiersGetter in code that requires NotifiersGetter +// // and then make assertions. +// +// } +type NotifiersGetterMock struct { + // NotifiersFunc mocks the Notifiers method. + NotifiersFunc func(namespace string) v3.NotifierInterface + + // calls tracks calls to the methods. + calls struct { + // Notifiers holds details about calls to the Notifiers method. + Notifiers []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// Notifiers calls NotifiersFunc. +func (mock *NotifiersGetterMock) Notifiers(namespace string) v3.NotifierInterface { + if mock.NotifiersFunc == nil { + panic("NotifiersGetterMock.NotifiersFunc: method is nil but NotifiersGetter.Notifiers was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockNotifiersGetterMockNotifiers.Lock() + mock.calls.Notifiers = append(mock.calls.Notifiers, callInfo) + lockNotifiersGetterMockNotifiers.Unlock() + return mock.NotifiersFunc(namespace) +} + +// NotifiersCalls gets all the calls that were made to Notifiers. +// Check the length with: +// len(mockedNotifiersGetter.NotifiersCalls()) +func (mock *NotifiersGetterMock) NotifiersCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockNotifiersGetterMockNotifiers.RLock() + calls = mock.calls.Notifiers + lockNotifiersGetterMockNotifiers.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_pod_security_policy_template_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_pod_security_policy_template_mock_test.go new file mode 100644 index 00000000..fc8e9626 --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_pod_security_policy_template_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockPodSecurityPolicyTemplateListerMockGet sync.RWMutex + lockPodSecurityPolicyTemplateListerMockList sync.RWMutex +) + +// Ensure, that PodSecurityPolicyTemplateListerMock does implement PodSecurityPolicyTemplateLister. +// If this is not the case, regenerate this file with moq. +var _ v3.PodSecurityPolicyTemplateLister = &PodSecurityPolicyTemplateListerMock{} + +// PodSecurityPolicyTemplateListerMock is a mock implementation of PodSecurityPolicyTemplateLister. +// +// func TestSomethingThatUsesPodSecurityPolicyTemplateLister(t *testing.T) { +// +// // make and configure a mocked PodSecurityPolicyTemplateLister +// mockedPodSecurityPolicyTemplateLister := &PodSecurityPolicyTemplateListerMock{ +// GetFunc: func(namespace string, name string) (*v3.PodSecurityPolicyTemplate, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.PodSecurityPolicyTemplate, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedPodSecurityPolicyTemplateLister in code that requires PodSecurityPolicyTemplateLister +// // and then make assertions. +// +// } +type PodSecurityPolicyTemplateListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.PodSecurityPolicyTemplate, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.PodSecurityPolicyTemplate, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *PodSecurityPolicyTemplateListerMock) Get(namespace string, name string) (*v3.PodSecurityPolicyTemplate, error) { + if mock.GetFunc == nil { + panic("PodSecurityPolicyTemplateListerMock.GetFunc: method is nil but PodSecurityPolicyTemplateLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockPodSecurityPolicyTemplateListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockPodSecurityPolicyTemplateListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateLister.GetCalls()) +func (mock *PodSecurityPolicyTemplateListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockPodSecurityPolicyTemplateListerMockGet.RLock() + calls = mock.calls.Get + lockPodSecurityPolicyTemplateListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *PodSecurityPolicyTemplateListerMock) List(namespace string, selector labels.Selector) ([]*v3.PodSecurityPolicyTemplate, error) { + if mock.ListFunc == nil { + panic("PodSecurityPolicyTemplateListerMock.ListFunc: method is nil but PodSecurityPolicyTemplateLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockPodSecurityPolicyTemplateListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockPodSecurityPolicyTemplateListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateLister.ListCalls()) +func (mock *PodSecurityPolicyTemplateListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockPodSecurityPolicyTemplateListerMockList.RLock() + calls = mock.calls.List + lockPodSecurityPolicyTemplateListerMockList.RUnlock() + return calls +} + +var ( + lockPodSecurityPolicyTemplateControllerMockAddClusterScopedHandler sync.RWMutex + lockPodSecurityPolicyTemplateControllerMockAddHandler sync.RWMutex + lockPodSecurityPolicyTemplateControllerMockEnqueue sync.RWMutex + lockPodSecurityPolicyTemplateControllerMockGeneric sync.RWMutex + lockPodSecurityPolicyTemplateControllerMockInformer sync.RWMutex + lockPodSecurityPolicyTemplateControllerMockLister sync.RWMutex + lockPodSecurityPolicyTemplateControllerMockStart sync.RWMutex + lockPodSecurityPolicyTemplateControllerMockSync sync.RWMutex +) + +// Ensure, that PodSecurityPolicyTemplateControllerMock does implement PodSecurityPolicyTemplateController. +// If this is not the case, regenerate this file with moq. +var _ v3.PodSecurityPolicyTemplateController = &PodSecurityPolicyTemplateControllerMock{} + +// PodSecurityPolicyTemplateControllerMock is a mock implementation of PodSecurityPolicyTemplateController. +// +// func TestSomethingThatUsesPodSecurityPolicyTemplateController(t *testing.T) { +// +// // make and configure a mocked PodSecurityPolicyTemplateController +// mockedPodSecurityPolicyTemplateController := &PodSecurityPolicyTemplateControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.PodSecurityPolicyTemplateHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.PodSecurityPolicyTemplateHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.PodSecurityPolicyTemplateLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedPodSecurityPolicyTemplateController in code that requires PodSecurityPolicyTemplateController +// // and then make assertions. +// +// } +type PodSecurityPolicyTemplateControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.PodSecurityPolicyTemplateHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.PodSecurityPolicyTemplateHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.PodSecurityPolicyTemplateLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.PodSecurityPolicyTemplateHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.PodSecurityPolicyTemplateHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *PodSecurityPolicyTemplateControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.PodSecurityPolicyTemplateHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("PodSecurityPolicyTemplateControllerMock.AddClusterScopedHandlerFunc: method is nil but PodSecurityPolicyTemplateController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.PodSecurityPolicyTemplateHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockPodSecurityPolicyTemplateControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockPodSecurityPolicyTemplateControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateController.AddClusterScopedHandlerCalls()) +func (mock *PodSecurityPolicyTemplateControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.PodSecurityPolicyTemplateHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.PodSecurityPolicyTemplateHandlerFunc + } + lockPodSecurityPolicyTemplateControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockPodSecurityPolicyTemplateControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *PodSecurityPolicyTemplateControllerMock) AddHandler(ctx context.Context, name string, handler v3.PodSecurityPolicyTemplateHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("PodSecurityPolicyTemplateControllerMock.AddHandlerFunc: method is nil but PodSecurityPolicyTemplateController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.PodSecurityPolicyTemplateHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockPodSecurityPolicyTemplateControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockPodSecurityPolicyTemplateControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateController.AddHandlerCalls()) +func (mock *PodSecurityPolicyTemplateControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.PodSecurityPolicyTemplateHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.PodSecurityPolicyTemplateHandlerFunc + } + lockPodSecurityPolicyTemplateControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockPodSecurityPolicyTemplateControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *PodSecurityPolicyTemplateControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("PodSecurityPolicyTemplateControllerMock.EnqueueFunc: method is nil but PodSecurityPolicyTemplateController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockPodSecurityPolicyTemplateControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockPodSecurityPolicyTemplateControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateController.EnqueueCalls()) +func (mock *PodSecurityPolicyTemplateControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockPodSecurityPolicyTemplateControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockPodSecurityPolicyTemplateControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *PodSecurityPolicyTemplateControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("PodSecurityPolicyTemplateControllerMock.GenericFunc: method is nil but PodSecurityPolicyTemplateController.Generic was just called") + } + callInfo := struct { + }{} + lockPodSecurityPolicyTemplateControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockPodSecurityPolicyTemplateControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateController.GenericCalls()) +func (mock *PodSecurityPolicyTemplateControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockPodSecurityPolicyTemplateControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockPodSecurityPolicyTemplateControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *PodSecurityPolicyTemplateControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("PodSecurityPolicyTemplateControllerMock.InformerFunc: method is nil but PodSecurityPolicyTemplateController.Informer was just called") + } + callInfo := struct { + }{} + lockPodSecurityPolicyTemplateControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockPodSecurityPolicyTemplateControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateController.InformerCalls()) +func (mock *PodSecurityPolicyTemplateControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockPodSecurityPolicyTemplateControllerMockInformer.RLock() + calls = mock.calls.Informer + lockPodSecurityPolicyTemplateControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *PodSecurityPolicyTemplateControllerMock) Lister() v3.PodSecurityPolicyTemplateLister { + if mock.ListerFunc == nil { + panic("PodSecurityPolicyTemplateControllerMock.ListerFunc: method is nil but PodSecurityPolicyTemplateController.Lister was just called") + } + callInfo := struct { + }{} + lockPodSecurityPolicyTemplateControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockPodSecurityPolicyTemplateControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateController.ListerCalls()) +func (mock *PodSecurityPolicyTemplateControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockPodSecurityPolicyTemplateControllerMockLister.RLock() + calls = mock.calls.Lister + lockPodSecurityPolicyTemplateControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *PodSecurityPolicyTemplateControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("PodSecurityPolicyTemplateControllerMock.StartFunc: method is nil but PodSecurityPolicyTemplateController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockPodSecurityPolicyTemplateControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockPodSecurityPolicyTemplateControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateController.StartCalls()) +func (mock *PodSecurityPolicyTemplateControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockPodSecurityPolicyTemplateControllerMockStart.RLock() + calls = mock.calls.Start + lockPodSecurityPolicyTemplateControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *PodSecurityPolicyTemplateControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("PodSecurityPolicyTemplateControllerMock.SyncFunc: method is nil but PodSecurityPolicyTemplateController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockPodSecurityPolicyTemplateControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockPodSecurityPolicyTemplateControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateController.SyncCalls()) +func (mock *PodSecurityPolicyTemplateControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockPodSecurityPolicyTemplateControllerMockSync.RLock() + calls = mock.calls.Sync + lockPodSecurityPolicyTemplateControllerMockSync.RUnlock() + return calls +} + +var ( + lockPodSecurityPolicyTemplateInterfaceMockAddClusterScopedHandler sync.RWMutex + lockPodSecurityPolicyTemplateInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockPodSecurityPolicyTemplateInterfaceMockAddHandler sync.RWMutex + lockPodSecurityPolicyTemplateInterfaceMockAddLifecycle sync.RWMutex + lockPodSecurityPolicyTemplateInterfaceMockController sync.RWMutex + lockPodSecurityPolicyTemplateInterfaceMockCreate sync.RWMutex + lockPodSecurityPolicyTemplateInterfaceMockDelete sync.RWMutex + lockPodSecurityPolicyTemplateInterfaceMockDeleteCollection sync.RWMutex + lockPodSecurityPolicyTemplateInterfaceMockDeleteNamespaced sync.RWMutex + lockPodSecurityPolicyTemplateInterfaceMockGet sync.RWMutex + lockPodSecurityPolicyTemplateInterfaceMockGetNamespaced sync.RWMutex + lockPodSecurityPolicyTemplateInterfaceMockList sync.RWMutex + lockPodSecurityPolicyTemplateInterfaceMockObjectClient sync.RWMutex + lockPodSecurityPolicyTemplateInterfaceMockUpdate sync.RWMutex + lockPodSecurityPolicyTemplateInterfaceMockWatch sync.RWMutex +) + +// Ensure, that PodSecurityPolicyTemplateInterfaceMock does implement PodSecurityPolicyTemplateInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.PodSecurityPolicyTemplateInterface = &PodSecurityPolicyTemplateInterfaceMock{} + +// PodSecurityPolicyTemplateInterfaceMock is a mock implementation of PodSecurityPolicyTemplateInterface. +// +// func TestSomethingThatUsesPodSecurityPolicyTemplateInterface(t *testing.T) { +// +// // make and configure a mocked PodSecurityPolicyTemplateInterface +// mockedPodSecurityPolicyTemplateInterface := &PodSecurityPolicyTemplateInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.PodSecurityPolicyTemplateHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.PodSecurityPolicyTemplateLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.PodSecurityPolicyTemplateHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.PodSecurityPolicyTemplateLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.PodSecurityPolicyTemplateController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.PodSecurityPolicyTemplate) (*v3.PodSecurityPolicyTemplate, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.PodSecurityPolicyTemplate, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.PodSecurityPolicyTemplate, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.PodSecurityPolicyTemplateList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.PodSecurityPolicyTemplate) (*v3.PodSecurityPolicyTemplate, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedPodSecurityPolicyTemplateInterface in code that requires PodSecurityPolicyTemplateInterface +// // and then make assertions. +// +// } +type PodSecurityPolicyTemplateInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.PodSecurityPolicyTemplateHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.PodSecurityPolicyTemplateLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.PodSecurityPolicyTemplateHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.PodSecurityPolicyTemplateLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.PodSecurityPolicyTemplateController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.PodSecurityPolicyTemplate) (*v3.PodSecurityPolicyTemplate, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.PodSecurityPolicyTemplate, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.PodSecurityPolicyTemplate, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.PodSecurityPolicyTemplateList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.PodSecurityPolicyTemplate) (*v3.PodSecurityPolicyTemplate, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.PodSecurityPolicyTemplateHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.PodSecurityPolicyTemplateLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.PodSecurityPolicyTemplateHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.PodSecurityPolicyTemplateLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.PodSecurityPolicyTemplate + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.PodSecurityPolicyTemplate + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *PodSecurityPolicyTemplateInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.PodSecurityPolicyTemplateHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("PodSecurityPolicyTemplateInterfaceMock.AddClusterScopedHandlerFunc: method is nil but PodSecurityPolicyTemplateInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.PodSecurityPolicyTemplateHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockPodSecurityPolicyTemplateInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockPodSecurityPolicyTemplateInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateInterface.AddClusterScopedHandlerCalls()) +func (mock *PodSecurityPolicyTemplateInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.PodSecurityPolicyTemplateHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.PodSecurityPolicyTemplateHandlerFunc + } + lockPodSecurityPolicyTemplateInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockPodSecurityPolicyTemplateInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *PodSecurityPolicyTemplateInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.PodSecurityPolicyTemplateLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("PodSecurityPolicyTemplateInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but PodSecurityPolicyTemplateInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.PodSecurityPolicyTemplateLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockPodSecurityPolicyTemplateInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockPodSecurityPolicyTemplateInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateInterface.AddClusterScopedLifecycleCalls()) +func (mock *PodSecurityPolicyTemplateInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.PodSecurityPolicyTemplateLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.PodSecurityPolicyTemplateLifecycle + } + lockPodSecurityPolicyTemplateInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockPodSecurityPolicyTemplateInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *PodSecurityPolicyTemplateInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.PodSecurityPolicyTemplateHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("PodSecurityPolicyTemplateInterfaceMock.AddHandlerFunc: method is nil but PodSecurityPolicyTemplateInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.PodSecurityPolicyTemplateHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockPodSecurityPolicyTemplateInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockPodSecurityPolicyTemplateInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateInterface.AddHandlerCalls()) +func (mock *PodSecurityPolicyTemplateInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.PodSecurityPolicyTemplateHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.PodSecurityPolicyTemplateHandlerFunc + } + lockPodSecurityPolicyTemplateInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockPodSecurityPolicyTemplateInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *PodSecurityPolicyTemplateInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.PodSecurityPolicyTemplateLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("PodSecurityPolicyTemplateInterfaceMock.AddLifecycleFunc: method is nil but PodSecurityPolicyTemplateInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.PodSecurityPolicyTemplateLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockPodSecurityPolicyTemplateInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockPodSecurityPolicyTemplateInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateInterface.AddLifecycleCalls()) +func (mock *PodSecurityPolicyTemplateInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.PodSecurityPolicyTemplateLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.PodSecurityPolicyTemplateLifecycle + } + lockPodSecurityPolicyTemplateInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockPodSecurityPolicyTemplateInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *PodSecurityPolicyTemplateInterfaceMock) Controller() v3.PodSecurityPolicyTemplateController { + if mock.ControllerFunc == nil { + panic("PodSecurityPolicyTemplateInterfaceMock.ControllerFunc: method is nil but PodSecurityPolicyTemplateInterface.Controller was just called") + } + callInfo := struct { + }{} + lockPodSecurityPolicyTemplateInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockPodSecurityPolicyTemplateInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateInterface.ControllerCalls()) +func (mock *PodSecurityPolicyTemplateInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockPodSecurityPolicyTemplateInterfaceMockController.RLock() + calls = mock.calls.Controller + lockPodSecurityPolicyTemplateInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *PodSecurityPolicyTemplateInterfaceMock) Create(in1 *v3.PodSecurityPolicyTemplate) (*v3.PodSecurityPolicyTemplate, error) { + if mock.CreateFunc == nil { + panic("PodSecurityPolicyTemplateInterfaceMock.CreateFunc: method is nil but PodSecurityPolicyTemplateInterface.Create was just called") + } + callInfo := struct { + In1 *v3.PodSecurityPolicyTemplate + }{ + In1: in1, + } + lockPodSecurityPolicyTemplateInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockPodSecurityPolicyTemplateInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateInterface.CreateCalls()) +func (mock *PodSecurityPolicyTemplateInterfaceMock) CreateCalls() []struct { + In1 *v3.PodSecurityPolicyTemplate +} { + var calls []struct { + In1 *v3.PodSecurityPolicyTemplate + } + lockPodSecurityPolicyTemplateInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockPodSecurityPolicyTemplateInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *PodSecurityPolicyTemplateInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("PodSecurityPolicyTemplateInterfaceMock.DeleteFunc: method is nil but PodSecurityPolicyTemplateInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockPodSecurityPolicyTemplateInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockPodSecurityPolicyTemplateInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateInterface.DeleteCalls()) +func (mock *PodSecurityPolicyTemplateInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockPodSecurityPolicyTemplateInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockPodSecurityPolicyTemplateInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *PodSecurityPolicyTemplateInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("PodSecurityPolicyTemplateInterfaceMock.DeleteCollectionFunc: method is nil but PodSecurityPolicyTemplateInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockPodSecurityPolicyTemplateInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockPodSecurityPolicyTemplateInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateInterface.DeleteCollectionCalls()) +func (mock *PodSecurityPolicyTemplateInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockPodSecurityPolicyTemplateInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockPodSecurityPolicyTemplateInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *PodSecurityPolicyTemplateInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("PodSecurityPolicyTemplateInterfaceMock.DeleteNamespacedFunc: method is nil but PodSecurityPolicyTemplateInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockPodSecurityPolicyTemplateInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockPodSecurityPolicyTemplateInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateInterface.DeleteNamespacedCalls()) +func (mock *PodSecurityPolicyTemplateInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockPodSecurityPolicyTemplateInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockPodSecurityPolicyTemplateInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *PodSecurityPolicyTemplateInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.PodSecurityPolicyTemplate, error) { + if mock.GetFunc == nil { + panic("PodSecurityPolicyTemplateInterfaceMock.GetFunc: method is nil but PodSecurityPolicyTemplateInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockPodSecurityPolicyTemplateInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockPodSecurityPolicyTemplateInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateInterface.GetCalls()) +func (mock *PodSecurityPolicyTemplateInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockPodSecurityPolicyTemplateInterfaceMockGet.RLock() + calls = mock.calls.Get + lockPodSecurityPolicyTemplateInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *PodSecurityPolicyTemplateInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.PodSecurityPolicyTemplate, error) { + if mock.GetNamespacedFunc == nil { + panic("PodSecurityPolicyTemplateInterfaceMock.GetNamespacedFunc: method is nil but PodSecurityPolicyTemplateInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockPodSecurityPolicyTemplateInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockPodSecurityPolicyTemplateInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateInterface.GetNamespacedCalls()) +func (mock *PodSecurityPolicyTemplateInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockPodSecurityPolicyTemplateInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockPodSecurityPolicyTemplateInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *PodSecurityPolicyTemplateInterfaceMock) List(opts v1.ListOptions) (*v3.PodSecurityPolicyTemplateList, error) { + if mock.ListFunc == nil { + panic("PodSecurityPolicyTemplateInterfaceMock.ListFunc: method is nil but PodSecurityPolicyTemplateInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockPodSecurityPolicyTemplateInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockPodSecurityPolicyTemplateInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateInterface.ListCalls()) +func (mock *PodSecurityPolicyTemplateInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockPodSecurityPolicyTemplateInterfaceMockList.RLock() + calls = mock.calls.List + lockPodSecurityPolicyTemplateInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *PodSecurityPolicyTemplateInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("PodSecurityPolicyTemplateInterfaceMock.ObjectClientFunc: method is nil but PodSecurityPolicyTemplateInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockPodSecurityPolicyTemplateInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockPodSecurityPolicyTemplateInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateInterface.ObjectClientCalls()) +func (mock *PodSecurityPolicyTemplateInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockPodSecurityPolicyTemplateInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockPodSecurityPolicyTemplateInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *PodSecurityPolicyTemplateInterfaceMock) Update(in1 *v3.PodSecurityPolicyTemplate) (*v3.PodSecurityPolicyTemplate, error) { + if mock.UpdateFunc == nil { + panic("PodSecurityPolicyTemplateInterfaceMock.UpdateFunc: method is nil but PodSecurityPolicyTemplateInterface.Update was just called") + } + callInfo := struct { + In1 *v3.PodSecurityPolicyTemplate + }{ + In1: in1, + } + lockPodSecurityPolicyTemplateInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockPodSecurityPolicyTemplateInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateInterface.UpdateCalls()) +func (mock *PodSecurityPolicyTemplateInterfaceMock) UpdateCalls() []struct { + In1 *v3.PodSecurityPolicyTemplate +} { + var calls []struct { + In1 *v3.PodSecurityPolicyTemplate + } + lockPodSecurityPolicyTemplateInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockPodSecurityPolicyTemplateInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *PodSecurityPolicyTemplateInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("PodSecurityPolicyTemplateInterfaceMock.WatchFunc: method is nil but PodSecurityPolicyTemplateInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockPodSecurityPolicyTemplateInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockPodSecurityPolicyTemplateInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateInterface.WatchCalls()) +func (mock *PodSecurityPolicyTemplateInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockPodSecurityPolicyTemplateInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockPodSecurityPolicyTemplateInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockPodSecurityPolicyTemplatesGetterMockPodSecurityPolicyTemplates sync.RWMutex +) + +// Ensure, that PodSecurityPolicyTemplatesGetterMock does implement PodSecurityPolicyTemplatesGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.PodSecurityPolicyTemplatesGetter = &PodSecurityPolicyTemplatesGetterMock{} + +// PodSecurityPolicyTemplatesGetterMock is a mock implementation of PodSecurityPolicyTemplatesGetter. +// +// func TestSomethingThatUsesPodSecurityPolicyTemplatesGetter(t *testing.T) { +// +// // make and configure a mocked PodSecurityPolicyTemplatesGetter +// mockedPodSecurityPolicyTemplatesGetter := &PodSecurityPolicyTemplatesGetterMock{ +// PodSecurityPolicyTemplatesFunc: func(namespace string) v3.PodSecurityPolicyTemplateInterface { +// panic("mock out the PodSecurityPolicyTemplates method") +// }, +// } +// +// // use mockedPodSecurityPolicyTemplatesGetter in code that requires PodSecurityPolicyTemplatesGetter +// // and then make assertions. +// +// } +type PodSecurityPolicyTemplatesGetterMock struct { + // PodSecurityPolicyTemplatesFunc mocks the PodSecurityPolicyTemplates method. + PodSecurityPolicyTemplatesFunc func(namespace string) v3.PodSecurityPolicyTemplateInterface + + // calls tracks calls to the methods. + calls struct { + // PodSecurityPolicyTemplates holds details about calls to the PodSecurityPolicyTemplates method. + PodSecurityPolicyTemplates []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// PodSecurityPolicyTemplates calls PodSecurityPolicyTemplatesFunc. +func (mock *PodSecurityPolicyTemplatesGetterMock) PodSecurityPolicyTemplates(namespace string) v3.PodSecurityPolicyTemplateInterface { + if mock.PodSecurityPolicyTemplatesFunc == nil { + panic("PodSecurityPolicyTemplatesGetterMock.PodSecurityPolicyTemplatesFunc: method is nil but PodSecurityPolicyTemplatesGetter.PodSecurityPolicyTemplates was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockPodSecurityPolicyTemplatesGetterMockPodSecurityPolicyTemplates.Lock() + mock.calls.PodSecurityPolicyTemplates = append(mock.calls.PodSecurityPolicyTemplates, callInfo) + lockPodSecurityPolicyTemplatesGetterMockPodSecurityPolicyTemplates.Unlock() + return mock.PodSecurityPolicyTemplatesFunc(namespace) +} + +// PodSecurityPolicyTemplatesCalls gets all the calls that were made to PodSecurityPolicyTemplates. +// Check the length with: +// len(mockedPodSecurityPolicyTemplatesGetter.PodSecurityPolicyTemplatesCalls()) +func (mock *PodSecurityPolicyTemplatesGetterMock) PodSecurityPolicyTemplatesCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockPodSecurityPolicyTemplatesGetterMockPodSecurityPolicyTemplates.RLock() + calls = mock.calls.PodSecurityPolicyTemplates + lockPodSecurityPolicyTemplatesGetterMockPodSecurityPolicyTemplates.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_pod_security_policy_template_project_binding_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_pod_security_policy_template_project_binding_mock_test.go new file mode 100644 index 00000000..a3a5c80d --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_pod_security_policy_template_project_binding_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockPodSecurityPolicyTemplateProjectBindingListerMockGet sync.RWMutex + lockPodSecurityPolicyTemplateProjectBindingListerMockList sync.RWMutex +) + +// Ensure, that PodSecurityPolicyTemplateProjectBindingListerMock does implement PodSecurityPolicyTemplateProjectBindingLister. +// If this is not the case, regenerate this file with moq. +var _ v3.PodSecurityPolicyTemplateProjectBindingLister = &PodSecurityPolicyTemplateProjectBindingListerMock{} + +// PodSecurityPolicyTemplateProjectBindingListerMock is a mock implementation of PodSecurityPolicyTemplateProjectBindingLister. +// +// func TestSomethingThatUsesPodSecurityPolicyTemplateProjectBindingLister(t *testing.T) { +// +// // make and configure a mocked PodSecurityPolicyTemplateProjectBindingLister +// mockedPodSecurityPolicyTemplateProjectBindingLister := &PodSecurityPolicyTemplateProjectBindingListerMock{ +// GetFunc: func(namespace string, name string) (*v3.PodSecurityPolicyTemplateProjectBinding, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.PodSecurityPolicyTemplateProjectBinding, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedPodSecurityPolicyTemplateProjectBindingLister in code that requires PodSecurityPolicyTemplateProjectBindingLister +// // and then make assertions. +// +// } +type PodSecurityPolicyTemplateProjectBindingListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.PodSecurityPolicyTemplateProjectBinding, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.PodSecurityPolicyTemplateProjectBinding, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *PodSecurityPolicyTemplateProjectBindingListerMock) Get(namespace string, name string) (*v3.PodSecurityPolicyTemplateProjectBinding, error) { + if mock.GetFunc == nil { + panic("PodSecurityPolicyTemplateProjectBindingListerMock.GetFunc: method is nil but PodSecurityPolicyTemplateProjectBindingLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockPodSecurityPolicyTemplateProjectBindingListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockPodSecurityPolicyTemplateProjectBindingListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateProjectBindingLister.GetCalls()) +func (mock *PodSecurityPolicyTemplateProjectBindingListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockPodSecurityPolicyTemplateProjectBindingListerMockGet.RLock() + calls = mock.calls.Get + lockPodSecurityPolicyTemplateProjectBindingListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *PodSecurityPolicyTemplateProjectBindingListerMock) List(namespace string, selector labels.Selector) ([]*v3.PodSecurityPolicyTemplateProjectBinding, error) { + if mock.ListFunc == nil { + panic("PodSecurityPolicyTemplateProjectBindingListerMock.ListFunc: method is nil but PodSecurityPolicyTemplateProjectBindingLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockPodSecurityPolicyTemplateProjectBindingListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockPodSecurityPolicyTemplateProjectBindingListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateProjectBindingLister.ListCalls()) +func (mock *PodSecurityPolicyTemplateProjectBindingListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockPodSecurityPolicyTemplateProjectBindingListerMockList.RLock() + calls = mock.calls.List + lockPodSecurityPolicyTemplateProjectBindingListerMockList.RUnlock() + return calls +} + +var ( + lockPodSecurityPolicyTemplateProjectBindingControllerMockAddClusterScopedHandler sync.RWMutex + lockPodSecurityPolicyTemplateProjectBindingControllerMockAddHandler sync.RWMutex + lockPodSecurityPolicyTemplateProjectBindingControllerMockEnqueue sync.RWMutex + lockPodSecurityPolicyTemplateProjectBindingControllerMockGeneric sync.RWMutex + lockPodSecurityPolicyTemplateProjectBindingControllerMockInformer sync.RWMutex + lockPodSecurityPolicyTemplateProjectBindingControllerMockLister sync.RWMutex + lockPodSecurityPolicyTemplateProjectBindingControllerMockStart sync.RWMutex + lockPodSecurityPolicyTemplateProjectBindingControllerMockSync sync.RWMutex +) + +// Ensure, that PodSecurityPolicyTemplateProjectBindingControllerMock does implement PodSecurityPolicyTemplateProjectBindingController. +// If this is not the case, regenerate this file with moq. +var _ v3.PodSecurityPolicyTemplateProjectBindingController = &PodSecurityPolicyTemplateProjectBindingControllerMock{} + +// PodSecurityPolicyTemplateProjectBindingControllerMock is a mock implementation of PodSecurityPolicyTemplateProjectBindingController. +// +// func TestSomethingThatUsesPodSecurityPolicyTemplateProjectBindingController(t *testing.T) { +// +// // make and configure a mocked PodSecurityPolicyTemplateProjectBindingController +// mockedPodSecurityPolicyTemplateProjectBindingController := &PodSecurityPolicyTemplateProjectBindingControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.PodSecurityPolicyTemplateProjectBindingHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.PodSecurityPolicyTemplateProjectBindingHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.PodSecurityPolicyTemplateProjectBindingLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedPodSecurityPolicyTemplateProjectBindingController in code that requires PodSecurityPolicyTemplateProjectBindingController +// // and then make assertions. +// +// } +type PodSecurityPolicyTemplateProjectBindingControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.PodSecurityPolicyTemplateProjectBindingHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.PodSecurityPolicyTemplateProjectBindingHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.PodSecurityPolicyTemplateProjectBindingLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.PodSecurityPolicyTemplateProjectBindingHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.PodSecurityPolicyTemplateProjectBindingHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *PodSecurityPolicyTemplateProjectBindingControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.PodSecurityPolicyTemplateProjectBindingHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("PodSecurityPolicyTemplateProjectBindingControllerMock.AddClusterScopedHandlerFunc: method is nil but PodSecurityPolicyTemplateProjectBindingController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.PodSecurityPolicyTemplateProjectBindingHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockPodSecurityPolicyTemplateProjectBindingControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockPodSecurityPolicyTemplateProjectBindingControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateProjectBindingController.AddClusterScopedHandlerCalls()) +func (mock *PodSecurityPolicyTemplateProjectBindingControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.PodSecurityPolicyTemplateProjectBindingHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.PodSecurityPolicyTemplateProjectBindingHandlerFunc + } + lockPodSecurityPolicyTemplateProjectBindingControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockPodSecurityPolicyTemplateProjectBindingControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *PodSecurityPolicyTemplateProjectBindingControllerMock) AddHandler(ctx context.Context, name string, handler v3.PodSecurityPolicyTemplateProjectBindingHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("PodSecurityPolicyTemplateProjectBindingControllerMock.AddHandlerFunc: method is nil but PodSecurityPolicyTemplateProjectBindingController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.PodSecurityPolicyTemplateProjectBindingHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockPodSecurityPolicyTemplateProjectBindingControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockPodSecurityPolicyTemplateProjectBindingControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateProjectBindingController.AddHandlerCalls()) +func (mock *PodSecurityPolicyTemplateProjectBindingControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.PodSecurityPolicyTemplateProjectBindingHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.PodSecurityPolicyTemplateProjectBindingHandlerFunc + } + lockPodSecurityPolicyTemplateProjectBindingControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockPodSecurityPolicyTemplateProjectBindingControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *PodSecurityPolicyTemplateProjectBindingControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("PodSecurityPolicyTemplateProjectBindingControllerMock.EnqueueFunc: method is nil but PodSecurityPolicyTemplateProjectBindingController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockPodSecurityPolicyTemplateProjectBindingControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockPodSecurityPolicyTemplateProjectBindingControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateProjectBindingController.EnqueueCalls()) +func (mock *PodSecurityPolicyTemplateProjectBindingControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockPodSecurityPolicyTemplateProjectBindingControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockPodSecurityPolicyTemplateProjectBindingControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *PodSecurityPolicyTemplateProjectBindingControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("PodSecurityPolicyTemplateProjectBindingControllerMock.GenericFunc: method is nil but PodSecurityPolicyTemplateProjectBindingController.Generic was just called") + } + callInfo := struct { + }{} + lockPodSecurityPolicyTemplateProjectBindingControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockPodSecurityPolicyTemplateProjectBindingControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateProjectBindingController.GenericCalls()) +func (mock *PodSecurityPolicyTemplateProjectBindingControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockPodSecurityPolicyTemplateProjectBindingControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockPodSecurityPolicyTemplateProjectBindingControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *PodSecurityPolicyTemplateProjectBindingControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("PodSecurityPolicyTemplateProjectBindingControllerMock.InformerFunc: method is nil but PodSecurityPolicyTemplateProjectBindingController.Informer was just called") + } + callInfo := struct { + }{} + lockPodSecurityPolicyTemplateProjectBindingControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockPodSecurityPolicyTemplateProjectBindingControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateProjectBindingController.InformerCalls()) +func (mock *PodSecurityPolicyTemplateProjectBindingControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockPodSecurityPolicyTemplateProjectBindingControllerMockInformer.RLock() + calls = mock.calls.Informer + lockPodSecurityPolicyTemplateProjectBindingControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *PodSecurityPolicyTemplateProjectBindingControllerMock) Lister() v3.PodSecurityPolicyTemplateProjectBindingLister { + if mock.ListerFunc == nil { + panic("PodSecurityPolicyTemplateProjectBindingControllerMock.ListerFunc: method is nil but PodSecurityPolicyTemplateProjectBindingController.Lister was just called") + } + callInfo := struct { + }{} + lockPodSecurityPolicyTemplateProjectBindingControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockPodSecurityPolicyTemplateProjectBindingControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateProjectBindingController.ListerCalls()) +func (mock *PodSecurityPolicyTemplateProjectBindingControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockPodSecurityPolicyTemplateProjectBindingControllerMockLister.RLock() + calls = mock.calls.Lister + lockPodSecurityPolicyTemplateProjectBindingControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *PodSecurityPolicyTemplateProjectBindingControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("PodSecurityPolicyTemplateProjectBindingControllerMock.StartFunc: method is nil but PodSecurityPolicyTemplateProjectBindingController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockPodSecurityPolicyTemplateProjectBindingControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockPodSecurityPolicyTemplateProjectBindingControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateProjectBindingController.StartCalls()) +func (mock *PodSecurityPolicyTemplateProjectBindingControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockPodSecurityPolicyTemplateProjectBindingControllerMockStart.RLock() + calls = mock.calls.Start + lockPodSecurityPolicyTemplateProjectBindingControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *PodSecurityPolicyTemplateProjectBindingControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("PodSecurityPolicyTemplateProjectBindingControllerMock.SyncFunc: method is nil but PodSecurityPolicyTemplateProjectBindingController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockPodSecurityPolicyTemplateProjectBindingControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockPodSecurityPolicyTemplateProjectBindingControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateProjectBindingController.SyncCalls()) +func (mock *PodSecurityPolicyTemplateProjectBindingControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockPodSecurityPolicyTemplateProjectBindingControllerMockSync.RLock() + calls = mock.calls.Sync + lockPodSecurityPolicyTemplateProjectBindingControllerMockSync.RUnlock() + return calls +} + +var ( + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockAddClusterScopedHandler sync.RWMutex + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockAddHandler sync.RWMutex + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockAddLifecycle sync.RWMutex + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockController sync.RWMutex + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockCreate sync.RWMutex + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockDelete sync.RWMutex + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockDeleteCollection sync.RWMutex + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockDeleteNamespaced sync.RWMutex + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockGet sync.RWMutex + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockGetNamespaced sync.RWMutex + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockList sync.RWMutex + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockObjectClient sync.RWMutex + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockUpdate sync.RWMutex + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockWatch sync.RWMutex +) + +// Ensure, that PodSecurityPolicyTemplateProjectBindingInterfaceMock does implement PodSecurityPolicyTemplateProjectBindingInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.PodSecurityPolicyTemplateProjectBindingInterface = &PodSecurityPolicyTemplateProjectBindingInterfaceMock{} + +// PodSecurityPolicyTemplateProjectBindingInterfaceMock is a mock implementation of PodSecurityPolicyTemplateProjectBindingInterface. +// +// func TestSomethingThatUsesPodSecurityPolicyTemplateProjectBindingInterface(t *testing.T) { +// +// // make and configure a mocked PodSecurityPolicyTemplateProjectBindingInterface +// mockedPodSecurityPolicyTemplateProjectBindingInterface := &PodSecurityPolicyTemplateProjectBindingInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.PodSecurityPolicyTemplateProjectBindingHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.PodSecurityPolicyTemplateProjectBindingLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.PodSecurityPolicyTemplateProjectBindingHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.PodSecurityPolicyTemplateProjectBindingLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.PodSecurityPolicyTemplateProjectBindingController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.PodSecurityPolicyTemplateProjectBinding) (*v3.PodSecurityPolicyTemplateProjectBinding, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.PodSecurityPolicyTemplateProjectBinding, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.PodSecurityPolicyTemplateProjectBinding, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.PodSecurityPolicyTemplateProjectBindingList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.PodSecurityPolicyTemplateProjectBinding) (*v3.PodSecurityPolicyTemplateProjectBinding, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedPodSecurityPolicyTemplateProjectBindingInterface in code that requires PodSecurityPolicyTemplateProjectBindingInterface +// // and then make assertions. +// +// } +type PodSecurityPolicyTemplateProjectBindingInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.PodSecurityPolicyTemplateProjectBindingHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.PodSecurityPolicyTemplateProjectBindingLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.PodSecurityPolicyTemplateProjectBindingHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.PodSecurityPolicyTemplateProjectBindingLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.PodSecurityPolicyTemplateProjectBindingController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.PodSecurityPolicyTemplateProjectBinding) (*v3.PodSecurityPolicyTemplateProjectBinding, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.PodSecurityPolicyTemplateProjectBinding, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.PodSecurityPolicyTemplateProjectBinding, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.PodSecurityPolicyTemplateProjectBindingList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.PodSecurityPolicyTemplateProjectBinding) (*v3.PodSecurityPolicyTemplateProjectBinding, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.PodSecurityPolicyTemplateProjectBindingHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.PodSecurityPolicyTemplateProjectBindingLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.PodSecurityPolicyTemplateProjectBindingHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.PodSecurityPolicyTemplateProjectBindingLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.PodSecurityPolicyTemplateProjectBinding + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.PodSecurityPolicyTemplateProjectBinding + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *PodSecurityPolicyTemplateProjectBindingInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.PodSecurityPolicyTemplateProjectBindingHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("PodSecurityPolicyTemplateProjectBindingInterfaceMock.AddClusterScopedHandlerFunc: method is nil but PodSecurityPolicyTemplateProjectBindingInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.PodSecurityPolicyTemplateProjectBindingHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateProjectBindingInterface.AddClusterScopedHandlerCalls()) +func (mock *PodSecurityPolicyTemplateProjectBindingInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.PodSecurityPolicyTemplateProjectBindingHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.PodSecurityPolicyTemplateProjectBindingHandlerFunc + } + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *PodSecurityPolicyTemplateProjectBindingInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.PodSecurityPolicyTemplateProjectBindingLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("PodSecurityPolicyTemplateProjectBindingInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but PodSecurityPolicyTemplateProjectBindingInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.PodSecurityPolicyTemplateProjectBindingLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateProjectBindingInterface.AddClusterScopedLifecycleCalls()) +func (mock *PodSecurityPolicyTemplateProjectBindingInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.PodSecurityPolicyTemplateProjectBindingLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.PodSecurityPolicyTemplateProjectBindingLifecycle + } + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *PodSecurityPolicyTemplateProjectBindingInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.PodSecurityPolicyTemplateProjectBindingHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("PodSecurityPolicyTemplateProjectBindingInterfaceMock.AddHandlerFunc: method is nil but PodSecurityPolicyTemplateProjectBindingInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.PodSecurityPolicyTemplateProjectBindingHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateProjectBindingInterface.AddHandlerCalls()) +func (mock *PodSecurityPolicyTemplateProjectBindingInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.PodSecurityPolicyTemplateProjectBindingHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.PodSecurityPolicyTemplateProjectBindingHandlerFunc + } + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *PodSecurityPolicyTemplateProjectBindingInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.PodSecurityPolicyTemplateProjectBindingLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("PodSecurityPolicyTemplateProjectBindingInterfaceMock.AddLifecycleFunc: method is nil but PodSecurityPolicyTemplateProjectBindingInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.PodSecurityPolicyTemplateProjectBindingLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateProjectBindingInterface.AddLifecycleCalls()) +func (mock *PodSecurityPolicyTemplateProjectBindingInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.PodSecurityPolicyTemplateProjectBindingLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.PodSecurityPolicyTemplateProjectBindingLifecycle + } + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *PodSecurityPolicyTemplateProjectBindingInterfaceMock) Controller() v3.PodSecurityPolicyTemplateProjectBindingController { + if mock.ControllerFunc == nil { + panic("PodSecurityPolicyTemplateProjectBindingInterfaceMock.ControllerFunc: method is nil but PodSecurityPolicyTemplateProjectBindingInterface.Controller was just called") + } + callInfo := struct { + }{} + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateProjectBindingInterface.ControllerCalls()) +func (mock *PodSecurityPolicyTemplateProjectBindingInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockController.RLock() + calls = mock.calls.Controller + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *PodSecurityPolicyTemplateProjectBindingInterfaceMock) Create(in1 *v3.PodSecurityPolicyTemplateProjectBinding) (*v3.PodSecurityPolicyTemplateProjectBinding, error) { + if mock.CreateFunc == nil { + panic("PodSecurityPolicyTemplateProjectBindingInterfaceMock.CreateFunc: method is nil but PodSecurityPolicyTemplateProjectBindingInterface.Create was just called") + } + callInfo := struct { + In1 *v3.PodSecurityPolicyTemplateProjectBinding + }{ + In1: in1, + } + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateProjectBindingInterface.CreateCalls()) +func (mock *PodSecurityPolicyTemplateProjectBindingInterfaceMock) CreateCalls() []struct { + In1 *v3.PodSecurityPolicyTemplateProjectBinding +} { + var calls []struct { + In1 *v3.PodSecurityPolicyTemplateProjectBinding + } + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *PodSecurityPolicyTemplateProjectBindingInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("PodSecurityPolicyTemplateProjectBindingInterfaceMock.DeleteFunc: method is nil but PodSecurityPolicyTemplateProjectBindingInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateProjectBindingInterface.DeleteCalls()) +func (mock *PodSecurityPolicyTemplateProjectBindingInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *PodSecurityPolicyTemplateProjectBindingInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("PodSecurityPolicyTemplateProjectBindingInterfaceMock.DeleteCollectionFunc: method is nil but PodSecurityPolicyTemplateProjectBindingInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateProjectBindingInterface.DeleteCollectionCalls()) +func (mock *PodSecurityPolicyTemplateProjectBindingInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *PodSecurityPolicyTemplateProjectBindingInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("PodSecurityPolicyTemplateProjectBindingInterfaceMock.DeleteNamespacedFunc: method is nil but PodSecurityPolicyTemplateProjectBindingInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateProjectBindingInterface.DeleteNamespacedCalls()) +func (mock *PodSecurityPolicyTemplateProjectBindingInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *PodSecurityPolicyTemplateProjectBindingInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.PodSecurityPolicyTemplateProjectBinding, error) { + if mock.GetFunc == nil { + panic("PodSecurityPolicyTemplateProjectBindingInterfaceMock.GetFunc: method is nil but PodSecurityPolicyTemplateProjectBindingInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateProjectBindingInterface.GetCalls()) +func (mock *PodSecurityPolicyTemplateProjectBindingInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockGet.RLock() + calls = mock.calls.Get + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *PodSecurityPolicyTemplateProjectBindingInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.PodSecurityPolicyTemplateProjectBinding, error) { + if mock.GetNamespacedFunc == nil { + panic("PodSecurityPolicyTemplateProjectBindingInterfaceMock.GetNamespacedFunc: method is nil but PodSecurityPolicyTemplateProjectBindingInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateProjectBindingInterface.GetNamespacedCalls()) +func (mock *PodSecurityPolicyTemplateProjectBindingInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *PodSecurityPolicyTemplateProjectBindingInterfaceMock) List(opts v1.ListOptions) (*v3.PodSecurityPolicyTemplateProjectBindingList, error) { + if mock.ListFunc == nil { + panic("PodSecurityPolicyTemplateProjectBindingInterfaceMock.ListFunc: method is nil but PodSecurityPolicyTemplateProjectBindingInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateProjectBindingInterface.ListCalls()) +func (mock *PodSecurityPolicyTemplateProjectBindingInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockList.RLock() + calls = mock.calls.List + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *PodSecurityPolicyTemplateProjectBindingInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("PodSecurityPolicyTemplateProjectBindingInterfaceMock.ObjectClientFunc: method is nil but PodSecurityPolicyTemplateProjectBindingInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateProjectBindingInterface.ObjectClientCalls()) +func (mock *PodSecurityPolicyTemplateProjectBindingInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *PodSecurityPolicyTemplateProjectBindingInterfaceMock) Update(in1 *v3.PodSecurityPolicyTemplateProjectBinding) (*v3.PodSecurityPolicyTemplateProjectBinding, error) { + if mock.UpdateFunc == nil { + panic("PodSecurityPolicyTemplateProjectBindingInterfaceMock.UpdateFunc: method is nil but PodSecurityPolicyTemplateProjectBindingInterface.Update was just called") + } + callInfo := struct { + In1 *v3.PodSecurityPolicyTemplateProjectBinding + }{ + In1: in1, + } + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateProjectBindingInterface.UpdateCalls()) +func (mock *PodSecurityPolicyTemplateProjectBindingInterfaceMock) UpdateCalls() []struct { + In1 *v3.PodSecurityPolicyTemplateProjectBinding +} { + var calls []struct { + In1 *v3.PodSecurityPolicyTemplateProjectBinding + } + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *PodSecurityPolicyTemplateProjectBindingInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("PodSecurityPolicyTemplateProjectBindingInterfaceMock.WatchFunc: method is nil but PodSecurityPolicyTemplateProjectBindingInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateProjectBindingInterface.WatchCalls()) +func (mock *PodSecurityPolicyTemplateProjectBindingInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockPodSecurityPolicyTemplateProjectBindingInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockPodSecurityPolicyTemplateProjectBindingsGetterMockPodSecurityPolicyTemplateProjectBindings sync.RWMutex +) + +// Ensure, that PodSecurityPolicyTemplateProjectBindingsGetterMock does implement PodSecurityPolicyTemplateProjectBindingsGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.PodSecurityPolicyTemplateProjectBindingsGetter = &PodSecurityPolicyTemplateProjectBindingsGetterMock{} + +// PodSecurityPolicyTemplateProjectBindingsGetterMock is a mock implementation of PodSecurityPolicyTemplateProjectBindingsGetter. +// +// func TestSomethingThatUsesPodSecurityPolicyTemplateProjectBindingsGetter(t *testing.T) { +// +// // make and configure a mocked PodSecurityPolicyTemplateProjectBindingsGetter +// mockedPodSecurityPolicyTemplateProjectBindingsGetter := &PodSecurityPolicyTemplateProjectBindingsGetterMock{ +// PodSecurityPolicyTemplateProjectBindingsFunc: func(namespace string) v3.PodSecurityPolicyTemplateProjectBindingInterface { +// panic("mock out the PodSecurityPolicyTemplateProjectBindings method") +// }, +// } +// +// // use mockedPodSecurityPolicyTemplateProjectBindingsGetter in code that requires PodSecurityPolicyTemplateProjectBindingsGetter +// // and then make assertions. +// +// } +type PodSecurityPolicyTemplateProjectBindingsGetterMock struct { + // PodSecurityPolicyTemplateProjectBindingsFunc mocks the PodSecurityPolicyTemplateProjectBindings method. + PodSecurityPolicyTemplateProjectBindingsFunc func(namespace string) v3.PodSecurityPolicyTemplateProjectBindingInterface + + // calls tracks calls to the methods. + calls struct { + // PodSecurityPolicyTemplateProjectBindings holds details about calls to the PodSecurityPolicyTemplateProjectBindings method. + PodSecurityPolicyTemplateProjectBindings []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// PodSecurityPolicyTemplateProjectBindings calls PodSecurityPolicyTemplateProjectBindingsFunc. +func (mock *PodSecurityPolicyTemplateProjectBindingsGetterMock) PodSecurityPolicyTemplateProjectBindings(namespace string) v3.PodSecurityPolicyTemplateProjectBindingInterface { + if mock.PodSecurityPolicyTemplateProjectBindingsFunc == nil { + panic("PodSecurityPolicyTemplateProjectBindingsGetterMock.PodSecurityPolicyTemplateProjectBindingsFunc: method is nil but PodSecurityPolicyTemplateProjectBindingsGetter.PodSecurityPolicyTemplateProjectBindings was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockPodSecurityPolicyTemplateProjectBindingsGetterMockPodSecurityPolicyTemplateProjectBindings.Lock() + mock.calls.PodSecurityPolicyTemplateProjectBindings = append(mock.calls.PodSecurityPolicyTemplateProjectBindings, callInfo) + lockPodSecurityPolicyTemplateProjectBindingsGetterMockPodSecurityPolicyTemplateProjectBindings.Unlock() + return mock.PodSecurityPolicyTemplateProjectBindingsFunc(namespace) +} + +// PodSecurityPolicyTemplateProjectBindingsCalls gets all the calls that were made to PodSecurityPolicyTemplateProjectBindings. +// Check the length with: +// len(mockedPodSecurityPolicyTemplateProjectBindingsGetter.PodSecurityPolicyTemplateProjectBindingsCalls()) +func (mock *PodSecurityPolicyTemplateProjectBindingsGetterMock) PodSecurityPolicyTemplateProjectBindingsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockPodSecurityPolicyTemplateProjectBindingsGetterMockPodSecurityPolicyTemplateProjectBindings.RLock() + calls = mock.calls.PodSecurityPolicyTemplateProjectBindings + lockPodSecurityPolicyTemplateProjectBindingsGetterMockPodSecurityPolicyTemplateProjectBindings.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_preference_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_preference_mock_test.go new file mode 100644 index 00000000..e98c60e0 --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_preference_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockPreferenceListerMockGet sync.RWMutex + lockPreferenceListerMockList sync.RWMutex +) + +// Ensure, that PreferenceListerMock does implement PreferenceLister. +// If this is not the case, regenerate this file with moq. +var _ v3.PreferenceLister = &PreferenceListerMock{} + +// PreferenceListerMock is a mock implementation of PreferenceLister. +// +// func TestSomethingThatUsesPreferenceLister(t *testing.T) { +// +// // make and configure a mocked PreferenceLister +// mockedPreferenceLister := &PreferenceListerMock{ +// GetFunc: func(namespace string, name string) (*v3.Preference, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.Preference, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedPreferenceLister in code that requires PreferenceLister +// // and then make assertions. +// +// } +type PreferenceListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.Preference, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.Preference, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *PreferenceListerMock) Get(namespace string, name string) (*v3.Preference, error) { + if mock.GetFunc == nil { + panic("PreferenceListerMock.GetFunc: method is nil but PreferenceLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockPreferenceListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockPreferenceListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedPreferenceLister.GetCalls()) +func (mock *PreferenceListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockPreferenceListerMockGet.RLock() + calls = mock.calls.Get + lockPreferenceListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *PreferenceListerMock) List(namespace string, selector labels.Selector) ([]*v3.Preference, error) { + if mock.ListFunc == nil { + panic("PreferenceListerMock.ListFunc: method is nil but PreferenceLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockPreferenceListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockPreferenceListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedPreferenceLister.ListCalls()) +func (mock *PreferenceListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockPreferenceListerMockList.RLock() + calls = mock.calls.List + lockPreferenceListerMockList.RUnlock() + return calls +} + +var ( + lockPreferenceControllerMockAddClusterScopedHandler sync.RWMutex + lockPreferenceControllerMockAddHandler sync.RWMutex + lockPreferenceControllerMockEnqueue sync.RWMutex + lockPreferenceControllerMockGeneric sync.RWMutex + lockPreferenceControllerMockInformer sync.RWMutex + lockPreferenceControllerMockLister sync.RWMutex + lockPreferenceControllerMockStart sync.RWMutex + lockPreferenceControllerMockSync sync.RWMutex +) + +// Ensure, that PreferenceControllerMock does implement PreferenceController. +// If this is not the case, regenerate this file with moq. +var _ v3.PreferenceController = &PreferenceControllerMock{} + +// PreferenceControllerMock is a mock implementation of PreferenceController. +// +// func TestSomethingThatUsesPreferenceController(t *testing.T) { +// +// // make and configure a mocked PreferenceController +// mockedPreferenceController := &PreferenceControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.PreferenceHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.PreferenceHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.PreferenceLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedPreferenceController in code that requires PreferenceController +// // and then make assertions. +// +// } +type PreferenceControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.PreferenceHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.PreferenceHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.PreferenceLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.PreferenceHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.PreferenceHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *PreferenceControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.PreferenceHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("PreferenceControllerMock.AddClusterScopedHandlerFunc: method is nil but PreferenceController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.PreferenceHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockPreferenceControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockPreferenceControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedPreferenceController.AddClusterScopedHandlerCalls()) +func (mock *PreferenceControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.PreferenceHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.PreferenceHandlerFunc + } + lockPreferenceControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockPreferenceControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *PreferenceControllerMock) AddHandler(ctx context.Context, name string, handler v3.PreferenceHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("PreferenceControllerMock.AddHandlerFunc: method is nil but PreferenceController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.PreferenceHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockPreferenceControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockPreferenceControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedPreferenceController.AddHandlerCalls()) +func (mock *PreferenceControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.PreferenceHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.PreferenceHandlerFunc + } + lockPreferenceControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockPreferenceControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *PreferenceControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("PreferenceControllerMock.EnqueueFunc: method is nil but PreferenceController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockPreferenceControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockPreferenceControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedPreferenceController.EnqueueCalls()) +func (mock *PreferenceControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockPreferenceControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockPreferenceControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *PreferenceControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("PreferenceControllerMock.GenericFunc: method is nil but PreferenceController.Generic was just called") + } + callInfo := struct { + }{} + lockPreferenceControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockPreferenceControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedPreferenceController.GenericCalls()) +func (mock *PreferenceControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockPreferenceControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockPreferenceControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *PreferenceControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("PreferenceControllerMock.InformerFunc: method is nil but PreferenceController.Informer was just called") + } + callInfo := struct { + }{} + lockPreferenceControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockPreferenceControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedPreferenceController.InformerCalls()) +func (mock *PreferenceControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockPreferenceControllerMockInformer.RLock() + calls = mock.calls.Informer + lockPreferenceControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *PreferenceControllerMock) Lister() v3.PreferenceLister { + if mock.ListerFunc == nil { + panic("PreferenceControllerMock.ListerFunc: method is nil but PreferenceController.Lister was just called") + } + callInfo := struct { + }{} + lockPreferenceControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockPreferenceControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedPreferenceController.ListerCalls()) +func (mock *PreferenceControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockPreferenceControllerMockLister.RLock() + calls = mock.calls.Lister + lockPreferenceControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *PreferenceControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("PreferenceControllerMock.StartFunc: method is nil but PreferenceController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockPreferenceControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockPreferenceControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedPreferenceController.StartCalls()) +func (mock *PreferenceControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockPreferenceControllerMockStart.RLock() + calls = mock.calls.Start + lockPreferenceControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *PreferenceControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("PreferenceControllerMock.SyncFunc: method is nil but PreferenceController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockPreferenceControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockPreferenceControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedPreferenceController.SyncCalls()) +func (mock *PreferenceControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockPreferenceControllerMockSync.RLock() + calls = mock.calls.Sync + lockPreferenceControllerMockSync.RUnlock() + return calls +} + +var ( + lockPreferenceInterfaceMockAddClusterScopedHandler sync.RWMutex + lockPreferenceInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockPreferenceInterfaceMockAddHandler sync.RWMutex + lockPreferenceInterfaceMockAddLifecycle sync.RWMutex + lockPreferenceInterfaceMockController sync.RWMutex + lockPreferenceInterfaceMockCreate sync.RWMutex + lockPreferenceInterfaceMockDelete sync.RWMutex + lockPreferenceInterfaceMockDeleteCollection sync.RWMutex + lockPreferenceInterfaceMockDeleteNamespaced sync.RWMutex + lockPreferenceInterfaceMockGet sync.RWMutex + lockPreferenceInterfaceMockGetNamespaced sync.RWMutex + lockPreferenceInterfaceMockList sync.RWMutex + lockPreferenceInterfaceMockObjectClient sync.RWMutex + lockPreferenceInterfaceMockUpdate sync.RWMutex + lockPreferenceInterfaceMockWatch sync.RWMutex +) + +// Ensure, that PreferenceInterfaceMock does implement PreferenceInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.PreferenceInterface = &PreferenceInterfaceMock{} + +// PreferenceInterfaceMock is a mock implementation of PreferenceInterface. +// +// func TestSomethingThatUsesPreferenceInterface(t *testing.T) { +// +// // make and configure a mocked PreferenceInterface +// mockedPreferenceInterface := &PreferenceInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.PreferenceHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.PreferenceLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.PreferenceHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.PreferenceLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.PreferenceController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.Preference) (*v3.Preference, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.Preference, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.Preference, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.PreferenceList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.Preference) (*v3.Preference, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedPreferenceInterface in code that requires PreferenceInterface +// // and then make assertions. +// +// } +type PreferenceInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.PreferenceHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.PreferenceLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.PreferenceHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.PreferenceLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.PreferenceController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.Preference) (*v3.Preference, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.Preference, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.Preference, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.PreferenceList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.Preference) (*v3.Preference, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.PreferenceHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.PreferenceLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.PreferenceHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.PreferenceLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.Preference + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.Preference + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *PreferenceInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.PreferenceHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("PreferenceInterfaceMock.AddClusterScopedHandlerFunc: method is nil but PreferenceInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.PreferenceHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockPreferenceInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockPreferenceInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedPreferenceInterface.AddClusterScopedHandlerCalls()) +func (mock *PreferenceInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.PreferenceHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.PreferenceHandlerFunc + } + lockPreferenceInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockPreferenceInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *PreferenceInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.PreferenceLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("PreferenceInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but PreferenceInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.PreferenceLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockPreferenceInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockPreferenceInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedPreferenceInterface.AddClusterScopedLifecycleCalls()) +func (mock *PreferenceInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.PreferenceLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.PreferenceLifecycle + } + lockPreferenceInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockPreferenceInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *PreferenceInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.PreferenceHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("PreferenceInterfaceMock.AddHandlerFunc: method is nil but PreferenceInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.PreferenceHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockPreferenceInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockPreferenceInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedPreferenceInterface.AddHandlerCalls()) +func (mock *PreferenceInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.PreferenceHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.PreferenceHandlerFunc + } + lockPreferenceInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockPreferenceInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *PreferenceInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.PreferenceLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("PreferenceInterfaceMock.AddLifecycleFunc: method is nil but PreferenceInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.PreferenceLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockPreferenceInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockPreferenceInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedPreferenceInterface.AddLifecycleCalls()) +func (mock *PreferenceInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.PreferenceLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.PreferenceLifecycle + } + lockPreferenceInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockPreferenceInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *PreferenceInterfaceMock) Controller() v3.PreferenceController { + if mock.ControllerFunc == nil { + panic("PreferenceInterfaceMock.ControllerFunc: method is nil but PreferenceInterface.Controller was just called") + } + callInfo := struct { + }{} + lockPreferenceInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockPreferenceInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedPreferenceInterface.ControllerCalls()) +func (mock *PreferenceInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockPreferenceInterfaceMockController.RLock() + calls = mock.calls.Controller + lockPreferenceInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *PreferenceInterfaceMock) Create(in1 *v3.Preference) (*v3.Preference, error) { + if mock.CreateFunc == nil { + panic("PreferenceInterfaceMock.CreateFunc: method is nil but PreferenceInterface.Create was just called") + } + callInfo := struct { + In1 *v3.Preference + }{ + In1: in1, + } + lockPreferenceInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockPreferenceInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedPreferenceInterface.CreateCalls()) +func (mock *PreferenceInterfaceMock) CreateCalls() []struct { + In1 *v3.Preference +} { + var calls []struct { + In1 *v3.Preference + } + lockPreferenceInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockPreferenceInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *PreferenceInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("PreferenceInterfaceMock.DeleteFunc: method is nil but PreferenceInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockPreferenceInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockPreferenceInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedPreferenceInterface.DeleteCalls()) +func (mock *PreferenceInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockPreferenceInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockPreferenceInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *PreferenceInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("PreferenceInterfaceMock.DeleteCollectionFunc: method is nil but PreferenceInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockPreferenceInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockPreferenceInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedPreferenceInterface.DeleteCollectionCalls()) +func (mock *PreferenceInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockPreferenceInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockPreferenceInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *PreferenceInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("PreferenceInterfaceMock.DeleteNamespacedFunc: method is nil but PreferenceInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockPreferenceInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockPreferenceInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedPreferenceInterface.DeleteNamespacedCalls()) +func (mock *PreferenceInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockPreferenceInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockPreferenceInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *PreferenceInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.Preference, error) { + if mock.GetFunc == nil { + panic("PreferenceInterfaceMock.GetFunc: method is nil but PreferenceInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockPreferenceInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockPreferenceInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedPreferenceInterface.GetCalls()) +func (mock *PreferenceInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockPreferenceInterfaceMockGet.RLock() + calls = mock.calls.Get + lockPreferenceInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *PreferenceInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.Preference, error) { + if mock.GetNamespacedFunc == nil { + panic("PreferenceInterfaceMock.GetNamespacedFunc: method is nil but PreferenceInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockPreferenceInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockPreferenceInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedPreferenceInterface.GetNamespacedCalls()) +func (mock *PreferenceInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockPreferenceInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockPreferenceInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *PreferenceInterfaceMock) List(opts v1.ListOptions) (*v3.PreferenceList, error) { + if mock.ListFunc == nil { + panic("PreferenceInterfaceMock.ListFunc: method is nil but PreferenceInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockPreferenceInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockPreferenceInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedPreferenceInterface.ListCalls()) +func (mock *PreferenceInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockPreferenceInterfaceMockList.RLock() + calls = mock.calls.List + lockPreferenceInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *PreferenceInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("PreferenceInterfaceMock.ObjectClientFunc: method is nil but PreferenceInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockPreferenceInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockPreferenceInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedPreferenceInterface.ObjectClientCalls()) +func (mock *PreferenceInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockPreferenceInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockPreferenceInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *PreferenceInterfaceMock) Update(in1 *v3.Preference) (*v3.Preference, error) { + if mock.UpdateFunc == nil { + panic("PreferenceInterfaceMock.UpdateFunc: method is nil but PreferenceInterface.Update was just called") + } + callInfo := struct { + In1 *v3.Preference + }{ + In1: in1, + } + lockPreferenceInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockPreferenceInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedPreferenceInterface.UpdateCalls()) +func (mock *PreferenceInterfaceMock) UpdateCalls() []struct { + In1 *v3.Preference +} { + var calls []struct { + In1 *v3.Preference + } + lockPreferenceInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockPreferenceInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *PreferenceInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("PreferenceInterfaceMock.WatchFunc: method is nil but PreferenceInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockPreferenceInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockPreferenceInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedPreferenceInterface.WatchCalls()) +func (mock *PreferenceInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockPreferenceInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockPreferenceInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockPreferencesGetterMockPreferences sync.RWMutex +) + +// Ensure, that PreferencesGetterMock does implement PreferencesGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.PreferencesGetter = &PreferencesGetterMock{} + +// PreferencesGetterMock is a mock implementation of PreferencesGetter. +// +// func TestSomethingThatUsesPreferencesGetter(t *testing.T) { +// +// // make and configure a mocked PreferencesGetter +// mockedPreferencesGetter := &PreferencesGetterMock{ +// PreferencesFunc: func(namespace string) v3.PreferenceInterface { +// panic("mock out the Preferences method") +// }, +// } +// +// // use mockedPreferencesGetter in code that requires PreferencesGetter +// // and then make assertions. +// +// } +type PreferencesGetterMock struct { + // PreferencesFunc mocks the Preferences method. + PreferencesFunc func(namespace string) v3.PreferenceInterface + + // calls tracks calls to the methods. + calls struct { + // Preferences holds details about calls to the Preferences method. + Preferences []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// Preferences calls PreferencesFunc. +func (mock *PreferencesGetterMock) Preferences(namespace string) v3.PreferenceInterface { + if mock.PreferencesFunc == nil { + panic("PreferencesGetterMock.PreferencesFunc: method is nil but PreferencesGetter.Preferences was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockPreferencesGetterMockPreferences.Lock() + mock.calls.Preferences = append(mock.calls.Preferences, callInfo) + lockPreferencesGetterMockPreferences.Unlock() + return mock.PreferencesFunc(namespace) +} + +// PreferencesCalls gets all the calls that were made to Preferences. +// Check the length with: +// len(mockedPreferencesGetter.PreferencesCalls()) +func (mock *PreferencesGetterMock) PreferencesCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockPreferencesGetterMockPreferences.RLock() + calls = mock.calls.Preferences + lockPreferencesGetterMockPreferences.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_principal_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_principal_mock_test.go new file mode 100644 index 00000000..1b4c4778 --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_principal_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockPrincipalListerMockGet sync.RWMutex + lockPrincipalListerMockList sync.RWMutex +) + +// Ensure, that PrincipalListerMock does implement PrincipalLister. +// If this is not the case, regenerate this file with moq. +var _ v3.PrincipalLister = &PrincipalListerMock{} + +// PrincipalListerMock is a mock implementation of PrincipalLister. +// +// func TestSomethingThatUsesPrincipalLister(t *testing.T) { +// +// // make and configure a mocked PrincipalLister +// mockedPrincipalLister := &PrincipalListerMock{ +// GetFunc: func(namespace string, name string) (*v3.Principal, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.Principal, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedPrincipalLister in code that requires PrincipalLister +// // and then make assertions. +// +// } +type PrincipalListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.Principal, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.Principal, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *PrincipalListerMock) Get(namespace string, name string) (*v3.Principal, error) { + if mock.GetFunc == nil { + panic("PrincipalListerMock.GetFunc: method is nil but PrincipalLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockPrincipalListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockPrincipalListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedPrincipalLister.GetCalls()) +func (mock *PrincipalListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockPrincipalListerMockGet.RLock() + calls = mock.calls.Get + lockPrincipalListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *PrincipalListerMock) List(namespace string, selector labels.Selector) ([]*v3.Principal, error) { + if mock.ListFunc == nil { + panic("PrincipalListerMock.ListFunc: method is nil but PrincipalLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockPrincipalListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockPrincipalListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedPrincipalLister.ListCalls()) +func (mock *PrincipalListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockPrincipalListerMockList.RLock() + calls = mock.calls.List + lockPrincipalListerMockList.RUnlock() + return calls +} + +var ( + lockPrincipalControllerMockAddClusterScopedHandler sync.RWMutex + lockPrincipalControllerMockAddHandler sync.RWMutex + lockPrincipalControllerMockEnqueue sync.RWMutex + lockPrincipalControllerMockGeneric sync.RWMutex + lockPrincipalControllerMockInformer sync.RWMutex + lockPrincipalControllerMockLister sync.RWMutex + lockPrincipalControllerMockStart sync.RWMutex + lockPrincipalControllerMockSync sync.RWMutex +) + +// Ensure, that PrincipalControllerMock does implement PrincipalController. +// If this is not the case, regenerate this file with moq. +var _ v3.PrincipalController = &PrincipalControllerMock{} + +// PrincipalControllerMock is a mock implementation of PrincipalController. +// +// func TestSomethingThatUsesPrincipalController(t *testing.T) { +// +// // make and configure a mocked PrincipalController +// mockedPrincipalController := &PrincipalControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.PrincipalHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.PrincipalHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.PrincipalLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedPrincipalController in code that requires PrincipalController +// // and then make assertions. +// +// } +type PrincipalControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.PrincipalHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.PrincipalHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.PrincipalLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.PrincipalHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.PrincipalHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *PrincipalControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.PrincipalHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("PrincipalControllerMock.AddClusterScopedHandlerFunc: method is nil but PrincipalController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.PrincipalHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockPrincipalControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockPrincipalControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedPrincipalController.AddClusterScopedHandlerCalls()) +func (mock *PrincipalControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.PrincipalHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.PrincipalHandlerFunc + } + lockPrincipalControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockPrincipalControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *PrincipalControllerMock) AddHandler(ctx context.Context, name string, handler v3.PrincipalHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("PrincipalControllerMock.AddHandlerFunc: method is nil but PrincipalController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.PrincipalHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockPrincipalControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockPrincipalControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedPrincipalController.AddHandlerCalls()) +func (mock *PrincipalControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.PrincipalHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.PrincipalHandlerFunc + } + lockPrincipalControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockPrincipalControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *PrincipalControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("PrincipalControllerMock.EnqueueFunc: method is nil but PrincipalController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockPrincipalControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockPrincipalControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedPrincipalController.EnqueueCalls()) +func (mock *PrincipalControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockPrincipalControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockPrincipalControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *PrincipalControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("PrincipalControllerMock.GenericFunc: method is nil but PrincipalController.Generic was just called") + } + callInfo := struct { + }{} + lockPrincipalControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockPrincipalControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedPrincipalController.GenericCalls()) +func (mock *PrincipalControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockPrincipalControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockPrincipalControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *PrincipalControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("PrincipalControllerMock.InformerFunc: method is nil but PrincipalController.Informer was just called") + } + callInfo := struct { + }{} + lockPrincipalControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockPrincipalControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedPrincipalController.InformerCalls()) +func (mock *PrincipalControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockPrincipalControllerMockInformer.RLock() + calls = mock.calls.Informer + lockPrincipalControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *PrincipalControllerMock) Lister() v3.PrincipalLister { + if mock.ListerFunc == nil { + panic("PrincipalControllerMock.ListerFunc: method is nil but PrincipalController.Lister was just called") + } + callInfo := struct { + }{} + lockPrincipalControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockPrincipalControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedPrincipalController.ListerCalls()) +func (mock *PrincipalControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockPrincipalControllerMockLister.RLock() + calls = mock.calls.Lister + lockPrincipalControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *PrincipalControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("PrincipalControllerMock.StartFunc: method is nil but PrincipalController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockPrincipalControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockPrincipalControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedPrincipalController.StartCalls()) +func (mock *PrincipalControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockPrincipalControllerMockStart.RLock() + calls = mock.calls.Start + lockPrincipalControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *PrincipalControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("PrincipalControllerMock.SyncFunc: method is nil but PrincipalController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockPrincipalControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockPrincipalControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedPrincipalController.SyncCalls()) +func (mock *PrincipalControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockPrincipalControllerMockSync.RLock() + calls = mock.calls.Sync + lockPrincipalControllerMockSync.RUnlock() + return calls +} + +var ( + lockPrincipalInterfaceMockAddClusterScopedHandler sync.RWMutex + lockPrincipalInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockPrincipalInterfaceMockAddHandler sync.RWMutex + lockPrincipalInterfaceMockAddLifecycle sync.RWMutex + lockPrincipalInterfaceMockController sync.RWMutex + lockPrincipalInterfaceMockCreate sync.RWMutex + lockPrincipalInterfaceMockDelete sync.RWMutex + lockPrincipalInterfaceMockDeleteCollection sync.RWMutex + lockPrincipalInterfaceMockDeleteNamespaced sync.RWMutex + lockPrincipalInterfaceMockGet sync.RWMutex + lockPrincipalInterfaceMockGetNamespaced sync.RWMutex + lockPrincipalInterfaceMockList sync.RWMutex + lockPrincipalInterfaceMockObjectClient sync.RWMutex + lockPrincipalInterfaceMockUpdate sync.RWMutex + lockPrincipalInterfaceMockWatch sync.RWMutex +) + +// Ensure, that PrincipalInterfaceMock does implement PrincipalInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.PrincipalInterface = &PrincipalInterfaceMock{} + +// PrincipalInterfaceMock is a mock implementation of PrincipalInterface. +// +// func TestSomethingThatUsesPrincipalInterface(t *testing.T) { +// +// // make and configure a mocked PrincipalInterface +// mockedPrincipalInterface := &PrincipalInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.PrincipalHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.PrincipalLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.PrincipalHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.PrincipalLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.PrincipalController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.Principal) (*v3.Principal, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.Principal, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.Principal, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.PrincipalList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.Principal) (*v3.Principal, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedPrincipalInterface in code that requires PrincipalInterface +// // and then make assertions. +// +// } +type PrincipalInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.PrincipalHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.PrincipalLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.PrincipalHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.PrincipalLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.PrincipalController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.Principal) (*v3.Principal, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.Principal, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.Principal, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.PrincipalList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.Principal) (*v3.Principal, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.PrincipalHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.PrincipalLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.PrincipalHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.PrincipalLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.Principal + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.Principal + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *PrincipalInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.PrincipalHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("PrincipalInterfaceMock.AddClusterScopedHandlerFunc: method is nil but PrincipalInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.PrincipalHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockPrincipalInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockPrincipalInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedPrincipalInterface.AddClusterScopedHandlerCalls()) +func (mock *PrincipalInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.PrincipalHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.PrincipalHandlerFunc + } + lockPrincipalInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockPrincipalInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *PrincipalInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.PrincipalLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("PrincipalInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but PrincipalInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.PrincipalLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockPrincipalInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockPrincipalInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedPrincipalInterface.AddClusterScopedLifecycleCalls()) +func (mock *PrincipalInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.PrincipalLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.PrincipalLifecycle + } + lockPrincipalInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockPrincipalInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *PrincipalInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.PrincipalHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("PrincipalInterfaceMock.AddHandlerFunc: method is nil but PrincipalInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.PrincipalHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockPrincipalInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockPrincipalInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedPrincipalInterface.AddHandlerCalls()) +func (mock *PrincipalInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.PrincipalHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.PrincipalHandlerFunc + } + lockPrincipalInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockPrincipalInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *PrincipalInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.PrincipalLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("PrincipalInterfaceMock.AddLifecycleFunc: method is nil but PrincipalInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.PrincipalLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockPrincipalInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockPrincipalInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedPrincipalInterface.AddLifecycleCalls()) +func (mock *PrincipalInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.PrincipalLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.PrincipalLifecycle + } + lockPrincipalInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockPrincipalInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *PrincipalInterfaceMock) Controller() v3.PrincipalController { + if mock.ControllerFunc == nil { + panic("PrincipalInterfaceMock.ControllerFunc: method is nil but PrincipalInterface.Controller was just called") + } + callInfo := struct { + }{} + lockPrincipalInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockPrincipalInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedPrincipalInterface.ControllerCalls()) +func (mock *PrincipalInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockPrincipalInterfaceMockController.RLock() + calls = mock.calls.Controller + lockPrincipalInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *PrincipalInterfaceMock) Create(in1 *v3.Principal) (*v3.Principal, error) { + if mock.CreateFunc == nil { + panic("PrincipalInterfaceMock.CreateFunc: method is nil but PrincipalInterface.Create was just called") + } + callInfo := struct { + In1 *v3.Principal + }{ + In1: in1, + } + lockPrincipalInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockPrincipalInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedPrincipalInterface.CreateCalls()) +func (mock *PrincipalInterfaceMock) CreateCalls() []struct { + In1 *v3.Principal +} { + var calls []struct { + In1 *v3.Principal + } + lockPrincipalInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockPrincipalInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *PrincipalInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("PrincipalInterfaceMock.DeleteFunc: method is nil but PrincipalInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockPrincipalInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockPrincipalInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedPrincipalInterface.DeleteCalls()) +func (mock *PrincipalInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockPrincipalInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockPrincipalInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *PrincipalInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("PrincipalInterfaceMock.DeleteCollectionFunc: method is nil but PrincipalInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockPrincipalInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockPrincipalInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedPrincipalInterface.DeleteCollectionCalls()) +func (mock *PrincipalInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockPrincipalInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockPrincipalInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *PrincipalInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("PrincipalInterfaceMock.DeleteNamespacedFunc: method is nil but PrincipalInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockPrincipalInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockPrincipalInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedPrincipalInterface.DeleteNamespacedCalls()) +func (mock *PrincipalInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockPrincipalInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockPrincipalInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *PrincipalInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.Principal, error) { + if mock.GetFunc == nil { + panic("PrincipalInterfaceMock.GetFunc: method is nil but PrincipalInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockPrincipalInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockPrincipalInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedPrincipalInterface.GetCalls()) +func (mock *PrincipalInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockPrincipalInterfaceMockGet.RLock() + calls = mock.calls.Get + lockPrincipalInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *PrincipalInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.Principal, error) { + if mock.GetNamespacedFunc == nil { + panic("PrincipalInterfaceMock.GetNamespacedFunc: method is nil but PrincipalInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockPrincipalInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockPrincipalInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedPrincipalInterface.GetNamespacedCalls()) +func (mock *PrincipalInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockPrincipalInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockPrincipalInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *PrincipalInterfaceMock) List(opts v1.ListOptions) (*v3.PrincipalList, error) { + if mock.ListFunc == nil { + panic("PrincipalInterfaceMock.ListFunc: method is nil but PrincipalInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockPrincipalInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockPrincipalInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedPrincipalInterface.ListCalls()) +func (mock *PrincipalInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockPrincipalInterfaceMockList.RLock() + calls = mock.calls.List + lockPrincipalInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *PrincipalInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("PrincipalInterfaceMock.ObjectClientFunc: method is nil but PrincipalInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockPrincipalInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockPrincipalInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedPrincipalInterface.ObjectClientCalls()) +func (mock *PrincipalInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockPrincipalInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockPrincipalInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *PrincipalInterfaceMock) Update(in1 *v3.Principal) (*v3.Principal, error) { + if mock.UpdateFunc == nil { + panic("PrincipalInterfaceMock.UpdateFunc: method is nil but PrincipalInterface.Update was just called") + } + callInfo := struct { + In1 *v3.Principal + }{ + In1: in1, + } + lockPrincipalInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockPrincipalInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedPrincipalInterface.UpdateCalls()) +func (mock *PrincipalInterfaceMock) UpdateCalls() []struct { + In1 *v3.Principal +} { + var calls []struct { + In1 *v3.Principal + } + lockPrincipalInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockPrincipalInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *PrincipalInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("PrincipalInterfaceMock.WatchFunc: method is nil but PrincipalInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockPrincipalInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockPrincipalInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedPrincipalInterface.WatchCalls()) +func (mock *PrincipalInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockPrincipalInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockPrincipalInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockPrincipalsGetterMockPrincipals sync.RWMutex +) + +// Ensure, that PrincipalsGetterMock does implement PrincipalsGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.PrincipalsGetter = &PrincipalsGetterMock{} + +// PrincipalsGetterMock is a mock implementation of PrincipalsGetter. +// +// func TestSomethingThatUsesPrincipalsGetter(t *testing.T) { +// +// // make and configure a mocked PrincipalsGetter +// mockedPrincipalsGetter := &PrincipalsGetterMock{ +// PrincipalsFunc: func(namespace string) v3.PrincipalInterface { +// panic("mock out the Principals method") +// }, +// } +// +// // use mockedPrincipalsGetter in code that requires PrincipalsGetter +// // and then make assertions. +// +// } +type PrincipalsGetterMock struct { + // PrincipalsFunc mocks the Principals method. + PrincipalsFunc func(namespace string) v3.PrincipalInterface + + // calls tracks calls to the methods. + calls struct { + // Principals holds details about calls to the Principals method. + Principals []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// Principals calls PrincipalsFunc. +func (mock *PrincipalsGetterMock) Principals(namespace string) v3.PrincipalInterface { + if mock.PrincipalsFunc == nil { + panic("PrincipalsGetterMock.PrincipalsFunc: method is nil but PrincipalsGetter.Principals was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockPrincipalsGetterMockPrincipals.Lock() + mock.calls.Principals = append(mock.calls.Principals, callInfo) + lockPrincipalsGetterMockPrincipals.Unlock() + return mock.PrincipalsFunc(namespace) +} + +// PrincipalsCalls gets all the calls that were made to Principals. +// Check the length with: +// len(mockedPrincipalsGetter.PrincipalsCalls()) +func (mock *PrincipalsGetterMock) PrincipalsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockPrincipalsGetterMockPrincipals.RLock() + calls = mock.calls.Principals + lockPrincipalsGetterMockPrincipals.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_project_alert_group_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_project_alert_group_mock_test.go new file mode 100644 index 00000000..e08c0295 --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_project_alert_group_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockProjectAlertGroupListerMockGet sync.RWMutex + lockProjectAlertGroupListerMockList sync.RWMutex +) + +// Ensure, that ProjectAlertGroupListerMock does implement ProjectAlertGroupLister. +// If this is not the case, regenerate this file with moq. +var _ v3.ProjectAlertGroupLister = &ProjectAlertGroupListerMock{} + +// ProjectAlertGroupListerMock is a mock implementation of ProjectAlertGroupLister. +// +// func TestSomethingThatUsesProjectAlertGroupLister(t *testing.T) { +// +// // make and configure a mocked ProjectAlertGroupLister +// mockedProjectAlertGroupLister := &ProjectAlertGroupListerMock{ +// GetFunc: func(namespace string, name string) (*v3.ProjectAlertGroup, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.ProjectAlertGroup, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedProjectAlertGroupLister in code that requires ProjectAlertGroupLister +// // and then make assertions. +// +// } +type ProjectAlertGroupListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.ProjectAlertGroup, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.ProjectAlertGroup, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *ProjectAlertGroupListerMock) Get(namespace string, name string) (*v3.ProjectAlertGroup, error) { + if mock.GetFunc == nil { + panic("ProjectAlertGroupListerMock.GetFunc: method is nil but ProjectAlertGroupLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockProjectAlertGroupListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockProjectAlertGroupListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedProjectAlertGroupLister.GetCalls()) +func (mock *ProjectAlertGroupListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockProjectAlertGroupListerMockGet.RLock() + calls = mock.calls.Get + lockProjectAlertGroupListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ProjectAlertGroupListerMock) List(namespace string, selector labels.Selector) ([]*v3.ProjectAlertGroup, error) { + if mock.ListFunc == nil { + panic("ProjectAlertGroupListerMock.ListFunc: method is nil but ProjectAlertGroupLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockProjectAlertGroupListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockProjectAlertGroupListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedProjectAlertGroupLister.ListCalls()) +func (mock *ProjectAlertGroupListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockProjectAlertGroupListerMockList.RLock() + calls = mock.calls.List + lockProjectAlertGroupListerMockList.RUnlock() + return calls +} + +var ( + lockProjectAlertGroupControllerMockAddClusterScopedHandler sync.RWMutex + lockProjectAlertGroupControllerMockAddHandler sync.RWMutex + lockProjectAlertGroupControllerMockEnqueue sync.RWMutex + lockProjectAlertGroupControllerMockGeneric sync.RWMutex + lockProjectAlertGroupControllerMockInformer sync.RWMutex + lockProjectAlertGroupControllerMockLister sync.RWMutex + lockProjectAlertGroupControllerMockStart sync.RWMutex + lockProjectAlertGroupControllerMockSync sync.RWMutex +) + +// Ensure, that ProjectAlertGroupControllerMock does implement ProjectAlertGroupController. +// If this is not the case, regenerate this file with moq. +var _ v3.ProjectAlertGroupController = &ProjectAlertGroupControllerMock{} + +// ProjectAlertGroupControllerMock is a mock implementation of ProjectAlertGroupController. +// +// func TestSomethingThatUsesProjectAlertGroupController(t *testing.T) { +// +// // make and configure a mocked ProjectAlertGroupController +// mockedProjectAlertGroupController := &ProjectAlertGroupControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.ProjectAlertGroupHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.ProjectAlertGroupHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.ProjectAlertGroupLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedProjectAlertGroupController in code that requires ProjectAlertGroupController +// // and then make assertions. +// +// } +type ProjectAlertGroupControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.ProjectAlertGroupHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.ProjectAlertGroupHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.ProjectAlertGroupLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.ProjectAlertGroupHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.ProjectAlertGroupHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ProjectAlertGroupControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.ProjectAlertGroupHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ProjectAlertGroupControllerMock.AddClusterScopedHandlerFunc: method is nil but ProjectAlertGroupController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ProjectAlertGroupHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockProjectAlertGroupControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockProjectAlertGroupControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedProjectAlertGroupController.AddClusterScopedHandlerCalls()) +func (mock *ProjectAlertGroupControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ProjectAlertGroupHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ProjectAlertGroupHandlerFunc + } + lockProjectAlertGroupControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockProjectAlertGroupControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ProjectAlertGroupControllerMock) AddHandler(ctx context.Context, name string, handler v3.ProjectAlertGroupHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ProjectAlertGroupControllerMock.AddHandlerFunc: method is nil but ProjectAlertGroupController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.ProjectAlertGroupHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockProjectAlertGroupControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockProjectAlertGroupControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedProjectAlertGroupController.AddHandlerCalls()) +func (mock *ProjectAlertGroupControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.ProjectAlertGroupHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.ProjectAlertGroupHandlerFunc + } + lockProjectAlertGroupControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockProjectAlertGroupControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *ProjectAlertGroupControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("ProjectAlertGroupControllerMock.EnqueueFunc: method is nil but ProjectAlertGroupController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockProjectAlertGroupControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockProjectAlertGroupControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedProjectAlertGroupController.EnqueueCalls()) +func (mock *ProjectAlertGroupControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockProjectAlertGroupControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockProjectAlertGroupControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *ProjectAlertGroupControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("ProjectAlertGroupControllerMock.GenericFunc: method is nil but ProjectAlertGroupController.Generic was just called") + } + callInfo := struct { + }{} + lockProjectAlertGroupControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockProjectAlertGroupControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedProjectAlertGroupController.GenericCalls()) +func (mock *ProjectAlertGroupControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockProjectAlertGroupControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockProjectAlertGroupControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *ProjectAlertGroupControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("ProjectAlertGroupControllerMock.InformerFunc: method is nil but ProjectAlertGroupController.Informer was just called") + } + callInfo := struct { + }{} + lockProjectAlertGroupControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockProjectAlertGroupControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedProjectAlertGroupController.InformerCalls()) +func (mock *ProjectAlertGroupControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockProjectAlertGroupControllerMockInformer.RLock() + calls = mock.calls.Informer + lockProjectAlertGroupControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *ProjectAlertGroupControllerMock) Lister() v3.ProjectAlertGroupLister { + if mock.ListerFunc == nil { + panic("ProjectAlertGroupControllerMock.ListerFunc: method is nil but ProjectAlertGroupController.Lister was just called") + } + callInfo := struct { + }{} + lockProjectAlertGroupControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockProjectAlertGroupControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedProjectAlertGroupController.ListerCalls()) +func (mock *ProjectAlertGroupControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockProjectAlertGroupControllerMockLister.RLock() + calls = mock.calls.Lister + lockProjectAlertGroupControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *ProjectAlertGroupControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("ProjectAlertGroupControllerMock.StartFunc: method is nil but ProjectAlertGroupController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockProjectAlertGroupControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockProjectAlertGroupControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedProjectAlertGroupController.StartCalls()) +func (mock *ProjectAlertGroupControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockProjectAlertGroupControllerMockStart.RLock() + calls = mock.calls.Start + lockProjectAlertGroupControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *ProjectAlertGroupControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("ProjectAlertGroupControllerMock.SyncFunc: method is nil but ProjectAlertGroupController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockProjectAlertGroupControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockProjectAlertGroupControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedProjectAlertGroupController.SyncCalls()) +func (mock *ProjectAlertGroupControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockProjectAlertGroupControllerMockSync.RLock() + calls = mock.calls.Sync + lockProjectAlertGroupControllerMockSync.RUnlock() + return calls +} + +var ( + lockProjectAlertGroupInterfaceMockAddClusterScopedHandler sync.RWMutex + lockProjectAlertGroupInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockProjectAlertGroupInterfaceMockAddHandler sync.RWMutex + lockProjectAlertGroupInterfaceMockAddLifecycle sync.RWMutex + lockProjectAlertGroupInterfaceMockController sync.RWMutex + lockProjectAlertGroupInterfaceMockCreate sync.RWMutex + lockProjectAlertGroupInterfaceMockDelete sync.RWMutex + lockProjectAlertGroupInterfaceMockDeleteCollection sync.RWMutex + lockProjectAlertGroupInterfaceMockDeleteNamespaced sync.RWMutex + lockProjectAlertGroupInterfaceMockGet sync.RWMutex + lockProjectAlertGroupInterfaceMockGetNamespaced sync.RWMutex + lockProjectAlertGroupInterfaceMockList sync.RWMutex + lockProjectAlertGroupInterfaceMockObjectClient sync.RWMutex + lockProjectAlertGroupInterfaceMockUpdate sync.RWMutex + lockProjectAlertGroupInterfaceMockWatch sync.RWMutex +) + +// Ensure, that ProjectAlertGroupInterfaceMock does implement ProjectAlertGroupInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.ProjectAlertGroupInterface = &ProjectAlertGroupInterfaceMock{} + +// ProjectAlertGroupInterfaceMock is a mock implementation of ProjectAlertGroupInterface. +// +// func TestSomethingThatUsesProjectAlertGroupInterface(t *testing.T) { +// +// // make and configure a mocked ProjectAlertGroupInterface +// mockedProjectAlertGroupInterface := &ProjectAlertGroupInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.ProjectAlertGroupHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.ProjectAlertGroupLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.ProjectAlertGroupHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.ProjectAlertGroupLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.ProjectAlertGroupController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.ProjectAlertGroup) (*v3.ProjectAlertGroup, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.ProjectAlertGroup, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.ProjectAlertGroup, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.ProjectAlertGroupList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.ProjectAlertGroup) (*v3.ProjectAlertGroup, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedProjectAlertGroupInterface in code that requires ProjectAlertGroupInterface +// // and then make assertions. +// +// } +type ProjectAlertGroupInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.ProjectAlertGroupHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.ProjectAlertGroupLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.ProjectAlertGroupHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.ProjectAlertGroupLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.ProjectAlertGroupController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.ProjectAlertGroup) (*v3.ProjectAlertGroup, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.ProjectAlertGroup, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.ProjectAlertGroup, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.ProjectAlertGroupList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.ProjectAlertGroup) (*v3.ProjectAlertGroup, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.ProjectAlertGroupHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.ProjectAlertGroupLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.ProjectAlertGroupHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.ProjectAlertGroupLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.ProjectAlertGroup + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.ProjectAlertGroup + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ProjectAlertGroupInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.ProjectAlertGroupHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ProjectAlertGroupInterfaceMock.AddClusterScopedHandlerFunc: method is nil but ProjectAlertGroupInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ProjectAlertGroupHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockProjectAlertGroupInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockProjectAlertGroupInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedProjectAlertGroupInterface.AddClusterScopedHandlerCalls()) +func (mock *ProjectAlertGroupInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ProjectAlertGroupHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ProjectAlertGroupHandlerFunc + } + lockProjectAlertGroupInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockProjectAlertGroupInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *ProjectAlertGroupInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.ProjectAlertGroupLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("ProjectAlertGroupInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but ProjectAlertGroupInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ProjectAlertGroupLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockProjectAlertGroupInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockProjectAlertGroupInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedProjectAlertGroupInterface.AddClusterScopedLifecycleCalls()) +func (mock *ProjectAlertGroupInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ProjectAlertGroupLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ProjectAlertGroupLifecycle + } + lockProjectAlertGroupInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockProjectAlertGroupInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ProjectAlertGroupInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.ProjectAlertGroupHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ProjectAlertGroupInterfaceMock.AddHandlerFunc: method is nil but ProjectAlertGroupInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.ProjectAlertGroupHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockProjectAlertGroupInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockProjectAlertGroupInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedProjectAlertGroupInterface.AddHandlerCalls()) +func (mock *ProjectAlertGroupInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.ProjectAlertGroupHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.ProjectAlertGroupHandlerFunc + } + lockProjectAlertGroupInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockProjectAlertGroupInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *ProjectAlertGroupInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.ProjectAlertGroupLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("ProjectAlertGroupInterfaceMock.AddLifecycleFunc: method is nil but ProjectAlertGroupInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.ProjectAlertGroupLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockProjectAlertGroupInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockProjectAlertGroupInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedProjectAlertGroupInterface.AddLifecycleCalls()) +func (mock *ProjectAlertGroupInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.ProjectAlertGroupLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.ProjectAlertGroupLifecycle + } + lockProjectAlertGroupInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockProjectAlertGroupInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *ProjectAlertGroupInterfaceMock) Controller() v3.ProjectAlertGroupController { + if mock.ControllerFunc == nil { + panic("ProjectAlertGroupInterfaceMock.ControllerFunc: method is nil but ProjectAlertGroupInterface.Controller was just called") + } + callInfo := struct { + }{} + lockProjectAlertGroupInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockProjectAlertGroupInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedProjectAlertGroupInterface.ControllerCalls()) +func (mock *ProjectAlertGroupInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockProjectAlertGroupInterfaceMockController.RLock() + calls = mock.calls.Controller + lockProjectAlertGroupInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *ProjectAlertGroupInterfaceMock) Create(in1 *v3.ProjectAlertGroup) (*v3.ProjectAlertGroup, error) { + if mock.CreateFunc == nil { + panic("ProjectAlertGroupInterfaceMock.CreateFunc: method is nil but ProjectAlertGroupInterface.Create was just called") + } + callInfo := struct { + In1 *v3.ProjectAlertGroup + }{ + In1: in1, + } + lockProjectAlertGroupInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockProjectAlertGroupInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedProjectAlertGroupInterface.CreateCalls()) +func (mock *ProjectAlertGroupInterfaceMock) CreateCalls() []struct { + In1 *v3.ProjectAlertGroup +} { + var calls []struct { + In1 *v3.ProjectAlertGroup + } + lockProjectAlertGroupInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockProjectAlertGroupInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *ProjectAlertGroupInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("ProjectAlertGroupInterfaceMock.DeleteFunc: method is nil but ProjectAlertGroupInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockProjectAlertGroupInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockProjectAlertGroupInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedProjectAlertGroupInterface.DeleteCalls()) +func (mock *ProjectAlertGroupInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockProjectAlertGroupInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockProjectAlertGroupInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *ProjectAlertGroupInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("ProjectAlertGroupInterfaceMock.DeleteCollectionFunc: method is nil but ProjectAlertGroupInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockProjectAlertGroupInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockProjectAlertGroupInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedProjectAlertGroupInterface.DeleteCollectionCalls()) +func (mock *ProjectAlertGroupInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockProjectAlertGroupInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockProjectAlertGroupInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *ProjectAlertGroupInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("ProjectAlertGroupInterfaceMock.DeleteNamespacedFunc: method is nil but ProjectAlertGroupInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockProjectAlertGroupInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockProjectAlertGroupInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedProjectAlertGroupInterface.DeleteNamespacedCalls()) +func (mock *ProjectAlertGroupInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockProjectAlertGroupInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockProjectAlertGroupInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *ProjectAlertGroupInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.ProjectAlertGroup, error) { + if mock.GetFunc == nil { + panic("ProjectAlertGroupInterfaceMock.GetFunc: method is nil but ProjectAlertGroupInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockProjectAlertGroupInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockProjectAlertGroupInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedProjectAlertGroupInterface.GetCalls()) +func (mock *ProjectAlertGroupInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockProjectAlertGroupInterfaceMockGet.RLock() + calls = mock.calls.Get + lockProjectAlertGroupInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *ProjectAlertGroupInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.ProjectAlertGroup, error) { + if mock.GetNamespacedFunc == nil { + panic("ProjectAlertGroupInterfaceMock.GetNamespacedFunc: method is nil but ProjectAlertGroupInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockProjectAlertGroupInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockProjectAlertGroupInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedProjectAlertGroupInterface.GetNamespacedCalls()) +func (mock *ProjectAlertGroupInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockProjectAlertGroupInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockProjectAlertGroupInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ProjectAlertGroupInterfaceMock) List(opts v1.ListOptions) (*v3.ProjectAlertGroupList, error) { + if mock.ListFunc == nil { + panic("ProjectAlertGroupInterfaceMock.ListFunc: method is nil but ProjectAlertGroupInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockProjectAlertGroupInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockProjectAlertGroupInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedProjectAlertGroupInterface.ListCalls()) +func (mock *ProjectAlertGroupInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockProjectAlertGroupInterfaceMockList.RLock() + calls = mock.calls.List + lockProjectAlertGroupInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *ProjectAlertGroupInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("ProjectAlertGroupInterfaceMock.ObjectClientFunc: method is nil but ProjectAlertGroupInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockProjectAlertGroupInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockProjectAlertGroupInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedProjectAlertGroupInterface.ObjectClientCalls()) +func (mock *ProjectAlertGroupInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockProjectAlertGroupInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockProjectAlertGroupInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *ProjectAlertGroupInterfaceMock) Update(in1 *v3.ProjectAlertGroup) (*v3.ProjectAlertGroup, error) { + if mock.UpdateFunc == nil { + panic("ProjectAlertGroupInterfaceMock.UpdateFunc: method is nil but ProjectAlertGroupInterface.Update was just called") + } + callInfo := struct { + In1 *v3.ProjectAlertGroup + }{ + In1: in1, + } + lockProjectAlertGroupInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockProjectAlertGroupInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedProjectAlertGroupInterface.UpdateCalls()) +func (mock *ProjectAlertGroupInterfaceMock) UpdateCalls() []struct { + In1 *v3.ProjectAlertGroup +} { + var calls []struct { + In1 *v3.ProjectAlertGroup + } + lockProjectAlertGroupInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockProjectAlertGroupInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *ProjectAlertGroupInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("ProjectAlertGroupInterfaceMock.WatchFunc: method is nil but ProjectAlertGroupInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockProjectAlertGroupInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockProjectAlertGroupInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedProjectAlertGroupInterface.WatchCalls()) +func (mock *ProjectAlertGroupInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockProjectAlertGroupInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockProjectAlertGroupInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockProjectAlertGroupsGetterMockProjectAlertGroups sync.RWMutex +) + +// Ensure, that ProjectAlertGroupsGetterMock does implement ProjectAlertGroupsGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.ProjectAlertGroupsGetter = &ProjectAlertGroupsGetterMock{} + +// ProjectAlertGroupsGetterMock is a mock implementation of ProjectAlertGroupsGetter. +// +// func TestSomethingThatUsesProjectAlertGroupsGetter(t *testing.T) { +// +// // make and configure a mocked ProjectAlertGroupsGetter +// mockedProjectAlertGroupsGetter := &ProjectAlertGroupsGetterMock{ +// ProjectAlertGroupsFunc: func(namespace string) v3.ProjectAlertGroupInterface { +// panic("mock out the ProjectAlertGroups method") +// }, +// } +// +// // use mockedProjectAlertGroupsGetter in code that requires ProjectAlertGroupsGetter +// // and then make assertions. +// +// } +type ProjectAlertGroupsGetterMock struct { + // ProjectAlertGroupsFunc mocks the ProjectAlertGroups method. + ProjectAlertGroupsFunc func(namespace string) v3.ProjectAlertGroupInterface + + // calls tracks calls to the methods. + calls struct { + // ProjectAlertGroups holds details about calls to the ProjectAlertGroups method. + ProjectAlertGroups []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// ProjectAlertGroups calls ProjectAlertGroupsFunc. +func (mock *ProjectAlertGroupsGetterMock) ProjectAlertGroups(namespace string) v3.ProjectAlertGroupInterface { + if mock.ProjectAlertGroupsFunc == nil { + panic("ProjectAlertGroupsGetterMock.ProjectAlertGroupsFunc: method is nil but ProjectAlertGroupsGetter.ProjectAlertGroups was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockProjectAlertGroupsGetterMockProjectAlertGroups.Lock() + mock.calls.ProjectAlertGroups = append(mock.calls.ProjectAlertGroups, callInfo) + lockProjectAlertGroupsGetterMockProjectAlertGroups.Unlock() + return mock.ProjectAlertGroupsFunc(namespace) +} + +// ProjectAlertGroupsCalls gets all the calls that were made to ProjectAlertGroups. +// Check the length with: +// len(mockedProjectAlertGroupsGetter.ProjectAlertGroupsCalls()) +func (mock *ProjectAlertGroupsGetterMock) ProjectAlertGroupsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockProjectAlertGroupsGetterMockProjectAlertGroups.RLock() + calls = mock.calls.ProjectAlertGroups + lockProjectAlertGroupsGetterMockProjectAlertGroups.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_project_alert_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_project_alert_mock_test.go new file mode 100644 index 00000000..2b7de112 --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_project_alert_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockProjectAlertListerMockGet sync.RWMutex + lockProjectAlertListerMockList sync.RWMutex +) + +// Ensure, that ProjectAlertListerMock does implement ProjectAlertLister. +// If this is not the case, regenerate this file with moq. +var _ v3.ProjectAlertLister = &ProjectAlertListerMock{} + +// ProjectAlertListerMock is a mock implementation of ProjectAlertLister. +// +// func TestSomethingThatUsesProjectAlertLister(t *testing.T) { +// +// // make and configure a mocked ProjectAlertLister +// mockedProjectAlertLister := &ProjectAlertListerMock{ +// GetFunc: func(namespace string, name string) (*v3.ProjectAlert, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.ProjectAlert, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedProjectAlertLister in code that requires ProjectAlertLister +// // and then make assertions. +// +// } +type ProjectAlertListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.ProjectAlert, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.ProjectAlert, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *ProjectAlertListerMock) Get(namespace string, name string) (*v3.ProjectAlert, error) { + if mock.GetFunc == nil { + panic("ProjectAlertListerMock.GetFunc: method is nil but ProjectAlertLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockProjectAlertListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockProjectAlertListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedProjectAlertLister.GetCalls()) +func (mock *ProjectAlertListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockProjectAlertListerMockGet.RLock() + calls = mock.calls.Get + lockProjectAlertListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ProjectAlertListerMock) List(namespace string, selector labels.Selector) ([]*v3.ProjectAlert, error) { + if mock.ListFunc == nil { + panic("ProjectAlertListerMock.ListFunc: method is nil but ProjectAlertLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockProjectAlertListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockProjectAlertListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedProjectAlertLister.ListCalls()) +func (mock *ProjectAlertListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockProjectAlertListerMockList.RLock() + calls = mock.calls.List + lockProjectAlertListerMockList.RUnlock() + return calls +} + +var ( + lockProjectAlertControllerMockAddClusterScopedHandler sync.RWMutex + lockProjectAlertControllerMockAddHandler sync.RWMutex + lockProjectAlertControllerMockEnqueue sync.RWMutex + lockProjectAlertControllerMockGeneric sync.RWMutex + lockProjectAlertControllerMockInformer sync.RWMutex + lockProjectAlertControllerMockLister sync.RWMutex + lockProjectAlertControllerMockStart sync.RWMutex + lockProjectAlertControllerMockSync sync.RWMutex +) + +// Ensure, that ProjectAlertControllerMock does implement ProjectAlertController. +// If this is not the case, regenerate this file with moq. +var _ v3.ProjectAlertController = &ProjectAlertControllerMock{} + +// ProjectAlertControllerMock is a mock implementation of ProjectAlertController. +// +// func TestSomethingThatUsesProjectAlertController(t *testing.T) { +// +// // make and configure a mocked ProjectAlertController +// mockedProjectAlertController := &ProjectAlertControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.ProjectAlertHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.ProjectAlertHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.ProjectAlertLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedProjectAlertController in code that requires ProjectAlertController +// // and then make assertions. +// +// } +type ProjectAlertControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.ProjectAlertHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.ProjectAlertHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.ProjectAlertLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.ProjectAlertHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.ProjectAlertHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ProjectAlertControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.ProjectAlertHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ProjectAlertControllerMock.AddClusterScopedHandlerFunc: method is nil but ProjectAlertController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ProjectAlertHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockProjectAlertControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockProjectAlertControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedProjectAlertController.AddClusterScopedHandlerCalls()) +func (mock *ProjectAlertControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ProjectAlertHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ProjectAlertHandlerFunc + } + lockProjectAlertControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockProjectAlertControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ProjectAlertControllerMock) AddHandler(ctx context.Context, name string, handler v3.ProjectAlertHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ProjectAlertControllerMock.AddHandlerFunc: method is nil but ProjectAlertController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.ProjectAlertHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockProjectAlertControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockProjectAlertControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedProjectAlertController.AddHandlerCalls()) +func (mock *ProjectAlertControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.ProjectAlertHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.ProjectAlertHandlerFunc + } + lockProjectAlertControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockProjectAlertControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *ProjectAlertControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("ProjectAlertControllerMock.EnqueueFunc: method is nil but ProjectAlertController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockProjectAlertControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockProjectAlertControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedProjectAlertController.EnqueueCalls()) +func (mock *ProjectAlertControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockProjectAlertControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockProjectAlertControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *ProjectAlertControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("ProjectAlertControllerMock.GenericFunc: method is nil but ProjectAlertController.Generic was just called") + } + callInfo := struct { + }{} + lockProjectAlertControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockProjectAlertControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedProjectAlertController.GenericCalls()) +func (mock *ProjectAlertControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockProjectAlertControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockProjectAlertControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *ProjectAlertControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("ProjectAlertControllerMock.InformerFunc: method is nil but ProjectAlertController.Informer was just called") + } + callInfo := struct { + }{} + lockProjectAlertControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockProjectAlertControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedProjectAlertController.InformerCalls()) +func (mock *ProjectAlertControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockProjectAlertControllerMockInformer.RLock() + calls = mock.calls.Informer + lockProjectAlertControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *ProjectAlertControllerMock) Lister() v3.ProjectAlertLister { + if mock.ListerFunc == nil { + panic("ProjectAlertControllerMock.ListerFunc: method is nil but ProjectAlertController.Lister was just called") + } + callInfo := struct { + }{} + lockProjectAlertControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockProjectAlertControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedProjectAlertController.ListerCalls()) +func (mock *ProjectAlertControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockProjectAlertControllerMockLister.RLock() + calls = mock.calls.Lister + lockProjectAlertControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *ProjectAlertControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("ProjectAlertControllerMock.StartFunc: method is nil but ProjectAlertController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockProjectAlertControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockProjectAlertControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedProjectAlertController.StartCalls()) +func (mock *ProjectAlertControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockProjectAlertControllerMockStart.RLock() + calls = mock.calls.Start + lockProjectAlertControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *ProjectAlertControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("ProjectAlertControllerMock.SyncFunc: method is nil but ProjectAlertController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockProjectAlertControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockProjectAlertControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedProjectAlertController.SyncCalls()) +func (mock *ProjectAlertControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockProjectAlertControllerMockSync.RLock() + calls = mock.calls.Sync + lockProjectAlertControllerMockSync.RUnlock() + return calls +} + +var ( + lockProjectAlertInterfaceMockAddClusterScopedHandler sync.RWMutex + lockProjectAlertInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockProjectAlertInterfaceMockAddHandler sync.RWMutex + lockProjectAlertInterfaceMockAddLifecycle sync.RWMutex + lockProjectAlertInterfaceMockController sync.RWMutex + lockProjectAlertInterfaceMockCreate sync.RWMutex + lockProjectAlertInterfaceMockDelete sync.RWMutex + lockProjectAlertInterfaceMockDeleteCollection sync.RWMutex + lockProjectAlertInterfaceMockDeleteNamespaced sync.RWMutex + lockProjectAlertInterfaceMockGet sync.RWMutex + lockProjectAlertInterfaceMockGetNamespaced sync.RWMutex + lockProjectAlertInterfaceMockList sync.RWMutex + lockProjectAlertInterfaceMockObjectClient sync.RWMutex + lockProjectAlertInterfaceMockUpdate sync.RWMutex + lockProjectAlertInterfaceMockWatch sync.RWMutex +) + +// Ensure, that ProjectAlertInterfaceMock does implement ProjectAlertInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.ProjectAlertInterface = &ProjectAlertInterfaceMock{} + +// ProjectAlertInterfaceMock is a mock implementation of ProjectAlertInterface. +// +// func TestSomethingThatUsesProjectAlertInterface(t *testing.T) { +// +// // make and configure a mocked ProjectAlertInterface +// mockedProjectAlertInterface := &ProjectAlertInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.ProjectAlertHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.ProjectAlertLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.ProjectAlertHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.ProjectAlertLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.ProjectAlertController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.ProjectAlert) (*v3.ProjectAlert, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.ProjectAlert, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.ProjectAlert, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.ProjectAlertList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.ProjectAlert) (*v3.ProjectAlert, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedProjectAlertInterface in code that requires ProjectAlertInterface +// // and then make assertions. +// +// } +type ProjectAlertInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.ProjectAlertHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.ProjectAlertLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.ProjectAlertHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.ProjectAlertLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.ProjectAlertController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.ProjectAlert) (*v3.ProjectAlert, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.ProjectAlert, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.ProjectAlert, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.ProjectAlertList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.ProjectAlert) (*v3.ProjectAlert, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.ProjectAlertHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.ProjectAlertLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.ProjectAlertHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.ProjectAlertLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.ProjectAlert + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.ProjectAlert + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ProjectAlertInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.ProjectAlertHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ProjectAlertInterfaceMock.AddClusterScopedHandlerFunc: method is nil but ProjectAlertInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ProjectAlertHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockProjectAlertInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockProjectAlertInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedProjectAlertInterface.AddClusterScopedHandlerCalls()) +func (mock *ProjectAlertInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ProjectAlertHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ProjectAlertHandlerFunc + } + lockProjectAlertInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockProjectAlertInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *ProjectAlertInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.ProjectAlertLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("ProjectAlertInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but ProjectAlertInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ProjectAlertLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockProjectAlertInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockProjectAlertInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedProjectAlertInterface.AddClusterScopedLifecycleCalls()) +func (mock *ProjectAlertInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ProjectAlertLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ProjectAlertLifecycle + } + lockProjectAlertInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockProjectAlertInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ProjectAlertInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.ProjectAlertHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ProjectAlertInterfaceMock.AddHandlerFunc: method is nil but ProjectAlertInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.ProjectAlertHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockProjectAlertInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockProjectAlertInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedProjectAlertInterface.AddHandlerCalls()) +func (mock *ProjectAlertInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.ProjectAlertHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.ProjectAlertHandlerFunc + } + lockProjectAlertInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockProjectAlertInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *ProjectAlertInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.ProjectAlertLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("ProjectAlertInterfaceMock.AddLifecycleFunc: method is nil but ProjectAlertInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.ProjectAlertLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockProjectAlertInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockProjectAlertInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedProjectAlertInterface.AddLifecycleCalls()) +func (mock *ProjectAlertInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.ProjectAlertLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.ProjectAlertLifecycle + } + lockProjectAlertInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockProjectAlertInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *ProjectAlertInterfaceMock) Controller() v3.ProjectAlertController { + if mock.ControllerFunc == nil { + panic("ProjectAlertInterfaceMock.ControllerFunc: method is nil but ProjectAlertInterface.Controller was just called") + } + callInfo := struct { + }{} + lockProjectAlertInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockProjectAlertInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedProjectAlertInterface.ControllerCalls()) +func (mock *ProjectAlertInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockProjectAlertInterfaceMockController.RLock() + calls = mock.calls.Controller + lockProjectAlertInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *ProjectAlertInterfaceMock) Create(in1 *v3.ProjectAlert) (*v3.ProjectAlert, error) { + if mock.CreateFunc == nil { + panic("ProjectAlertInterfaceMock.CreateFunc: method is nil but ProjectAlertInterface.Create was just called") + } + callInfo := struct { + In1 *v3.ProjectAlert + }{ + In1: in1, + } + lockProjectAlertInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockProjectAlertInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedProjectAlertInterface.CreateCalls()) +func (mock *ProjectAlertInterfaceMock) CreateCalls() []struct { + In1 *v3.ProjectAlert +} { + var calls []struct { + In1 *v3.ProjectAlert + } + lockProjectAlertInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockProjectAlertInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *ProjectAlertInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("ProjectAlertInterfaceMock.DeleteFunc: method is nil but ProjectAlertInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockProjectAlertInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockProjectAlertInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedProjectAlertInterface.DeleteCalls()) +func (mock *ProjectAlertInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockProjectAlertInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockProjectAlertInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *ProjectAlertInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("ProjectAlertInterfaceMock.DeleteCollectionFunc: method is nil but ProjectAlertInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockProjectAlertInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockProjectAlertInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedProjectAlertInterface.DeleteCollectionCalls()) +func (mock *ProjectAlertInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockProjectAlertInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockProjectAlertInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *ProjectAlertInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("ProjectAlertInterfaceMock.DeleteNamespacedFunc: method is nil but ProjectAlertInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockProjectAlertInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockProjectAlertInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedProjectAlertInterface.DeleteNamespacedCalls()) +func (mock *ProjectAlertInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockProjectAlertInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockProjectAlertInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *ProjectAlertInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.ProjectAlert, error) { + if mock.GetFunc == nil { + panic("ProjectAlertInterfaceMock.GetFunc: method is nil but ProjectAlertInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockProjectAlertInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockProjectAlertInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedProjectAlertInterface.GetCalls()) +func (mock *ProjectAlertInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockProjectAlertInterfaceMockGet.RLock() + calls = mock.calls.Get + lockProjectAlertInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *ProjectAlertInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.ProjectAlert, error) { + if mock.GetNamespacedFunc == nil { + panic("ProjectAlertInterfaceMock.GetNamespacedFunc: method is nil but ProjectAlertInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockProjectAlertInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockProjectAlertInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedProjectAlertInterface.GetNamespacedCalls()) +func (mock *ProjectAlertInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockProjectAlertInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockProjectAlertInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ProjectAlertInterfaceMock) List(opts v1.ListOptions) (*v3.ProjectAlertList, error) { + if mock.ListFunc == nil { + panic("ProjectAlertInterfaceMock.ListFunc: method is nil but ProjectAlertInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockProjectAlertInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockProjectAlertInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedProjectAlertInterface.ListCalls()) +func (mock *ProjectAlertInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockProjectAlertInterfaceMockList.RLock() + calls = mock.calls.List + lockProjectAlertInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *ProjectAlertInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("ProjectAlertInterfaceMock.ObjectClientFunc: method is nil but ProjectAlertInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockProjectAlertInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockProjectAlertInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedProjectAlertInterface.ObjectClientCalls()) +func (mock *ProjectAlertInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockProjectAlertInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockProjectAlertInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *ProjectAlertInterfaceMock) Update(in1 *v3.ProjectAlert) (*v3.ProjectAlert, error) { + if mock.UpdateFunc == nil { + panic("ProjectAlertInterfaceMock.UpdateFunc: method is nil but ProjectAlertInterface.Update was just called") + } + callInfo := struct { + In1 *v3.ProjectAlert + }{ + In1: in1, + } + lockProjectAlertInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockProjectAlertInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedProjectAlertInterface.UpdateCalls()) +func (mock *ProjectAlertInterfaceMock) UpdateCalls() []struct { + In1 *v3.ProjectAlert +} { + var calls []struct { + In1 *v3.ProjectAlert + } + lockProjectAlertInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockProjectAlertInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *ProjectAlertInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("ProjectAlertInterfaceMock.WatchFunc: method is nil but ProjectAlertInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockProjectAlertInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockProjectAlertInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedProjectAlertInterface.WatchCalls()) +func (mock *ProjectAlertInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockProjectAlertInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockProjectAlertInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockProjectAlertsGetterMockProjectAlerts sync.RWMutex +) + +// Ensure, that ProjectAlertsGetterMock does implement ProjectAlertsGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.ProjectAlertsGetter = &ProjectAlertsGetterMock{} + +// ProjectAlertsGetterMock is a mock implementation of ProjectAlertsGetter. +// +// func TestSomethingThatUsesProjectAlertsGetter(t *testing.T) { +// +// // make and configure a mocked ProjectAlertsGetter +// mockedProjectAlertsGetter := &ProjectAlertsGetterMock{ +// ProjectAlertsFunc: func(namespace string) v3.ProjectAlertInterface { +// panic("mock out the ProjectAlerts method") +// }, +// } +// +// // use mockedProjectAlertsGetter in code that requires ProjectAlertsGetter +// // and then make assertions. +// +// } +type ProjectAlertsGetterMock struct { + // ProjectAlertsFunc mocks the ProjectAlerts method. + ProjectAlertsFunc func(namespace string) v3.ProjectAlertInterface + + // calls tracks calls to the methods. + calls struct { + // ProjectAlerts holds details about calls to the ProjectAlerts method. + ProjectAlerts []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// ProjectAlerts calls ProjectAlertsFunc. +func (mock *ProjectAlertsGetterMock) ProjectAlerts(namespace string) v3.ProjectAlertInterface { + if mock.ProjectAlertsFunc == nil { + panic("ProjectAlertsGetterMock.ProjectAlertsFunc: method is nil but ProjectAlertsGetter.ProjectAlerts was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockProjectAlertsGetterMockProjectAlerts.Lock() + mock.calls.ProjectAlerts = append(mock.calls.ProjectAlerts, callInfo) + lockProjectAlertsGetterMockProjectAlerts.Unlock() + return mock.ProjectAlertsFunc(namespace) +} + +// ProjectAlertsCalls gets all the calls that were made to ProjectAlerts. +// Check the length with: +// len(mockedProjectAlertsGetter.ProjectAlertsCalls()) +func (mock *ProjectAlertsGetterMock) ProjectAlertsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockProjectAlertsGetterMockProjectAlerts.RLock() + calls = mock.calls.ProjectAlerts + lockProjectAlertsGetterMockProjectAlerts.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_project_alert_rule_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_project_alert_rule_mock_test.go new file mode 100644 index 00000000..5b35b44e --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_project_alert_rule_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockProjectAlertRuleListerMockGet sync.RWMutex + lockProjectAlertRuleListerMockList sync.RWMutex +) + +// Ensure, that ProjectAlertRuleListerMock does implement ProjectAlertRuleLister. +// If this is not the case, regenerate this file with moq. +var _ v3.ProjectAlertRuleLister = &ProjectAlertRuleListerMock{} + +// ProjectAlertRuleListerMock is a mock implementation of ProjectAlertRuleLister. +// +// func TestSomethingThatUsesProjectAlertRuleLister(t *testing.T) { +// +// // make and configure a mocked ProjectAlertRuleLister +// mockedProjectAlertRuleLister := &ProjectAlertRuleListerMock{ +// GetFunc: func(namespace string, name string) (*v3.ProjectAlertRule, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.ProjectAlertRule, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedProjectAlertRuleLister in code that requires ProjectAlertRuleLister +// // and then make assertions. +// +// } +type ProjectAlertRuleListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.ProjectAlertRule, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.ProjectAlertRule, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *ProjectAlertRuleListerMock) Get(namespace string, name string) (*v3.ProjectAlertRule, error) { + if mock.GetFunc == nil { + panic("ProjectAlertRuleListerMock.GetFunc: method is nil but ProjectAlertRuleLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockProjectAlertRuleListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockProjectAlertRuleListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedProjectAlertRuleLister.GetCalls()) +func (mock *ProjectAlertRuleListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockProjectAlertRuleListerMockGet.RLock() + calls = mock.calls.Get + lockProjectAlertRuleListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ProjectAlertRuleListerMock) List(namespace string, selector labels.Selector) ([]*v3.ProjectAlertRule, error) { + if mock.ListFunc == nil { + panic("ProjectAlertRuleListerMock.ListFunc: method is nil but ProjectAlertRuleLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockProjectAlertRuleListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockProjectAlertRuleListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedProjectAlertRuleLister.ListCalls()) +func (mock *ProjectAlertRuleListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockProjectAlertRuleListerMockList.RLock() + calls = mock.calls.List + lockProjectAlertRuleListerMockList.RUnlock() + return calls +} + +var ( + lockProjectAlertRuleControllerMockAddClusterScopedHandler sync.RWMutex + lockProjectAlertRuleControllerMockAddHandler sync.RWMutex + lockProjectAlertRuleControllerMockEnqueue sync.RWMutex + lockProjectAlertRuleControllerMockGeneric sync.RWMutex + lockProjectAlertRuleControllerMockInformer sync.RWMutex + lockProjectAlertRuleControllerMockLister sync.RWMutex + lockProjectAlertRuleControllerMockStart sync.RWMutex + lockProjectAlertRuleControllerMockSync sync.RWMutex +) + +// Ensure, that ProjectAlertRuleControllerMock does implement ProjectAlertRuleController. +// If this is not the case, regenerate this file with moq. +var _ v3.ProjectAlertRuleController = &ProjectAlertRuleControllerMock{} + +// ProjectAlertRuleControllerMock is a mock implementation of ProjectAlertRuleController. +// +// func TestSomethingThatUsesProjectAlertRuleController(t *testing.T) { +// +// // make and configure a mocked ProjectAlertRuleController +// mockedProjectAlertRuleController := &ProjectAlertRuleControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.ProjectAlertRuleHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.ProjectAlertRuleHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.ProjectAlertRuleLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedProjectAlertRuleController in code that requires ProjectAlertRuleController +// // and then make assertions. +// +// } +type ProjectAlertRuleControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.ProjectAlertRuleHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.ProjectAlertRuleHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.ProjectAlertRuleLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.ProjectAlertRuleHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.ProjectAlertRuleHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ProjectAlertRuleControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.ProjectAlertRuleHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ProjectAlertRuleControllerMock.AddClusterScopedHandlerFunc: method is nil but ProjectAlertRuleController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ProjectAlertRuleHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockProjectAlertRuleControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockProjectAlertRuleControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedProjectAlertRuleController.AddClusterScopedHandlerCalls()) +func (mock *ProjectAlertRuleControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ProjectAlertRuleHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ProjectAlertRuleHandlerFunc + } + lockProjectAlertRuleControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockProjectAlertRuleControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ProjectAlertRuleControllerMock) AddHandler(ctx context.Context, name string, handler v3.ProjectAlertRuleHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ProjectAlertRuleControllerMock.AddHandlerFunc: method is nil but ProjectAlertRuleController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.ProjectAlertRuleHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockProjectAlertRuleControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockProjectAlertRuleControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedProjectAlertRuleController.AddHandlerCalls()) +func (mock *ProjectAlertRuleControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.ProjectAlertRuleHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.ProjectAlertRuleHandlerFunc + } + lockProjectAlertRuleControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockProjectAlertRuleControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *ProjectAlertRuleControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("ProjectAlertRuleControllerMock.EnqueueFunc: method is nil but ProjectAlertRuleController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockProjectAlertRuleControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockProjectAlertRuleControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedProjectAlertRuleController.EnqueueCalls()) +func (mock *ProjectAlertRuleControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockProjectAlertRuleControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockProjectAlertRuleControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *ProjectAlertRuleControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("ProjectAlertRuleControllerMock.GenericFunc: method is nil but ProjectAlertRuleController.Generic was just called") + } + callInfo := struct { + }{} + lockProjectAlertRuleControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockProjectAlertRuleControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedProjectAlertRuleController.GenericCalls()) +func (mock *ProjectAlertRuleControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockProjectAlertRuleControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockProjectAlertRuleControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *ProjectAlertRuleControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("ProjectAlertRuleControllerMock.InformerFunc: method is nil but ProjectAlertRuleController.Informer was just called") + } + callInfo := struct { + }{} + lockProjectAlertRuleControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockProjectAlertRuleControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedProjectAlertRuleController.InformerCalls()) +func (mock *ProjectAlertRuleControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockProjectAlertRuleControllerMockInformer.RLock() + calls = mock.calls.Informer + lockProjectAlertRuleControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *ProjectAlertRuleControllerMock) Lister() v3.ProjectAlertRuleLister { + if mock.ListerFunc == nil { + panic("ProjectAlertRuleControllerMock.ListerFunc: method is nil but ProjectAlertRuleController.Lister was just called") + } + callInfo := struct { + }{} + lockProjectAlertRuleControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockProjectAlertRuleControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedProjectAlertRuleController.ListerCalls()) +func (mock *ProjectAlertRuleControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockProjectAlertRuleControllerMockLister.RLock() + calls = mock.calls.Lister + lockProjectAlertRuleControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *ProjectAlertRuleControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("ProjectAlertRuleControllerMock.StartFunc: method is nil but ProjectAlertRuleController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockProjectAlertRuleControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockProjectAlertRuleControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedProjectAlertRuleController.StartCalls()) +func (mock *ProjectAlertRuleControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockProjectAlertRuleControllerMockStart.RLock() + calls = mock.calls.Start + lockProjectAlertRuleControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *ProjectAlertRuleControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("ProjectAlertRuleControllerMock.SyncFunc: method is nil but ProjectAlertRuleController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockProjectAlertRuleControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockProjectAlertRuleControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedProjectAlertRuleController.SyncCalls()) +func (mock *ProjectAlertRuleControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockProjectAlertRuleControllerMockSync.RLock() + calls = mock.calls.Sync + lockProjectAlertRuleControllerMockSync.RUnlock() + return calls +} + +var ( + lockProjectAlertRuleInterfaceMockAddClusterScopedHandler sync.RWMutex + lockProjectAlertRuleInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockProjectAlertRuleInterfaceMockAddHandler sync.RWMutex + lockProjectAlertRuleInterfaceMockAddLifecycle sync.RWMutex + lockProjectAlertRuleInterfaceMockController sync.RWMutex + lockProjectAlertRuleInterfaceMockCreate sync.RWMutex + lockProjectAlertRuleInterfaceMockDelete sync.RWMutex + lockProjectAlertRuleInterfaceMockDeleteCollection sync.RWMutex + lockProjectAlertRuleInterfaceMockDeleteNamespaced sync.RWMutex + lockProjectAlertRuleInterfaceMockGet sync.RWMutex + lockProjectAlertRuleInterfaceMockGetNamespaced sync.RWMutex + lockProjectAlertRuleInterfaceMockList sync.RWMutex + lockProjectAlertRuleInterfaceMockObjectClient sync.RWMutex + lockProjectAlertRuleInterfaceMockUpdate sync.RWMutex + lockProjectAlertRuleInterfaceMockWatch sync.RWMutex +) + +// Ensure, that ProjectAlertRuleInterfaceMock does implement ProjectAlertRuleInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.ProjectAlertRuleInterface = &ProjectAlertRuleInterfaceMock{} + +// ProjectAlertRuleInterfaceMock is a mock implementation of ProjectAlertRuleInterface. +// +// func TestSomethingThatUsesProjectAlertRuleInterface(t *testing.T) { +// +// // make and configure a mocked ProjectAlertRuleInterface +// mockedProjectAlertRuleInterface := &ProjectAlertRuleInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.ProjectAlertRuleHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.ProjectAlertRuleLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.ProjectAlertRuleHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.ProjectAlertRuleLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.ProjectAlertRuleController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.ProjectAlertRule) (*v3.ProjectAlertRule, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.ProjectAlertRule, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.ProjectAlertRule, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.ProjectAlertRuleList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.ProjectAlertRule) (*v3.ProjectAlertRule, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedProjectAlertRuleInterface in code that requires ProjectAlertRuleInterface +// // and then make assertions. +// +// } +type ProjectAlertRuleInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.ProjectAlertRuleHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.ProjectAlertRuleLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.ProjectAlertRuleHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.ProjectAlertRuleLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.ProjectAlertRuleController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.ProjectAlertRule) (*v3.ProjectAlertRule, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.ProjectAlertRule, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.ProjectAlertRule, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.ProjectAlertRuleList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.ProjectAlertRule) (*v3.ProjectAlertRule, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.ProjectAlertRuleHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.ProjectAlertRuleLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.ProjectAlertRuleHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.ProjectAlertRuleLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.ProjectAlertRule + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.ProjectAlertRule + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ProjectAlertRuleInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.ProjectAlertRuleHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ProjectAlertRuleInterfaceMock.AddClusterScopedHandlerFunc: method is nil but ProjectAlertRuleInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ProjectAlertRuleHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockProjectAlertRuleInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockProjectAlertRuleInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedProjectAlertRuleInterface.AddClusterScopedHandlerCalls()) +func (mock *ProjectAlertRuleInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ProjectAlertRuleHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ProjectAlertRuleHandlerFunc + } + lockProjectAlertRuleInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockProjectAlertRuleInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *ProjectAlertRuleInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.ProjectAlertRuleLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("ProjectAlertRuleInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but ProjectAlertRuleInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ProjectAlertRuleLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockProjectAlertRuleInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockProjectAlertRuleInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedProjectAlertRuleInterface.AddClusterScopedLifecycleCalls()) +func (mock *ProjectAlertRuleInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ProjectAlertRuleLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ProjectAlertRuleLifecycle + } + lockProjectAlertRuleInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockProjectAlertRuleInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ProjectAlertRuleInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.ProjectAlertRuleHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ProjectAlertRuleInterfaceMock.AddHandlerFunc: method is nil but ProjectAlertRuleInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.ProjectAlertRuleHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockProjectAlertRuleInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockProjectAlertRuleInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedProjectAlertRuleInterface.AddHandlerCalls()) +func (mock *ProjectAlertRuleInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.ProjectAlertRuleHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.ProjectAlertRuleHandlerFunc + } + lockProjectAlertRuleInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockProjectAlertRuleInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *ProjectAlertRuleInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.ProjectAlertRuleLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("ProjectAlertRuleInterfaceMock.AddLifecycleFunc: method is nil but ProjectAlertRuleInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.ProjectAlertRuleLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockProjectAlertRuleInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockProjectAlertRuleInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedProjectAlertRuleInterface.AddLifecycleCalls()) +func (mock *ProjectAlertRuleInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.ProjectAlertRuleLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.ProjectAlertRuleLifecycle + } + lockProjectAlertRuleInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockProjectAlertRuleInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *ProjectAlertRuleInterfaceMock) Controller() v3.ProjectAlertRuleController { + if mock.ControllerFunc == nil { + panic("ProjectAlertRuleInterfaceMock.ControllerFunc: method is nil but ProjectAlertRuleInterface.Controller was just called") + } + callInfo := struct { + }{} + lockProjectAlertRuleInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockProjectAlertRuleInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedProjectAlertRuleInterface.ControllerCalls()) +func (mock *ProjectAlertRuleInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockProjectAlertRuleInterfaceMockController.RLock() + calls = mock.calls.Controller + lockProjectAlertRuleInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *ProjectAlertRuleInterfaceMock) Create(in1 *v3.ProjectAlertRule) (*v3.ProjectAlertRule, error) { + if mock.CreateFunc == nil { + panic("ProjectAlertRuleInterfaceMock.CreateFunc: method is nil but ProjectAlertRuleInterface.Create was just called") + } + callInfo := struct { + In1 *v3.ProjectAlertRule + }{ + In1: in1, + } + lockProjectAlertRuleInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockProjectAlertRuleInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedProjectAlertRuleInterface.CreateCalls()) +func (mock *ProjectAlertRuleInterfaceMock) CreateCalls() []struct { + In1 *v3.ProjectAlertRule +} { + var calls []struct { + In1 *v3.ProjectAlertRule + } + lockProjectAlertRuleInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockProjectAlertRuleInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *ProjectAlertRuleInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("ProjectAlertRuleInterfaceMock.DeleteFunc: method is nil but ProjectAlertRuleInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockProjectAlertRuleInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockProjectAlertRuleInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedProjectAlertRuleInterface.DeleteCalls()) +func (mock *ProjectAlertRuleInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockProjectAlertRuleInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockProjectAlertRuleInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *ProjectAlertRuleInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("ProjectAlertRuleInterfaceMock.DeleteCollectionFunc: method is nil but ProjectAlertRuleInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockProjectAlertRuleInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockProjectAlertRuleInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedProjectAlertRuleInterface.DeleteCollectionCalls()) +func (mock *ProjectAlertRuleInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockProjectAlertRuleInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockProjectAlertRuleInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *ProjectAlertRuleInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("ProjectAlertRuleInterfaceMock.DeleteNamespacedFunc: method is nil but ProjectAlertRuleInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockProjectAlertRuleInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockProjectAlertRuleInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedProjectAlertRuleInterface.DeleteNamespacedCalls()) +func (mock *ProjectAlertRuleInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockProjectAlertRuleInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockProjectAlertRuleInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *ProjectAlertRuleInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.ProjectAlertRule, error) { + if mock.GetFunc == nil { + panic("ProjectAlertRuleInterfaceMock.GetFunc: method is nil but ProjectAlertRuleInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockProjectAlertRuleInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockProjectAlertRuleInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedProjectAlertRuleInterface.GetCalls()) +func (mock *ProjectAlertRuleInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockProjectAlertRuleInterfaceMockGet.RLock() + calls = mock.calls.Get + lockProjectAlertRuleInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *ProjectAlertRuleInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.ProjectAlertRule, error) { + if mock.GetNamespacedFunc == nil { + panic("ProjectAlertRuleInterfaceMock.GetNamespacedFunc: method is nil but ProjectAlertRuleInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockProjectAlertRuleInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockProjectAlertRuleInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedProjectAlertRuleInterface.GetNamespacedCalls()) +func (mock *ProjectAlertRuleInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockProjectAlertRuleInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockProjectAlertRuleInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ProjectAlertRuleInterfaceMock) List(opts v1.ListOptions) (*v3.ProjectAlertRuleList, error) { + if mock.ListFunc == nil { + panic("ProjectAlertRuleInterfaceMock.ListFunc: method is nil but ProjectAlertRuleInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockProjectAlertRuleInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockProjectAlertRuleInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedProjectAlertRuleInterface.ListCalls()) +func (mock *ProjectAlertRuleInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockProjectAlertRuleInterfaceMockList.RLock() + calls = mock.calls.List + lockProjectAlertRuleInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *ProjectAlertRuleInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("ProjectAlertRuleInterfaceMock.ObjectClientFunc: method is nil but ProjectAlertRuleInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockProjectAlertRuleInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockProjectAlertRuleInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedProjectAlertRuleInterface.ObjectClientCalls()) +func (mock *ProjectAlertRuleInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockProjectAlertRuleInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockProjectAlertRuleInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *ProjectAlertRuleInterfaceMock) Update(in1 *v3.ProjectAlertRule) (*v3.ProjectAlertRule, error) { + if mock.UpdateFunc == nil { + panic("ProjectAlertRuleInterfaceMock.UpdateFunc: method is nil but ProjectAlertRuleInterface.Update was just called") + } + callInfo := struct { + In1 *v3.ProjectAlertRule + }{ + In1: in1, + } + lockProjectAlertRuleInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockProjectAlertRuleInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedProjectAlertRuleInterface.UpdateCalls()) +func (mock *ProjectAlertRuleInterfaceMock) UpdateCalls() []struct { + In1 *v3.ProjectAlertRule +} { + var calls []struct { + In1 *v3.ProjectAlertRule + } + lockProjectAlertRuleInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockProjectAlertRuleInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *ProjectAlertRuleInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("ProjectAlertRuleInterfaceMock.WatchFunc: method is nil but ProjectAlertRuleInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockProjectAlertRuleInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockProjectAlertRuleInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedProjectAlertRuleInterface.WatchCalls()) +func (mock *ProjectAlertRuleInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockProjectAlertRuleInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockProjectAlertRuleInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockProjectAlertRulesGetterMockProjectAlertRules sync.RWMutex +) + +// Ensure, that ProjectAlertRulesGetterMock does implement ProjectAlertRulesGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.ProjectAlertRulesGetter = &ProjectAlertRulesGetterMock{} + +// ProjectAlertRulesGetterMock is a mock implementation of ProjectAlertRulesGetter. +// +// func TestSomethingThatUsesProjectAlertRulesGetter(t *testing.T) { +// +// // make and configure a mocked ProjectAlertRulesGetter +// mockedProjectAlertRulesGetter := &ProjectAlertRulesGetterMock{ +// ProjectAlertRulesFunc: func(namespace string) v3.ProjectAlertRuleInterface { +// panic("mock out the ProjectAlertRules method") +// }, +// } +// +// // use mockedProjectAlertRulesGetter in code that requires ProjectAlertRulesGetter +// // and then make assertions. +// +// } +type ProjectAlertRulesGetterMock struct { + // ProjectAlertRulesFunc mocks the ProjectAlertRules method. + ProjectAlertRulesFunc func(namespace string) v3.ProjectAlertRuleInterface + + // calls tracks calls to the methods. + calls struct { + // ProjectAlertRules holds details about calls to the ProjectAlertRules method. + ProjectAlertRules []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// ProjectAlertRules calls ProjectAlertRulesFunc. +func (mock *ProjectAlertRulesGetterMock) ProjectAlertRules(namespace string) v3.ProjectAlertRuleInterface { + if mock.ProjectAlertRulesFunc == nil { + panic("ProjectAlertRulesGetterMock.ProjectAlertRulesFunc: method is nil but ProjectAlertRulesGetter.ProjectAlertRules was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockProjectAlertRulesGetterMockProjectAlertRules.Lock() + mock.calls.ProjectAlertRules = append(mock.calls.ProjectAlertRules, callInfo) + lockProjectAlertRulesGetterMockProjectAlertRules.Unlock() + return mock.ProjectAlertRulesFunc(namespace) +} + +// ProjectAlertRulesCalls gets all the calls that were made to ProjectAlertRules. +// Check the length with: +// len(mockedProjectAlertRulesGetter.ProjectAlertRulesCalls()) +func (mock *ProjectAlertRulesGetterMock) ProjectAlertRulesCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockProjectAlertRulesGetterMockProjectAlertRules.RLock() + calls = mock.calls.ProjectAlertRules + lockProjectAlertRulesGetterMockProjectAlertRules.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_project_catalog_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_project_catalog_mock_test.go new file mode 100644 index 00000000..b9eacdc5 --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_project_catalog_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockProjectCatalogListerMockGet sync.RWMutex + lockProjectCatalogListerMockList sync.RWMutex +) + +// Ensure, that ProjectCatalogListerMock does implement ProjectCatalogLister. +// If this is not the case, regenerate this file with moq. +var _ v3.ProjectCatalogLister = &ProjectCatalogListerMock{} + +// ProjectCatalogListerMock is a mock implementation of ProjectCatalogLister. +// +// func TestSomethingThatUsesProjectCatalogLister(t *testing.T) { +// +// // make and configure a mocked ProjectCatalogLister +// mockedProjectCatalogLister := &ProjectCatalogListerMock{ +// GetFunc: func(namespace string, name string) (*v3.ProjectCatalog, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.ProjectCatalog, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedProjectCatalogLister in code that requires ProjectCatalogLister +// // and then make assertions. +// +// } +type ProjectCatalogListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.ProjectCatalog, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.ProjectCatalog, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *ProjectCatalogListerMock) Get(namespace string, name string) (*v3.ProjectCatalog, error) { + if mock.GetFunc == nil { + panic("ProjectCatalogListerMock.GetFunc: method is nil but ProjectCatalogLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockProjectCatalogListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockProjectCatalogListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedProjectCatalogLister.GetCalls()) +func (mock *ProjectCatalogListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockProjectCatalogListerMockGet.RLock() + calls = mock.calls.Get + lockProjectCatalogListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ProjectCatalogListerMock) List(namespace string, selector labels.Selector) ([]*v3.ProjectCatalog, error) { + if mock.ListFunc == nil { + panic("ProjectCatalogListerMock.ListFunc: method is nil but ProjectCatalogLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockProjectCatalogListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockProjectCatalogListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedProjectCatalogLister.ListCalls()) +func (mock *ProjectCatalogListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockProjectCatalogListerMockList.RLock() + calls = mock.calls.List + lockProjectCatalogListerMockList.RUnlock() + return calls +} + +var ( + lockProjectCatalogControllerMockAddClusterScopedHandler sync.RWMutex + lockProjectCatalogControllerMockAddHandler sync.RWMutex + lockProjectCatalogControllerMockEnqueue sync.RWMutex + lockProjectCatalogControllerMockGeneric sync.RWMutex + lockProjectCatalogControllerMockInformer sync.RWMutex + lockProjectCatalogControllerMockLister sync.RWMutex + lockProjectCatalogControllerMockStart sync.RWMutex + lockProjectCatalogControllerMockSync sync.RWMutex +) + +// Ensure, that ProjectCatalogControllerMock does implement ProjectCatalogController. +// If this is not the case, regenerate this file with moq. +var _ v3.ProjectCatalogController = &ProjectCatalogControllerMock{} + +// ProjectCatalogControllerMock is a mock implementation of ProjectCatalogController. +// +// func TestSomethingThatUsesProjectCatalogController(t *testing.T) { +// +// // make and configure a mocked ProjectCatalogController +// mockedProjectCatalogController := &ProjectCatalogControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.ProjectCatalogHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.ProjectCatalogHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.ProjectCatalogLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedProjectCatalogController in code that requires ProjectCatalogController +// // and then make assertions. +// +// } +type ProjectCatalogControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.ProjectCatalogHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.ProjectCatalogHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.ProjectCatalogLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.ProjectCatalogHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.ProjectCatalogHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ProjectCatalogControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.ProjectCatalogHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ProjectCatalogControllerMock.AddClusterScopedHandlerFunc: method is nil but ProjectCatalogController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ProjectCatalogHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockProjectCatalogControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockProjectCatalogControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedProjectCatalogController.AddClusterScopedHandlerCalls()) +func (mock *ProjectCatalogControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ProjectCatalogHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ProjectCatalogHandlerFunc + } + lockProjectCatalogControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockProjectCatalogControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ProjectCatalogControllerMock) AddHandler(ctx context.Context, name string, handler v3.ProjectCatalogHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ProjectCatalogControllerMock.AddHandlerFunc: method is nil but ProjectCatalogController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.ProjectCatalogHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockProjectCatalogControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockProjectCatalogControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedProjectCatalogController.AddHandlerCalls()) +func (mock *ProjectCatalogControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.ProjectCatalogHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.ProjectCatalogHandlerFunc + } + lockProjectCatalogControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockProjectCatalogControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *ProjectCatalogControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("ProjectCatalogControllerMock.EnqueueFunc: method is nil but ProjectCatalogController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockProjectCatalogControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockProjectCatalogControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedProjectCatalogController.EnqueueCalls()) +func (mock *ProjectCatalogControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockProjectCatalogControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockProjectCatalogControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *ProjectCatalogControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("ProjectCatalogControllerMock.GenericFunc: method is nil but ProjectCatalogController.Generic was just called") + } + callInfo := struct { + }{} + lockProjectCatalogControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockProjectCatalogControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedProjectCatalogController.GenericCalls()) +func (mock *ProjectCatalogControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockProjectCatalogControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockProjectCatalogControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *ProjectCatalogControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("ProjectCatalogControllerMock.InformerFunc: method is nil but ProjectCatalogController.Informer was just called") + } + callInfo := struct { + }{} + lockProjectCatalogControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockProjectCatalogControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedProjectCatalogController.InformerCalls()) +func (mock *ProjectCatalogControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockProjectCatalogControllerMockInformer.RLock() + calls = mock.calls.Informer + lockProjectCatalogControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *ProjectCatalogControllerMock) Lister() v3.ProjectCatalogLister { + if mock.ListerFunc == nil { + panic("ProjectCatalogControllerMock.ListerFunc: method is nil but ProjectCatalogController.Lister was just called") + } + callInfo := struct { + }{} + lockProjectCatalogControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockProjectCatalogControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedProjectCatalogController.ListerCalls()) +func (mock *ProjectCatalogControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockProjectCatalogControllerMockLister.RLock() + calls = mock.calls.Lister + lockProjectCatalogControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *ProjectCatalogControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("ProjectCatalogControllerMock.StartFunc: method is nil but ProjectCatalogController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockProjectCatalogControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockProjectCatalogControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedProjectCatalogController.StartCalls()) +func (mock *ProjectCatalogControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockProjectCatalogControllerMockStart.RLock() + calls = mock.calls.Start + lockProjectCatalogControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *ProjectCatalogControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("ProjectCatalogControllerMock.SyncFunc: method is nil but ProjectCatalogController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockProjectCatalogControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockProjectCatalogControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedProjectCatalogController.SyncCalls()) +func (mock *ProjectCatalogControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockProjectCatalogControllerMockSync.RLock() + calls = mock.calls.Sync + lockProjectCatalogControllerMockSync.RUnlock() + return calls +} + +var ( + lockProjectCatalogInterfaceMockAddClusterScopedHandler sync.RWMutex + lockProjectCatalogInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockProjectCatalogInterfaceMockAddHandler sync.RWMutex + lockProjectCatalogInterfaceMockAddLifecycle sync.RWMutex + lockProjectCatalogInterfaceMockController sync.RWMutex + lockProjectCatalogInterfaceMockCreate sync.RWMutex + lockProjectCatalogInterfaceMockDelete sync.RWMutex + lockProjectCatalogInterfaceMockDeleteCollection sync.RWMutex + lockProjectCatalogInterfaceMockDeleteNamespaced sync.RWMutex + lockProjectCatalogInterfaceMockGet sync.RWMutex + lockProjectCatalogInterfaceMockGetNamespaced sync.RWMutex + lockProjectCatalogInterfaceMockList sync.RWMutex + lockProjectCatalogInterfaceMockObjectClient sync.RWMutex + lockProjectCatalogInterfaceMockUpdate sync.RWMutex + lockProjectCatalogInterfaceMockWatch sync.RWMutex +) + +// Ensure, that ProjectCatalogInterfaceMock does implement ProjectCatalogInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.ProjectCatalogInterface = &ProjectCatalogInterfaceMock{} + +// ProjectCatalogInterfaceMock is a mock implementation of ProjectCatalogInterface. +// +// func TestSomethingThatUsesProjectCatalogInterface(t *testing.T) { +// +// // make and configure a mocked ProjectCatalogInterface +// mockedProjectCatalogInterface := &ProjectCatalogInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.ProjectCatalogHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.ProjectCatalogLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.ProjectCatalogHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.ProjectCatalogLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.ProjectCatalogController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.ProjectCatalog) (*v3.ProjectCatalog, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.ProjectCatalog, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.ProjectCatalog, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.ProjectCatalogList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.ProjectCatalog) (*v3.ProjectCatalog, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedProjectCatalogInterface in code that requires ProjectCatalogInterface +// // and then make assertions. +// +// } +type ProjectCatalogInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.ProjectCatalogHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.ProjectCatalogLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.ProjectCatalogHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.ProjectCatalogLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.ProjectCatalogController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.ProjectCatalog) (*v3.ProjectCatalog, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.ProjectCatalog, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.ProjectCatalog, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.ProjectCatalogList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.ProjectCatalog) (*v3.ProjectCatalog, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.ProjectCatalogHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.ProjectCatalogLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.ProjectCatalogHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.ProjectCatalogLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.ProjectCatalog + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.ProjectCatalog + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ProjectCatalogInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.ProjectCatalogHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ProjectCatalogInterfaceMock.AddClusterScopedHandlerFunc: method is nil but ProjectCatalogInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ProjectCatalogHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockProjectCatalogInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockProjectCatalogInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedProjectCatalogInterface.AddClusterScopedHandlerCalls()) +func (mock *ProjectCatalogInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ProjectCatalogHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ProjectCatalogHandlerFunc + } + lockProjectCatalogInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockProjectCatalogInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *ProjectCatalogInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.ProjectCatalogLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("ProjectCatalogInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but ProjectCatalogInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ProjectCatalogLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockProjectCatalogInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockProjectCatalogInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedProjectCatalogInterface.AddClusterScopedLifecycleCalls()) +func (mock *ProjectCatalogInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ProjectCatalogLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ProjectCatalogLifecycle + } + lockProjectCatalogInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockProjectCatalogInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ProjectCatalogInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.ProjectCatalogHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ProjectCatalogInterfaceMock.AddHandlerFunc: method is nil but ProjectCatalogInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.ProjectCatalogHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockProjectCatalogInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockProjectCatalogInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedProjectCatalogInterface.AddHandlerCalls()) +func (mock *ProjectCatalogInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.ProjectCatalogHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.ProjectCatalogHandlerFunc + } + lockProjectCatalogInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockProjectCatalogInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *ProjectCatalogInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.ProjectCatalogLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("ProjectCatalogInterfaceMock.AddLifecycleFunc: method is nil but ProjectCatalogInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.ProjectCatalogLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockProjectCatalogInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockProjectCatalogInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedProjectCatalogInterface.AddLifecycleCalls()) +func (mock *ProjectCatalogInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.ProjectCatalogLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.ProjectCatalogLifecycle + } + lockProjectCatalogInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockProjectCatalogInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *ProjectCatalogInterfaceMock) Controller() v3.ProjectCatalogController { + if mock.ControllerFunc == nil { + panic("ProjectCatalogInterfaceMock.ControllerFunc: method is nil but ProjectCatalogInterface.Controller was just called") + } + callInfo := struct { + }{} + lockProjectCatalogInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockProjectCatalogInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedProjectCatalogInterface.ControllerCalls()) +func (mock *ProjectCatalogInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockProjectCatalogInterfaceMockController.RLock() + calls = mock.calls.Controller + lockProjectCatalogInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *ProjectCatalogInterfaceMock) Create(in1 *v3.ProjectCatalog) (*v3.ProjectCatalog, error) { + if mock.CreateFunc == nil { + panic("ProjectCatalogInterfaceMock.CreateFunc: method is nil but ProjectCatalogInterface.Create was just called") + } + callInfo := struct { + In1 *v3.ProjectCatalog + }{ + In1: in1, + } + lockProjectCatalogInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockProjectCatalogInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedProjectCatalogInterface.CreateCalls()) +func (mock *ProjectCatalogInterfaceMock) CreateCalls() []struct { + In1 *v3.ProjectCatalog +} { + var calls []struct { + In1 *v3.ProjectCatalog + } + lockProjectCatalogInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockProjectCatalogInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *ProjectCatalogInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("ProjectCatalogInterfaceMock.DeleteFunc: method is nil but ProjectCatalogInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockProjectCatalogInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockProjectCatalogInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedProjectCatalogInterface.DeleteCalls()) +func (mock *ProjectCatalogInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockProjectCatalogInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockProjectCatalogInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *ProjectCatalogInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("ProjectCatalogInterfaceMock.DeleteCollectionFunc: method is nil but ProjectCatalogInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockProjectCatalogInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockProjectCatalogInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedProjectCatalogInterface.DeleteCollectionCalls()) +func (mock *ProjectCatalogInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockProjectCatalogInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockProjectCatalogInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *ProjectCatalogInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("ProjectCatalogInterfaceMock.DeleteNamespacedFunc: method is nil but ProjectCatalogInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockProjectCatalogInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockProjectCatalogInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedProjectCatalogInterface.DeleteNamespacedCalls()) +func (mock *ProjectCatalogInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockProjectCatalogInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockProjectCatalogInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *ProjectCatalogInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.ProjectCatalog, error) { + if mock.GetFunc == nil { + panic("ProjectCatalogInterfaceMock.GetFunc: method is nil but ProjectCatalogInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockProjectCatalogInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockProjectCatalogInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedProjectCatalogInterface.GetCalls()) +func (mock *ProjectCatalogInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockProjectCatalogInterfaceMockGet.RLock() + calls = mock.calls.Get + lockProjectCatalogInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *ProjectCatalogInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.ProjectCatalog, error) { + if mock.GetNamespacedFunc == nil { + panic("ProjectCatalogInterfaceMock.GetNamespacedFunc: method is nil but ProjectCatalogInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockProjectCatalogInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockProjectCatalogInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedProjectCatalogInterface.GetNamespacedCalls()) +func (mock *ProjectCatalogInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockProjectCatalogInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockProjectCatalogInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ProjectCatalogInterfaceMock) List(opts v1.ListOptions) (*v3.ProjectCatalogList, error) { + if mock.ListFunc == nil { + panic("ProjectCatalogInterfaceMock.ListFunc: method is nil but ProjectCatalogInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockProjectCatalogInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockProjectCatalogInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedProjectCatalogInterface.ListCalls()) +func (mock *ProjectCatalogInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockProjectCatalogInterfaceMockList.RLock() + calls = mock.calls.List + lockProjectCatalogInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *ProjectCatalogInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("ProjectCatalogInterfaceMock.ObjectClientFunc: method is nil but ProjectCatalogInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockProjectCatalogInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockProjectCatalogInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedProjectCatalogInterface.ObjectClientCalls()) +func (mock *ProjectCatalogInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockProjectCatalogInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockProjectCatalogInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *ProjectCatalogInterfaceMock) Update(in1 *v3.ProjectCatalog) (*v3.ProjectCatalog, error) { + if mock.UpdateFunc == nil { + panic("ProjectCatalogInterfaceMock.UpdateFunc: method is nil but ProjectCatalogInterface.Update was just called") + } + callInfo := struct { + In1 *v3.ProjectCatalog + }{ + In1: in1, + } + lockProjectCatalogInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockProjectCatalogInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedProjectCatalogInterface.UpdateCalls()) +func (mock *ProjectCatalogInterfaceMock) UpdateCalls() []struct { + In1 *v3.ProjectCatalog +} { + var calls []struct { + In1 *v3.ProjectCatalog + } + lockProjectCatalogInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockProjectCatalogInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *ProjectCatalogInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("ProjectCatalogInterfaceMock.WatchFunc: method is nil but ProjectCatalogInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockProjectCatalogInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockProjectCatalogInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedProjectCatalogInterface.WatchCalls()) +func (mock *ProjectCatalogInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockProjectCatalogInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockProjectCatalogInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockProjectCatalogsGetterMockProjectCatalogs sync.RWMutex +) + +// Ensure, that ProjectCatalogsGetterMock does implement ProjectCatalogsGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.ProjectCatalogsGetter = &ProjectCatalogsGetterMock{} + +// ProjectCatalogsGetterMock is a mock implementation of ProjectCatalogsGetter. +// +// func TestSomethingThatUsesProjectCatalogsGetter(t *testing.T) { +// +// // make and configure a mocked ProjectCatalogsGetter +// mockedProjectCatalogsGetter := &ProjectCatalogsGetterMock{ +// ProjectCatalogsFunc: func(namespace string) v3.ProjectCatalogInterface { +// panic("mock out the ProjectCatalogs method") +// }, +// } +// +// // use mockedProjectCatalogsGetter in code that requires ProjectCatalogsGetter +// // and then make assertions. +// +// } +type ProjectCatalogsGetterMock struct { + // ProjectCatalogsFunc mocks the ProjectCatalogs method. + ProjectCatalogsFunc func(namespace string) v3.ProjectCatalogInterface + + // calls tracks calls to the methods. + calls struct { + // ProjectCatalogs holds details about calls to the ProjectCatalogs method. + ProjectCatalogs []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// ProjectCatalogs calls ProjectCatalogsFunc. +func (mock *ProjectCatalogsGetterMock) ProjectCatalogs(namespace string) v3.ProjectCatalogInterface { + if mock.ProjectCatalogsFunc == nil { + panic("ProjectCatalogsGetterMock.ProjectCatalogsFunc: method is nil but ProjectCatalogsGetter.ProjectCatalogs was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockProjectCatalogsGetterMockProjectCatalogs.Lock() + mock.calls.ProjectCatalogs = append(mock.calls.ProjectCatalogs, callInfo) + lockProjectCatalogsGetterMockProjectCatalogs.Unlock() + return mock.ProjectCatalogsFunc(namespace) +} + +// ProjectCatalogsCalls gets all the calls that were made to ProjectCatalogs. +// Check the length with: +// len(mockedProjectCatalogsGetter.ProjectCatalogsCalls()) +func (mock *ProjectCatalogsGetterMock) ProjectCatalogsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockProjectCatalogsGetterMockProjectCatalogs.RLock() + calls = mock.calls.ProjectCatalogs + lockProjectCatalogsGetterMockProjectCatalogs.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_project_logging_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_project_logging_mock_test.go new file mode 100644 index 00000000..26638bc9 --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_project_logging_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockProjectLoggingListerMockGet sync.RWMutex + lockProjectLoggingListerMockList sync.RWMutex +) + +// Ensure, that ProjectLoggingListerMock does implement ProjectLoggingLister. +// If this is not the case, regenerate this file with moq. +var _ v3.ProjectLoggingLister = &ProjectLoggingListerMock{} + +// ProjectLoggingListerMock is a mock implementation of ProjectLoggingLister. +// +// func TestSomethingThatUsesProjectLoggingLister(t *testing.T) { +// +// // make and configure a mocked ProjectLoggingLister +// mockedProjectLoggingLister := &ProjectLoggingListerMock{ +// GetFunc: func(namespace string, name string) (*v3.ProjectLogging, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.ProjectLogging, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedProjectLoggingLister in code that requires ProjectLoggingLister +// // and then make assertions. +// +// } +type ProjectLoggingListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.ProjectLogging, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.ProjectLogging, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *ProjectLoggingListerMock) Get(namespace string, name string) (*v3.ProjectLogging, error) { + if mock.GetFunc == nil { + panic("ProjectLoggingListerMock.GetFunc: method is nil but ProjectLoggingLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockProjectLoggingListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockProjectLoggingListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedProjectLoggingLister.GetCalls()) +func (mock *ProjectLoggingListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockProjectLoggingListerMockGet.RLock() + calls = mock.calls.Get + lockProjectLoggingListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ProjectLoggingListerMock) List(namespace string, selector labels.Selector) ([]*v3.ProjectLogging, error) { + if mock.ListFunc == nil { + panic("ProjectLoggingListerMock.ListFunc: method is nil but ProjectLoggingLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockProjectLoggingListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockProjectLoggingListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedProjectLoggingLister.ListCalls()) +func (mock *ProjectLoggingListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockProjectLoggingListerMockList.RLock() + calls = mock.calls.List + lockProjectLoggingListerMockList.RUnlock() + return calls +} + +var ( + lockProjectLoggingControllerMockAddClusterScopedHandler sync.RWMutex + lockProjectLoggingControllerMockAddHandler sync.RWMutex + lockProjectLoggingControllerMockEnqueue sync.RWMutex + lockProjectLoggingControllerMockGeneric sync.RWMutex + lockProjectLoggingControllerMockInformer sync.RWMutex + lockProjectLoggingControllerMockLister sync.RWMutex + lockProjectLoggingControllerMockStart sync.RWMutex + lockProjectLoggingControllerMockSync sync.RWMutex +) + +// Ensure, that ProjectLoggingControllerMock does implement ProjectLoggingController. +// If this is not the case, regenerate this file with moq. +var _ v3.ProjectLoggingController = &ProjectLoggingControllerMock{} + +// ProjectLoggingControllerMock is a mock implementation of ProjectLoggingController. +// +// func TestSomethingThatUsesProjectLoggingController(t *testing.T) { +// +// // make and configure a mocked ProjectLoggingController +// mockedProjectLoggingController := &ProjectLoggingControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.ProjectLoggingHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.ProjectLoggingHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.ProjectLoggingLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedProjectLoggingController in code that requires ProjectLoggingController +// // and then make assertions. +// +// } +type ProjectLoggingControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.ProjectLoggingHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.ProjectLoggingHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.ProjectLoggingLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.ProjectLoggingHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.ProjectLoggingHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ProjectLoggingControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.ProjectLoggingHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ProjectLoggingControllerMock.AddClusterScopedHandlerFunc: method is nil but ProjectLoggingController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ProjectLoggingHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockProjectLoggingControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockProjectLoggingControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedProjectLoggingController.AddClusterScopedHandlerCalls()) +func (mock *ProjectLoggingControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ProjectLoggingHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ProjectLoggingHandlerFunc + } + lockProjectLoggingControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockProjectLoggingControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ProjectLoggingControllerMock) AddHandler(ctx context.Context, name string, handler v3.ProjectLoggingHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ProjectLoggingControllerMock.AddHandlerFunc: method is nil but ProjectLoggingController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.ProjectLoggingHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockProjectLoggingControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockProjectLoggingControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedProjectLoggingController.AddHandlerCalls()) +func (mock *ProjectLoggingControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.ProjectLoggingHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.ProjectLoggingHandlerFunc + } + lockProjectLoggingControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockProjectLoggingControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *ProjectLoggingControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("ProjectLoggingControllerMock.EnqueueFunc: method is nil but ProjectLoggingController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockProjectLoggingControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockProjectLoggingControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedProjectLoggingController.EnqueueCalls()) +func (mock *ProjectLoggingControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockProjectLoggingControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockProjectLoggingControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *ProjectLoggingControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("ProjectLoggingControllerMock.GenericFunc: method is nil but ProjectLoggingController.Generic was just called") + } + callInfo := struct { + }{} + lockProjectLoggingControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockProjectLoggingControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedProjectLoggingController.GenericCalls()) +func (mock *ProjectLoggingControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockProjectLoggingControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockProjectLoggingControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *ProjectLoggingControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("ProjectLoggingControllerMock.InformerFunc: method is nil but ProjectLoggingController.Informer was just called") + } + callInfo := struct { + }{} + lockProjectLoggingControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockProjectLoggingControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedProjectLoggingController.InformerCalls()) +func (mock *ProjectLoggingControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockProjectLoggingControllerMockInformer.RLock() + calls = mock.calls.Informer + lockProjectLoggingControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *ProjectLoggingControllerMock) Lister() v3.ProjectLoggingLister { + if mock.ListerFunc == nil { + panic("ProjectLoggingControllerMock.ListerFunc: method is nil but ProjectLoggingController.Lister was just called") + } + callInfo := struct { + }{} + lockProjectLoggingControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockProjectLoggingControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedProjectLoggingController.ListerCalls()) +func (mock *ProjectLoggingControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockProjectLoggingControllerMockLister.RLock() + calls = mock.calls.Lister + lockProjectLoggingControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *ProjectLoggingControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("ProjectLoggingControllerMock.StartFunc: method is nil but ProjectLoggingController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockProjectLoggingControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockProjectLoggingControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedProjectLoggingController.StartCalls()) +func (mock *ProjectLoggingControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockProjectLoggingControllerMockStart.RLock() + calls = mock.calls.Start + lockProjectLoggingControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *ProjectLoggingControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("ProjectLoggingControllerMock.SyncFunc: method is nil but ProjectLoggingController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockProjectLoggingControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockProjectLoggingControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedProjectLoggingController.SyncCalls()) +func (mock *ProjectLoggingControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockProjectLoggingControllerMockSync.RLock() + calls = mock.calls.Sync + lockProjectLoggingControllerMockSync.RUnlock() + return calls +} + +var ( + lockProjectLoggingInterfaceMockAddClusterScopedHandler sync.RWMutex + lockProjectLoggingInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockProjectLoggingInterfaceMockAddHandler sync.RWMutex + lockProjectLoggingInterfaceMockAddLifecycle sync.RWMutex + lockProjectLoggingInterfaceMockController sync.RWMutex + lockProjectLoggingInterfaceMockCreate sync.RWMutex + lockProjectLoggingInterfaceMockDelete sync.RWMutex + lockProjectLoggingInterfaceMockDeleteCollection sync.RWMutex + lockProjectLoggingInterfaceMockDeleteNamespaced sync.RWMutex + lockProjectLoggingInterfaceMockGet sync.RWMutex + lockProjectLoggingInterfaceMockGetNamespaced sync.RWMutex + lockProjectLoggingInterfaceMockList sync.RWMutex + lockProjectLoggingInterfaceMockObjectClient sync.RWMutex + lockProjectLoggingInterfaceMockUpdate sync.RWMutex + lockProjectLoggingInterfaceMockWatch sync.RWMutex +) + +// Ensure, that ProjectLoggingInterfaceMock does implement ProjectLoggingInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.ProjectLoggingInterface = &ProjectLoggingInterfaceMock{} + +// ProjectLoggingInterfaceMock is a mock implementation of ProjectLoggingInterface. +// +// func TestSomethingThatUsesProjectLoggingInterface(t *testing.T) { +// +// // make and configure a mocked ProjectLoggingInterface +// mockedProjectLoggingInterface := &ProjectLoggingInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.ProjectLoggingHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.ProjectLoggingLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.ProjectLoggingHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.ProjectLoggingLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.ProjectLoggingController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.ProjectLogging) (*v3.ProjectLogging, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.ProjectLogging, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.ProjectLogging, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.ProjectLoggingList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.ProjectLogging) (*v3.ProjectLogging, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedProjectLoggingInterface in code that requires ProjectLoggingInterface +// // and then make assertions. +// +// } +type ProjectLoggingInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.ProjectLoggingHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.ProjectLoggingLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.ProjectLoggingHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.ProjectLoggingLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.ProjectLoggingController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.ProjectLogging) (*v3.ProjectLogging, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.ProjectLogging, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.ProjectLogging, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.ProjectLoggingList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.ProjectLogging) (*v3.ProjectLogging, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.ProjectLoggingHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.ProjectLoggingLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.ProjectLoggingHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.ProjectLoggingLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.ProjectLogging + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.ProjectLogging + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ProjectLoggingInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.ProjectLoggingHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ProjectLoggingInterfaceMock.AddClusterScopedHandlerFunc: method is nil but ProjectLoggingInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ProjectLoggingHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockProjectLoggingInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockProjectLoggingInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedProjectLoggingInterface.AddClusterScopedHandlerCalls()) +func (mock *ProjectLoggingInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ProjectLoggingHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ProjectLoggingHandlerFunc + } + lockProjectLoggingInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockProjectLoggingInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *ProjectLoggingInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.ProjectLoggingLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("ProjectLoggingInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but ProjectLoggingInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ProjectLoggingLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockProjectLoggingInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockProjectLoggingInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedProjectLoggingInterface.AddClusterScopedLifecycleCalls()) +func (mock *ProjectLoggingInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ProjectLoggingLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ProjectLoggingLifecycle + } + lockProjectLoggingInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockProjectLoggingInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ProjectLoggingInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.ProjectLoggingHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ProjectLoggingInterfaceMock.AddHandlerFunc: method is nil but ProjectLoggingInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.ProjectLoggingHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockProjectLoggingInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockProjectLoggingInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedProjectLoggingInterface.AddHandlerCalls()) +func (mock *ProjectLoggingInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.ProjectLoggingHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.ProjectLoggingHandlerFunc + } + lockProjectLoggingInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockProjectLoggingInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *ProjectLoggingInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.ProjectLoggingLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("ProjectLoggingInterfaceMock.AddLifecycleFunc: method is nil but ProjectLoggingInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.ProjectLoggingLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockProjectLoggingInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockProjectLoggingInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedProjectLoggingInterface.AddLifecycleCalls()) +func (mock *ProjectLoggingInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.ProjectLoggingLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.ProjectLoggingLifecycle + } + lockProjectLoggingInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockProjectLoggingInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *ProjectLoggingInterfaceMock) Controller() v3.ProjectLoggingController { + if mock.ControllerFunc == nil { + panic("ProjectLoggingInterfaceMock.ControllerFunc: method is nil but ProjectLoggingInterface.Controller was just called") + } + callInfo := struct { + }{} + lockProjectLoggingInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockProjectLoggingInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedProjectLoggingInterface.ControllerCalls()) +func (mock *ProjectLoggingInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockProjectLoggingInterfaceMockController.RLock() + calls = mock.calls.Controller + lockProjectLoggingInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *ProjectLoggingInterfaceMock) Create(in1 *v3.ProjectLogging) (*v3.ProjectLogging, error) { + if mock.CreateFunc == nil { + panic("ProjectLoggingInterfaceMock.CreateFunc: method is nil but ProjectLoggingInterface.Create was just called") + } + callInfo := struct { + In1 *v3.ProjectLogging + }{ + In1: in1, + } + lockProjectLoggingInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockProjectLoggingInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedProjectLoggingInterface.CreateCalls()) +func (mock *ProjectLoggingInterfaceMock) CreateCalls() []struct { + In1 *v3.ProjectLogging +} { + var calls []struct { + In1 *v3.ProjectLogging + } + lockProjectLoggingInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockProjectLoggingInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *ProjectLoggingInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("ProjectLoggingInterfaceMock.DeleteFunc: method is nil but ProjectLoggingInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockProjectLoggingInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockProjectLoggingInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedProjectLoggingInterface.DeleteCalls()) +func (mock *ProjectLoggingInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockProjectLoggingInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockProjectLoggingInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *ProjectLoggingInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("ProjectLoggingInterfaceMock.DeleteCollectionFunc: method is nil but ProjectLoggingInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockProjectLoggingInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockProjectLoggingInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedProjectLoggingInterface.DeleteCollectionCalls()) +func (mock *ProjectLoggingInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockProjectLoggingInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockProjectLoggingInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *ProjectLoggingInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("ProjectLoggingInterfaceMock.DeleteNamespacedFunc: method is nil but ProjectLoggingInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockProjectLoggingInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockProjectLoggingInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedProjectLoggingInterface.DeleteNamespacedCalls()) +func (mock *ProjectLoggingInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockProjectLoggingInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockProjectLoggingInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *ProjectLoggingInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.ProjectLogging, error) { + if mock.GetFunc == nil { + panic("ProjectLoggingInterfaceMock.GetFunc: method is nil but ProjectLoggingInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockProjectLoggingInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockProjectLoggingInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedProjectLoggingInterface.GetCalls()) +func (mock *ProjectLoggingInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockProjectLoggingInterfaceMockGet.RLock() + calls = mock.calls.Get + lockProjectLoggingInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *ProjectLoggingInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.ProjectLogging, error) { + if mock.GetNamespacedFunc == nil { + panic("ProjectLoggingInterfaceMock.GetNamespacedFunc: method is nil but ProjectLoggingInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockProjectLoggingInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockProjectLoggingInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedProjectLoggingInterface.GetNamespacedCalls()) +func (mock *ProjectLoggingInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockProjectLoggingInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockProjectLoggingInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ProjectLoggingInterfaceMock) List(opts v1.ListOptions) (*v3.ProjectLoggingList, error) { + if mock.ListFunc == nil { + panic("ProjectLoggingInterfaceMock.ListFunc: method is nil but ProjectLoggingInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockProjectLoggingInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockProjectLoggingInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedProjectLoggingInterface.ListCalls()) +func (mock *ProjectLoggingInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockProjectLoggingInterfaceMockList.RLock() + calls = mock.calls.List + lockProjectLoggingInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *ProjectLoggingInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("ProjectLoggingInterfaceMock.ObjectClientFunc: method is nil but ProjectLoggingInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockProjectLoggingInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockProjectLoggingInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedProjectLoggingInterface.ObjectClientCalls()) +func (mock *ProjectLoggingInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockProjectLoggingInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockProjectLoggingInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *ProjectLoggingInterfaceMock) Update(in1 *v3.ProjectLogging) (*v3.ProjectLogging, error) { + if mock.UpdateFunc == nil { + panic("ProjectLoggingInterfaceMock.UpdateFunc: method is nil but ProjectLoggingInterface.Update was just called") + } + callInfo := struct { + In1 *v3.ProjectLogging + }{ + In1: in1, + } + lockProjectLoggingInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockProjectLoggingInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedProjectLoggingInterface.UpdateCalls()) +func (mock *ProjectLoggingInterfaceMock) UpdateCalls() []struct { + In1 *v3.ProjectLogging +} { + var calls []struct { + In1 *v3.ProjectLogging + } + lockProjectLoggingInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockProjectLoggingInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *ProjectLoggingInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("ProjectLoggingInterfaceMock.WatchFunc: method is nil but ProjectLoggingInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockProjectLoggingInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockProjectLoggingInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedProjectLoggingInterface.WatchCalls()) +func (mock *ProjectLoggingInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockProjectLoggingInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockProjectLoggingInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockProjectLoggingsGetterMockProjectLoggings sync.RWMutex +) + +// Ensure, that ProjectLoggingsGetterMock does implement ProjectLoggingsGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.ProjectLoggingsGetter = &ProjectLoggingsGetterMock{} + +// ProjectLoggingsGetterMock is a mock implementation of ProjectLoggingsGetter. +// +// func TestSomethingThatUsesProjectLoggingsGetter(t *testing.T) { +// +// // make and configure a mocked ProjectLoggingsGetter +// mockedProjectLoggingsGetter := &ProjectLoggingsGetterMock{ +// ProjectLoggingsFunc: func(namespace string) v3.ProjectLoggingInterface { +// panic("mock out the ProjectLoggings method") +// }, +// } +// +// // use mockedProjectLoggingsGetter in code that requires ProjectLoggingsGetter +// // and then make assertions. +// +// } +type ProjectLoggingsGetterMock struct { + // ProjectLoggingsFunc mocks the ProjectLoggings method. + ProjectLoggingsFunc func(namespace string) v3.ProjectLoggingInterface + + // calls tracks calls to the methods. + calls struct { + // ProjectLoggings holds details about calls to the ProjectLoggings method. + ProjectLoggings []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// ProjectLoggings calls ProjectLoggingsFunc. +func (mock *ProjectLoggingsGetterMock) ProjectLoggings(namespace string) v3.ProjectLoggingInterface { + if mock.ProjectLoggingsFunc == nil { + panic("ProjectLoggingsGetterMock.ProjectLoggingsFunc: method is nil but ProjectLoggingsGetter.ProjectLoggings was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockProjectLoggingsGetterMockProjectLoggings.Lock() + mock.calls.ProjectLoggings = append(mock.calls.ProjectLoggings, callInfo) + lockProjectLoggingsGetterMockProjectLoggings.Unlock() + return mock.ProjectLoggingsFunc(namespace) +} + +// ProjectLoggingsCalls gets all the calls that were made to ProjectLoggings. +// Check the length with: +// len(mockedProjectLoggingsGetter.ProjectLoggingsCalls()) +func (mock *ProjectLoggingsGetterMock) ProjectLoggingsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockProjectLoggingsGetterMockProjectLoggings.RLock() + calls = mock.calls.ProjectLoggings + lockProjectLoggingsGetterMockProjectLoggings.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_project_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_project_mock_test.go new file mode 100644 index 00000000..4cfab3b0 --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_project_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockProjectListerMockGet sync.RWMutex + lockProjectListerMockList sync.RWMutex +) + +// Ensure, that ProjectListerMock does implement ProjectLister. +// If this is not the case, regenerate this file with moq. +var _ v3.ProjectLister = &ProjectListerMock{} + +// ProjectListerMock is a mock implementation of ProjectLister. +// +// func TestSomethingThatUsesProjectLister(t *testing.T) { +// +// // make and configure a mocked ProjectLister +// mockedProjectLister := &ProjectListerMock{ +// GetFunc: func(namespace string, name string) (*v3.Project, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.Project, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedProjectLister in code that requires ProjectLister +// // and then make assertions. +// +// } +type ProjectListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.Project, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.Project, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *ProjectListerMock) Get(namespace string, name string) (*v3.Project, error) { + if mock.GetFunc == nil { + panic("ProjectListerMock.GetFunc: method is nil but ProjectLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockProjectListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockProjectListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedProjectLister.GetCalls()) +func (mock *ProjectListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockProjectListerMockGet.RLock() + calls = mock.calls.Get + lockProjectListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ProjectListerMock) List(namespace string, selector labels.Selector) ([]*v3.Project, error) { + if mock.ListFunc == nil { + panic("ProjectListerMock.ListFunc: method is nil but ProjectLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockProjectListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockProjectListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedProjectLister.ListCalls()) +func (mock *ProjectListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockProjectListerMockList.RLock() + calls = mock.calls.List + lockProjectListerMockList.RUnlock() + return calls +} + +var ( + lockProjectControllerMockAddClusterScopedHandler sync.RWMutex + lockProjectControllerMockAddHandler sync.RWMutex + lockProjectControllerMockEnqueue sync.RWMutex + lockProjectControllerMockGeneric sync.RWMutex + lockProjectControllerMockInformer sync.RWMutex + lockProjectControllerMockLister sync.RWMutex + lockProjectControllerMockStart sync.RWMutex + lockProjectControllerMockSync sync.RWMutex +) + +// Ensure, that ProjectControllerMock does implement ProjectController. +// If this is not the case, regenerate this file with moq. +var _ v3.ProjectController = &ProjectControllerMock{} + +// ProjectControllerMock is a mock implementation of ProjectController. +// +// func TestSomethingThatUsesProjectController(t *testing.T) { +// +// // make and configure a mocked ProjectController +// mockedProjectController := &ProjectControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.ProjectHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.ProjectHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.ProjectLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedProjectController in code that requires ProjectController +// // and then make assertions. +// +// } +type ProjectControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.ProjectHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.ProjectHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.ProjectLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.ProjectHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.ProjectHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ProjectControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.ProjectHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ProjectControllerMock.AddClusterScopedHandlerFunc: method is nil but ProjectController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ProjectHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockProjectControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockProjectControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedProjectController.AddClusterScopedHandlerCalls()) +func (mock *ProjectControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ProjectHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ProjectHandlerFunc + } + lockProjectControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockProjectControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ProjectControllerMock) AddHandler(ctx context.Context, name string, handler v3.ProjectHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ProjectControllerMock.AddHandlerFunc: method is nil but ProjectController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.ProjectHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockProjectControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockProjectControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedProjectController.AddHandlerCalls()) +func (mock *ProjectControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.ProjectHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.ProjectHandlerFunc + } + lockProjectControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockProjectControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *ProjectControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("ProjectControllerMock.EnqueueFunc: method is nil but ProjectController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockProjectControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockProjectControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedProjectController.EnqueueCalls()) +func (mock *ProjectControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockProjectControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockProjectControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *ProjectControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("ProjectControllerMock.GenericFunc: method is nil but ProjectController.Generic was just called") + } + callInfo := struct { + }{} + lockProjectControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockProjectControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedProjectController.GenericCalls()) +func (mock *ProjectControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockProjectControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockProjectControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *ProjectControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("ProjectControllerMock.InformerFunc: method is nil but ProjectController.Informer was just called") + } + callInfo := struct { + }{} + lockProjectControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockProjectControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedProjectController.InformerCalls()) +func (mock *ProjectControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockProjectControllerMockInformer.RLock() + calls = mock.calls.Informer + lockProjectControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *ProjectControllerMock) Lister() v3.ProjectLister { + if mock.ListerFunc == nil { + panic("ProjectControllerMock.ListerFunc: method is nil but ProjectController.Lister was just called") + } + callInfo := struct { + }{} + lockProjectControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockProjectControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedProjectController.ListerCalls()) +func (mock *ProjectControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockProjectControllerMockLister.RLock() + calls = mock.calls.Lister + lockProjectControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *ProjectControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("ProjectControllerMock.StartFunc: method is nil but ProjectController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockProjectControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockProjectControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedProjectController.StartCalls()) +func (mock *ProjectControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockProjectControllerMockStart.RLock() + calls = mock.calls.Start + lockProjectControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *ProjectControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("ProjectControllerMock.SyncFunc: method is nil but ProjectController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockProjectControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockProjectControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedProjectController.SyncCalls()) +func (mock *ProjectControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockProjectControllerMockSync.RLock() + calls = mock.calls.Sync + lockProjectControllerMockSync.RUnlock() + return calls +} + +var ( + lockProjectInterfaceMockAddClusterScopedHandler sync.RWMutex + lockProjectInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockProjectInterfaceMockAddHandler sync.RWMutex + lockProjectInterfaceMockAddLifecycle sync.RWMutex + lockProjectInterfaceMockController sync.RWMutex + lockProjectInterfaceMockCreate sync.RWMutex + lockProjectInterfaceMockDelete sync.RWMutex + lockProjectInterfaceMockDeleteCollection sync.RWMutex + lockProjectInterfaceMockDeleteNamespaced sync.RWMutex + lockProjectInterfaceMockGet sync.RWMutex + lockProjectInterfaceMockGetNamespaced sync.RWMutex + lockProjectInterfaceMockList sync.RWMutex + lockProjectInterfaceMockObjectClient sync.RWMutex + lockProjectInterfaceMockUpdate sync.RWMutex + lockProjectInterfaceMockWatch sync.RWMutex +) + +// Ensure, that ProjectInterfaceMock does implement ProjectInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.ProjectInterface = &ProjectInterfaceMock{} + +// ProjectInterfaceMock is a mock implementation of ProjectInterface. +// +// func TestSomethingThatUsesProjectInterface(t *testing.T) { +// +// // make and configure a mocked ProjectInterface +// mockedProjectInterface := &ProjectInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.ProjectHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.ProjectLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.ProjectHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.ProjectLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.ProjectController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.Project) (*v3.Project, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.Project, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.Project, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.ProjectList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.Project) (*v3.Project, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedProjectInterface in code that requires ProjectInterface +// // and then make assertions. +// +// } +type ProjectInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.ProjectHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.ProjectLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.ProjectHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.ProjectLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.ProjectController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.Project) (*v3.Project, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.Project, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.Project, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.ProjectList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.Project) (*v3.Project, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.ProjectHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.ProjectLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.ProjectHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.ProjectLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.Project + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.Project + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ProjectInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.ProjectHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ProjectInterfaceMock.AddClusterScopedHandlerFunc: method is nil but ProjectInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ProjectHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockProjectInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockProjectInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedProjectInterface.AddClusterScopedHandlerCalls()) +func (mock *ProjectInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ProjectHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ProjectHandlerFunc + } + lockProjectInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockProjectInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *ProjectInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.ProjectLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("ProjectInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but ProjectInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ProjectLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockProjectInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockProjectInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedProjectInterface.AddClusterScopedLifecycleCalls()) +func (mock *ProjectInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ProjectLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ProjectLifecycle + } + lockProjectInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockProjectInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ProjectInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.ProjectHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ProjectInterfaceMock.AddHandlerFunc: method is nil but ProjectInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.ProjectHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockProjectInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockProjectInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedProjectInterface.AddHandlerCalls()) +func (mock *ProjectInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.ProjectHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.ProjectHandlerFunc + } + lockProjectInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockProjectInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *ProjectInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.ProjectLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("ProjectInterfaceMock.AddLifecycleFunc: method is nil but ProjectInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.ProjectLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockProjectInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockProjectInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedProjectInterface.AddLifecycleCalls()) +func (mock *ProjectInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.ProjectLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.ProjectLifecycle + } + lockProjectInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockProjectInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *ProjectInterfaceMock) Controller() v3.ProjectController { + if mock.ControllerFunc == nil { + panic("ProjectInterfaceMock.ControllerFunc: method is nil but ProjectInterface.Controller was just called") + } + callInfo := struct { + }{} + lockProjectInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockProjectInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedProjectInterface.ControllerCalls()) +func (mock *ProjectInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockProjectInterfaceMockController.RLock() + calls = mock.calls.Controller + lockProjectInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *ProjectInterfaceMock) Create(in1 *v3.Project) (*v3.Project, error) { + if mock.CreateFunc == nil { + panic("ProjectInterfaceMock.CreateFunc: method is nil but ProjectInterface.Create was just called") + } + callInfo := struct { + In1 *v3.Project + }{ + In1: in1, + } + lockProjectInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockProjectInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedProjectInterface.CreateCalls()) +func (mock *ProjectInterfaceMock) CreateCalls() []struct { + In1 *v3.Project +} { + var calls []struct { + In1 *v3.Project + } + lockProjectInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockProjectInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *ProjectInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("ProjectInterfaceMock.DeleteFunc: method is nil but ProjectInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockProjectInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockProjectInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedProjectInterface.DeleteCalls()) +func (mock *ProjectInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockProjectInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockProjectInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *ProjectInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("ProjectInterfaceMock.DeleteCollectionFunc: method is nil but ProjectInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockProjectInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockProjectInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedProjectInterface.DeleteCollectionCalls()) +func (mock *ProjectInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockProjectInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockProjectInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *ProjectInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("ProjectInterfaceMock.DeleteNamespacedFunc: method is nil but ProjectInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockProjectInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockProjectInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedProjectInterface.DeleteNamespacedCalls()) +func (mock *ProjectInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockProjectInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockProjectInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *ProjectInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.Project, error) { + if mock.GetFunc == nil { + panic("ProjectInterfaceMock.GetFunc: method is nil but ProjectInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockProjectInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockProjectInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedProjectInterface.GetCalls()) +func (mock *ProjectInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockProjectInterfaceMockGet.RLock() + calls = mock.calls.Get + lockProjectInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *ProjectInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.Project, error) { + if mock.GetNamespacedFunc == nil { + panic("ProjectInterfaceMock.GetNamespacedFunc: method is nil but ProjectInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockProjectInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockProjectInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedProjectInterface.GetNamespacedCalls()) +func (mock *ProjectInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockProjectInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockProjectInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ProjectInterfaceMock) List(opts v1.ListOptions) (*v3.ProjectList, error) { + if mock.ListFunc == nil { + panic("ProjectInterfaceMock.ListFunc: method is nil but ProjectInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockProjectInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockProjectInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedProjectInterface.ListCalls()) +func (mock *ProjectInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockProjectInterfaceMockList.RLock() + calls = mock.calls.List + lockProjectInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *ProjectInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("ProjectInterfaceMock.ObjectClientFunc: method is nil but ProjectInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockProjectInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockProjectInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedProjectInterface.ObjectClientCalls()) +func (mock *ProjectInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockProjectInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockProjectInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *ProjectInterfaceMock) Update(in1 *v3.Project) (*v3.Project, error) { + if mock.UpdateFunc == nil { + panic("ProjectInterfaceMock.UpdateFunc: method is nil but ProjectInterface.Update was just called") + } + callInfo := struct { + In1 *v3.Project + }{ + In1: in1, + } + lockProjectInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockProjectInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedProjectInterface.UpdateCalls()) +func (mock *ProjectInterfaceMock) UpdateCalls() []struct { + In1 *v3.Project +} { + var calls []struct { + In1 *v3.Project + } + lockProjectInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockProjectInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *ProjectInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("ProjectInterfaceMock.WatchFunc: method is nil but ProjectInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockProjectInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockProjectInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedProjectInterface.WatchCalls()) +func (mock *ProjectInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockProjectInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockProjectInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockProjectsGetterMockProjects sync.RWMutex +) + +// Ensure, that ProjectsGetterMock does implement ProjectsGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.ProjectsGetter = &ProjectsGetterMock{} + +// ProjectsGetterMock is a mock implementation of ProjectsGetter. +// +// func TestSomethingThatUsesProjectsGetter(t *testing.T) { +// +// // make and configure a mocked ProjectsGetter +// mockedProjectsGetter := &ProjectsGetterMock{ +// ProjectsFunc: func(namespace string) v3.ProjectInterface { +// panic("mock out the Projects method") +// }, +// } +// +// // use mockedProjectsGetter in code that requires ProjectsGetter +// // and then make assertions. +// +// } +type ProjectsGetterMock struct { + // ProjectsFunc mocks the Projects method. + ProjectsFunc func(namespace string) v3.ProjectInterface + + // calls tracks calls to the methods. + calls struct { + // Projects holds details about calls to the Projects method. + Projects []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// Projects calls ProjectsFunc. +func (mock *ProjectsGetterMock) Projects(namespace string) v3.ProjectInterface { + if mock.ProjectsFunc == nil { + panic("ProjectsGetterMock.ProjectsFunc: method is nil but ProjectsGetter.Projects was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockProjectsGetterMockProjects.Lock() + mock.calls.Projects = append(mock.calls.Projects, callInfo) + lockProjectsGetterMockProjects.Unlock() + return mock.ProjectsFunc(namespace) +} + +// ProjectsCalls gets all the calls that were made to Projects. +// Check the length with: +// len(mockedProjectsGetter.ProjectsCalls()) +func (mock *ProjectsGetterMock) ProjectsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockProjectsGetterMockProjects.RLock() + calls = mock.calls.Projects + lockProjectsGetterMockProjects.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_project_monitor_graph_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_project_monitor_graph_mock_test.go new file mode 100644 index 00000000..163acfba --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_project_monitor_graph_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockProjectMonitorGraphListerMockGet sync.RWMutex + lockProjectMonitorGraphListerMockList sync.RWMutex +) + +// Ensure, that ProjectMonitorGraphListerMock does implement ProjectMonitorGraphLister. +// If this is not the case, regenerate this file with moq. +var _ v3.ProjectMonitorGraphLister = &ProjectMonitorGraphListerMock{} + +// ProjectMonitorGraphListerMock is a mock implementation of ProjectMonitorGraphLister. +// +// func TestSomethingThatUsesProjectMonitorGraphLister(t *testing.T) { +// +// // make and configure a mocked ProjectMonitorGraphLister +// mockedProjectMonitorGraphLister := &ProjectMonitorGraphListerMock{ +// GetFunc: func(namespace string, name string) (*v3.ProjectMonitorGraph, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.ProjectMonitorGraph, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedProjectMonitorGraphLister in code that requires ProjectMonitorGraphLister +// // and then make assertions. +// +// } +type ProjectMonitorGraphListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.ProjectMonitorGraph, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.ProjectMonitorGraph, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *ProjectMonitorGraphListerMock) Get(namespace string, name string) (*v3.ProjectMonitorGraph, error) { + if mock.GetFunc == nil { + panic("ProjectMonitorGraphListerMock.GetFunc: method is nil but ProjectMonitorGraphLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockProjectMonitorGraphListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockProjectMonitorGraphListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedProjectMonitorGraphLister.GetCalls()) +func (mock *ProjectMonitorGraphListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockProjectMonitorGraphListerMockGet.RLock() + calls = mock.calls.Get + lockProjectMonitorGraphListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ProjectMonitorGraphListerMock) List(namespace string, selector labels.Selector) ([]*v3.ProjectMonitorGraph, error) { + if mock.ListFunc == nil { + panic("ProjectMonitorGraphListerMock.ListFunc: method is nil but ProjectMonitorGraphLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockProjectMonitorGraphListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockProjectMonitorGraphListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedProjectMonitorGraphLister.ListCalls()) +func (mock *ProjectMonitorGraphListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockProjectMonitorGraphListerMockList.RLock() + calls = mock.calls.List + lockProjectMonitorGraphListerMockList.RUnlock() + return calls +} + +var ( + lockProjectMonitorGraphControllerMockAddClusterScopedHandler sync.RWMutex + lockProjectMonitorGraphControllerMockAddHandler sync.RWMutex + lockProjectMonitorGraphControllerMockEnqueue sync.RWMutex + lockProjectMonitorGraphControllerMockGeneric sync.RWMutex + lockProjectMonitorGraphControllerMockInformer sync.RWMutex + lockProjectMonitorGraphControllerMockLister sync.RWMutex + lockProjectMonitorGraphControllerMockStart sync.RWMutex + lockProjectMonitorGraphControllerMockSync sync.RWMutex +) + +// Ensure, that ProjectMonitorGraphControllerMock does implement ProjectMonitorGraphController. +// If this is not the case, regenerate this file with moq. +var _ v3.ProjectMonitorGraphController = &ProjectMonitorGraphControllerMock{} + +// ProjectMonitorGraphControllerMock is a mock implementation of ProjectMonitorGraphController. +// +// func TestSomethingThatUsesProjectMonitorGraphController(t *testing.T) { +// +// // make and configure a mocked ProjectMonitorGraphController +// mockedProjectMonitorGraphController := &ProjectMonitorGraphControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.ProjectMonitorGraphHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.ProjectMonitorGraphHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.ProjectMonitorGraphLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedProjectMonitorGraphController in code that requires ProjectMonitorGraphController +// // and then make assertions. +// +// } +type ProjectMonitorGraphControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.ProjectMonitorGraphHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.ProjectMonitorGraphHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.ProjectMonitorGraphLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.ProjectMonitorGraphHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.ProjectMonitorGraphHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ProjectMonitorGraphControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.ProjectMonitorGraphHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ProjectMonitorGraphControllerMock.AddClusterScopedHandlerFunc: method is nil but ProjectMonitorGraphController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ProjectMonitorGraphHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockProjectMonitorGraphControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockProjectMonitorGraphControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedProjectMonitorGraphController.AddClusterScopedHandlerCalls()) +func (mock *ProjectMonitorGraphControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ProjectMonitorGraphHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ProjectMonitorGraphHandlerFunc + } + lockProjectMonitorGraphControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockProjectMonitorGraphControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ProjectMonitorGraphControllerMock) AddHandler(ctx context.Context, name string, handler v3.ProjectMonitorGraphHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ProjectMonitorGraphControllerMock.AddHandlerFunc: method is nil but ProjectMonitorGraphController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.ProjectMonitorGraphHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockProjectMonitorGraphControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockProjectMonitorGraphControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedProjectMonitorGraphController.AddHandlerCalls()) +func (mock *ProjectMonitorGraphControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.ProjectMonitorGraphHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.ProjectMonitorGraphHandlerFunc + } + lockProjectMonitorGraphControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockProjectMonitorGraphControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *ProjectMonitorGraphControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("ProjectMonitorGraphControllerMock.EnqueueFunc: method is nil but ProjectMonitorGraphController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockProjectMonitorGraphControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockProjectMonitorGraphControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedProjectMonitorGraphController.EnqueueCalls()) +func (mock *ProjectMonitorGraphControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockProjectMonitorGraphControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockProjectMonitorGraphControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *ProjectMonitorGraphControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("ProjectMonitorGraphControllerMock.GenericFunc: method is nil but ProjectMonitorGraphController.Generic was just called") + } + callInfo := struct { + }{} + lockProjectMonitorGraphControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockProjectMonitorGraphControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedProjectMonitorGraphController.GenericCalls()) +func (mock *ProjectMonitorGraphControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockProjectMonitorGraphControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockProjectMonitorGraphControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *ProjectMonitorGraphControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("ProjectMonitorGraphControllerMock.InformerFunc: method is nil but ProjectMonitorGraphController.Informer was just called") + } + callInfo := struct { + }{} + lockProjectMonitorGraphControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockProjectMonitorGraphControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedProjectMonitorGraphController.InformerCalls()) +func (mock *ProjectMonitorGraphControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockProjectMonitorGraphControllerMockInformer.RLock() + calls = mock.calls.Informer + lockProjectMonitorGraphControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *ProjectMonitorGraphControllerMock) Lister() v3.ProjectMonitorGraphLister { + if mock.ListerFunc == nil { + panic("ProjectMonitorGraphControllerMock.ListerFunc: method is nil but ProjectMonitorGraphController.Lister was just called") + } + callInfo := struct { + }{} + lockProjectMonitorGraphControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockProjectMonitorGraphControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedProjectMonitorGraphController.ListerCalls()) +func (mock *ProjectMonitorGraphControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockProjectMonitorGraphControllerMockLister.RLock() + calls = mock.calls.Lister + lockProjectMonitorGraphControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *ProjectMonitorGraphControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("ProjectMonitorGraphControllerMock.StartFunc: method is nil but ProjectMonitorGraphController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockProjectMonitorGraphControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockProjectMonitorGraphControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedProjectMonitorGraphController.StartCalls()) +func (mock *ProjectMonitorGraphControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockProjectMonitorGraphControllerMockStart.RLock() + calls = mock.calls.Start + lockProjectMonitorGraphControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *ProjectMonitorGraphControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("ProjectMonitorGraphControllerMock.SyncFunc: method is nil but ProjectMonitorGraphController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockProjectMonitorGraphControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockProjectMonitorGraphControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedProjectMonitorGraphController.SyncCalls()) +func (mock *ProjectMonitorGraphControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockProjectMonitorGraphControllerMockSync.RLock() + calls = mock.calls.Sync + lockProjectMonitorGraphControllerMockSync.RUnlock() + return calls +} + +var ( + lockProjectMonitorGraphInterfaceMockAddClusterScopedHandler sync.RWMutex + lockProjectMonitorGraphInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockProjectMonitorGraphInterfaceMockAddHandler sync.RWMutex + lockProjectMonitorGraphInterfaceMockAddLifecycle sync.RWMutex + lockProjectMonitorGraphInterfaceMockController sync.RWMutex + lockProjectMonitorGraphInterfaceMockCreate sync.RWMutex + lockProjectMonitorGraphInterfaceMockDelete sync.RWMutex + lockProjectMonitorGraphInterfaceMockDeleteCollection sync.RWMutex + lockProjectMonitorGraphInterfaceMockDeleteNamespaced sync.RWMutex + lockProjectMonitorGraphInterfaceMockGet sync.RWMutex + lockProjectMonitorGraphInterfaceMockGetNamespaced sync.RWMutex + lockProjectMonitorGraphInterfaceMockList sync.RWMutex + lockProjectMonitorGraphInterfaceMockObjectClient sync.RWMutex + lockProjectMonitorGraphInterfaceMockUpdate sync.RWMutex + lockProjectMonitorGraphInterfaceMockWatch sync.RWMutex +) + +// Ensure, that ProjectMonitorGraphInterfaceMock does implement ProjectMonitorGraphInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.ProjectMonitorGraphInterface = &ProjectMonitorGraphInterfaceMock{} + +// ProjectMonitorGraphInterfaceMock is a mock implementation of ProjectMonitorGraphInterface. +// +// func TestSomethingThatUsesProjectMonitorGraphInterface(t *testing.T) { +// +// // make and configure a mocked ProjectMonitorGraphInterface +// mockedProjectMonitorGraphInterface := &ProjectMonitorGraphInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.ProjectMonitorGraphHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.ProjectMonitorGraphLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.ProjectMonitorGraphHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.ProjectMonitorGraphLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.ProjectMonitorGraphController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.ProjectMonitorGraph) (*v3.ProjectMonitorGraph, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.ProjectMonitorGraph, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.ProjectMonitorGraph, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.ProjectMonitorGraphList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.ProjectMonitorGraph) (*v3.ProjectMonitorGraph, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedProjectMonitorGraphInterface in code that requires ProjectMonitorGraphInterface +// // and then make assertions. +// +// } +type ProjectMonitorGraphInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.ProjectMonitorGraphHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.ProjectMonitorGraphLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.ProjectMonitorGraphHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.ProjectMonitorGraphLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.ProjectMonitorGraphController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.ProjectMonitorGraph) (*v3.ProjectMonitorGraph, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.ProjectMonitorGraph, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.ProjectMonitorGraph, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.ProjectMonitorGraphList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.ProjectMonitorGraph) (*v3.ProjectMonitorGraph, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.ProjectMonitorGraphHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.ProjectMonitorGraphLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.ProjectMonitorGraphHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.ProjectMonitorGraphLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.ProjectMonitorGraph + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.ProjectMonitorGraph + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ProjectMonitorGraphInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.ProjectMonitorGraphHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ProjectMonitorGraphInterfaceMock.AddClusterScopedHandlerFunc: method is nil but ProjectMonitorGraphInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ProjectMonitorGraphHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockProjectMonitorGraphInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockProjectMonitorGraphInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedProjectMonitorGraphInterface.AddClusterScopedHandlerCalls()) +func (mock *ProjectMonitorGraphInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ProjectMonitorGraphHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ProjectMonitorGraphHandlerFunc + } + lockProjectMonitorGraphInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockProjectMonitorGraphInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *ProjectMonitorGraphInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.ProjectMonitorGraphLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("ProjectMonitorGraphInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but ProjectMonitorGraphInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ProjectMonitorGraphLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockProjectMonitorGraphInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockProjectMonitorGraphInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedProjectMonitorGraphInterface.AddClusterScopedLifecycleCalls()) +func (mock *ProjectMonitorGraphInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ProjectMonitorGraphLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ProjectMonitorGraphLifecycle + } + lockProjectMonitorGraphInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockProjectMonitorGraphInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ProjectMonitorGraphInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.ProjectMonitorGraphHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ProjectMonitorGraphInterfaceMock.AddHandlerFunc: method is nil but ProjectMonitorGraphInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.ProjectMonitorGraphHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockProjectMonitorGraphInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockProjectMonitorGraphInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedProjectMonitorGraphInterface.AddHandlerCalls()) +func (mock *ProjectMonitorGraphInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.ProjectMonitorGraphHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.ProjectMonitorGraphHandlerFunc + } + lockProjectMonitorGraphInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockProjectMonitorGraphInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *ProjectMonitorGraphInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.ProjectMonitorGraphLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("ProjectMonitorGraphInterfaceMock.AddLifecycleFunc: method is nil but ProjectMonitorGraphInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.ProjectMonitorGraphLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockProjectMonitorGraphInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockProjectMonitorGraphInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedProjectMonitorGraphInterface.AddLifecycleCalls()) +func (mock *ProjectMonitorGraphInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.ProjectMonitorGraphLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.ProjectMonitorGraphLifecycle + } + lockProjectMonitorGraphInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockProjectMonitorGraphInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *ProjectMonitorGraphInterfaceMock) Controller() v3.ProjectMonitorGraphController { + if mock.ControllerFunc == nil { + panic("ProjectMonitorGraphInterfaceMock.ControllerFunc: method is nil but ProjectMonitorGraphInterface.Controller was just called") + } + callInfo := struct { + }{} + lockProjectMonitorGraphInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockProjectMonitorGraphInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedProjectMonitorGraphInterface.ControllerCalls()) +func (mock *ProjectMonitorGraphInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockProjectMonitorGraphInterfaceMockController.RLock() + calls = mock.calls.Controller + lockProjectMonitorGraphInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *ProjectMonitorGraphInterfaceMock) Create(in1 *v3.ProjectMonitorGraph) (*v3.ProjectMonitorGraph, error) { + if mock.CreateFunc == nil { + panic("ProjectMonitorGraphInterfaceMock.CreateFunc: method is nil but ProjectMonitorGraphInterface.Create was just called") + } + callInfo := struct { + In1 *v3.ProjectMonitorGraph + }{ + In1: in1, + } + lockProjectMonitorGraphInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockProjectMonitorGraphInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedProjectMonitorGraphInterface.CreateCalls()) +func (mock *ProjectMonitorGraphInterfaceMock) CreateCalls() []struct { + In1 *v3.ProjectMonitorGraph +} { + var calls []struct { + In1 *v3.ProjectMonitorGraph + } + lockProjectMonitorGraphInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockProjectMonitorGraphInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *ProjectMonitorGraphInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("ProjectMonitorGraphInterfaceMock.DeleteFunc: method is nil but ProjectMonitorGraphInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockProjectMonitorGraphInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockProjectMonitorGraphInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedProjectMonitorGraphInterface.DeleteCalls()) +func (mock *ProjectMonitorGraphInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockProjectMonitorGraphInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockProjectMonitorGraphInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *ProjectMonitorGraphInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("ProjectMonitorGraphInterfaceMock.DeleteCollectionFunc: method is nil but ProjectMonitorGraphInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockProjectMonitorGraphInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockProjectMonitorGraphInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedProjectMonitorGraphInterface.DeleteCollectionCalls()) +func (mock *ProjectMonitorGraphInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockProjectMonitorGraphInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockProjectMonitorGraphInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *ProjectMonitorGraphInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("ProjectMonitorGraphInterfaceMock.DeleteNamespacedFunc: method is nil but ProjectMonitorGraphInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockProjectMonitorGraphInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockProjectMonitorGraphInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedProjectMonitorGraphInterface.DeleteNamespacedCalls()) +func (mock *ProjectMonitorGraphInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockProjectMonitorGraphInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockProjectMonitorGraphInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *ProjectMonitorGraphInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.ProjectMonitorGraph, error) { + if mock.GetFunc == nil { + panic("ProjectMonitorGraphInterfaceMock.GetFunc: method is nil but ProjectMonitorGraphInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockProjectMonitorGraphInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockProjectMonitorGraphInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedProjectMonitorGraphInterface.GetCalls()) +func (mock *ProjectMonitorGraphInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockProjectMonitorGraphInterfaceMockGet.RLock() + calls = mock.calls.Get + lockProjectMonitorGraphInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *ProjectMonitorGraphInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.ProjectMonitorGraph, error) { + if mock.GetNamespacedFunc == nil { + panic("ProjectMonitorGraphInterfaceMock.GetNamespacedFunc: method is nil but ProjectMonitorGraphInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockProjectMonitorGraphInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockProjectMonitorGraphInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedProjectMonitorGraphInterface.GetNamespacedCalls()) +func (mock *ProjectMonitorGraphInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockProjectMonitorGraphInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockProjectMonitorGraphInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ProjectMonitorGraphInterfaceMock) List(opts v1.ListOptions) (*v3.ProjectMonitorGraphList, error) { + if mock.ListFunc == nil { + panic("ProjectMonitorGraphInterfaceMock.ListFunc: method is nil but ProjectMonitorGraphInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockProjectMonitorGraphInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockProjectMonitorGraphInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedProjectMonitorGraphInterface.ListCalls()) +func (mock *ProjectMonitorGraphInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockProjectMonitorGraphInterfaceMockList.RLock() + calls = mock.calls.List + lockProjectMonitorGraphInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *ProjectMonitorGraphInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("ProjectMonitorGraphInterfaceMock.ObjectClientFunc: method is nil but ProjectMonitorGraphInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockProjectMonitorGraphInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockProjectMonitorGraphInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedProjectMonitorGraphInterface.ObjectClientCalls()) +func (mock *ProjectMonitorGraphInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockProjectMonitorGraphInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockProjectMonitorGraphInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *ProjectMonitorGraphInterfaceMock) Update(in1 *v3.ProjectMonitorGraph) (*v3.ProjectMonitorGraph, error) { + if mock.UpdateFunc == nil { + panic("ProjectMonitorGraphInterfaceMock.UpdateFunc: method is nil but ProjectMonitorGraphInterface.Update was just called") + } + callInfo := struct { + In1 *v3.ProjectMonitorGraph + }{ + In1: in1, + } + lockProjectMonitorGraphInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockProjectMonitorGraphInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedProjectMonitorGraphInterface.UpdateCalls()) +func (mock *ProjectMonitorGraphInterfaceMock) UpdateCalls() []struct { + In1 *v3.ProjectMonitorGraph +} { + var calls []struct { + In1 *v3.ProjectMonitorGraph + } + lockProjectMonitorGraphInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockProjectMonitorGraphInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *ProjectMonitorGraphInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("ProjectMonitorGraphInterfaceMock.WatchFunc: method is nil but ProjectMonitorGraphInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockProjectMonitorGraphInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockProjectMonitorGraphInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedProjectMonitorGraphInterface.WatchCalls()) +func (mock *ProjectMonitorGraphInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockProjectMonitorGraphInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockProjectMonitorGraphInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockProjectMonitorGraphsGetterMockProjectMonitorGraphs sync.RWMutex +) + +// Ensure, that ProjectMonitorGraphsGetterMock does implement ProjectMonitorGraphsGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.ProjectMonitorGraphsGetter = &ProjectMonitorGraphsGetterMock{} + +// ProjectMonitorGraphsGetterMock is a mock implementation of ProjectMonitorGraphsGetter. +// +// func TestSomethingThatUsesProjectMonitorGraphsGetter(t *testing.T) { +// +// // make and configure a mocked ProjectMonitorGraphsGetter +// mockedProjectMonitorGraphsGetter := &ProjectMonitorGraphsGetterMock{ +// ProjectMonitorGraphsFunc: func(namespace string) v3.ProjectMonitorGraphInterface { +// panic("mock out the ProjectMonitorGraphs method") +// }, +// } +// +// // use mockedProjectMonitorGraphsGetter in code that requires ProjectMonitorGraphsGetter +// // and then make assertions. +// +// } +type ProjectMonitorGraphsGetterMock struct { + // ProjectMonitorGraphsFunc mocks the ProjectMonitorGraphs method. + ProjectMonitorGraphsFunc func(namespace string) v3.ProjectMonitorGraphInterface + + // calls tracks calls to the methods. + calls struct { + // ProjectMonitorGraphs holds details about calls to the ProjectMonitorGraphs method. + ProjectMonitorGraphs []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// ProjectMonitorGraphs calls ProjectMonitorGraphsFunc. +func (mock *ProjectMonitorGraphsGetterMock) ProjectMonitorGraphs(namespace string) v3.ProjectMonitorGraphInterface { + if mock.ProjectMonitorGraphsFunc == nil { + panic("ProjectMonitorGraphsGetterMock.ProjectMonitorGraphsFunc: method is nil but ProjectMonitorGraphsGetter.ProjectMonitorGraphs was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockProjectMonitorGraphsGetterMockProjectMonitorGraphs.Lock() + mock.calls.ProjectMonitorGraphs = append(mock.calls.ProjectMonitorGraphs, callInfo) + lockProjectMonitorGraphsGetterMockProjectMonitorGraphs.Unlock() + return mock.ProjectMonitorGraphsFunc(namespace) +} + +// ProjectMonitorGraphsCalls gets all the calls that were made to ProjectMonitorGraphs. +// Check the length with: +// len(mockedProjectMonitorGraphsGetter.ProjectMonitorGraphsCalls()) +func (mock *ProjectMonitorGraphsGetterMock) ProjectMonitorGraphsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockProjectMonitorGraphsGetterMockProjectMonitorGraphs.RLock() + calls = mock.calls.ProjectMonitorGraphs + lockProjectMonitorGraphsGetterMockProjectMonitorGraphs.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_project_network_policy_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_project_network_policy_mock_test.go new file mode 100644 index 00000000..cf3efd4e --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_project_network_policy_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockProjectNetworkPolicyListerMockGet sync.RWMutex + lockProjectNetworkPolicyListerMockList sync.RWMutex +) + +// Ensure, that ProjectNetworkPolicyListerMock does implement ProjectNetworkPolicyLister. +// If this is not the case, regenerate this file with moq. +var _ v3.ProjectNetworkPolicyLister = &ProjectNetworkPolicyListerMock{} + +// ProjectNetworkPolicyListerMock is a mock implementation of ProjectNetworkPolicyLister. +// +// func TestSomethingThatUsesProjectNetworkPolicyLister(t *testing.T) { +// +// // make and configure a mocked ProjectNetworkPolicyLister +// mockedProjectNetworkPolicyLister := &ProjectNetworkPolicyListerMock{ +// GetFunc: func(namespace string, name string) (*v3.ProjectNetworkPolicy, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.ProjectNetworkPolicy, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedProjectNetworkPolicyLister in code that requires ProjectNetworkPolicyLister +// // and then make assertions. +// +// } +type ProjectNetworkPolicyListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.ProjectNetworkPolicy, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.ProjectNetworkPolicy, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *ProjectNetworkPolicyListerMock) Get(namespace string, name string) (*v3.ProjectNetworkPolicy, error) { + if mock.GetFunc == nil { + panic("ProjectNetworkPolicyListerMock.GetFunc: method is nil but ProjectNetworkPolicyLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockProjectNetworkPolicyListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockProjectNetworkPolicyListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedProjectNetworkPolicyLister.GetCalls()) +func (mock *ProjectNetworkPolicyListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockProjectNetworkPolicyListerMockGet.RLock() + calls = mock.calls.Get + lockProjectNetworkPolicyListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ProjectNetworkPolicyListerMock) List(namespace string, selector labels.Selector) ([]*v3.ProjectNetworkPolicy, error) { + if mock.ListFunc == nil { + panic("ProjectNetworkPolicyListerMock.ListFunc: method is nil but ProjectNetworkPolicyLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockProjectNetworkPolicyListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockProjectNetworkPolicyListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedProjectNetworkPolicyLister.ListCalls()) +func (mock *ProjectNetworkPolicyListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockProjectNetworkPolicyListerMockList.RLock() + calls = mock.calls.List + lockProjectNetworkPolicyListerMockList.RUnlock() + return calls +} + +var ( + lockProjectNetworkPolicyControllerMockAddClusterScopedHandler sync.RWMutex + lockProjectNetworkPolicyControllerMockAddHandler sync.RWMutex + lockProjectNetworkPolicyControllerMockEnqueue sync.RWMutex + lockProjectNetworkPolicyControllerMockGeneric sync.RWMutex + lockProjectNetworkPolicyControllerMockInformer sync.RWMutex + lockProjectNetworkPolicyControllerMockLister sync.RWMutex + lockProjectNetworkPolicyControllerMockStart sync.RWMutex + lockProjectNetworkPolicyControllerMockSync sync.RWMutex +) + +// Ensure, that ProjectNetworkPolicyControllerMock does implement ProjectNetworkPolicyController. +// If this is not the case, regenerate this file with moq. +var _ v3.ProjectNetworkPolicyController = &ProjectNetworkPolicyControllerMock{} + +// ProjectNetworkPolicyControllerMock is a mock implementation of ProjectNetworkPolicyController. +// +// func TestSomethingThatUsesProjectNetworkPolicyController(t *testing.T) { +// +// // make and configure a mocked ProjectNetworkPolicyController +// mockedProjectNetworkPolicyController := &ProjectNetworkPolicyControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.ProjectNetworkPolicyHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.ProjectNetworkPolicyHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.ProjectNetworkPolicyLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedProjectNetworkPolicyController in code that requires ProjectNetworkPolicyController +// // and then make assertions. +// +// } +type ProjectNetworkPolicyControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.ProjectNetworkPolicyHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.ProjectNetworkPolicyHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.ProjectNetworkPolicyLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.ProjectNetworkPolicyHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.ProjectNetworkPolicyHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ProjectNetworkPolicyControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.ProjectNetworkPolicyHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ProjectNetworkPolicyControllerMock.AddClusterScopedHandlerFunc: method is nil but ProjectNetworkPolicyController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ProjectNetworkPolicyHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockProjectNetworkPolicyControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockProjectNetworkPolicyControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedProjectNetworkPolicyController.AddClusterScopedHandlerCalls()) +func (mock *ProjectNetworkPolicyControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ProjectNetworkPolicyHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ProjectNetworkPolicyHandlerFunc + } + lockProjectNetworkPolicyControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockProjectNetworkPolicyControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ProjectNetworkPolicyControllerMock) AddHandler(ctx context.Context, name string, handler v3.ProjectNetworkPolicyHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ProjectNetworkPolicyControllerMock.AddHandlerFunc: method is nil but ProjectNetworkPolicyController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.ProjectNetworkPolicyHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockProjectNetworkPolicyControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockProjectNetworkPolicyControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedProjectNetworkPolicyController.AddHandlerCalls()) +func (mock *ProjectNetworkPolicyControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.ProjectNetworkPolicyHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.ProjectNetworkPolicyHandlerFunc + } + lockProjectNetworkPolicyControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockProjectNetworkPolicyControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *ProjectNetworkPolicyControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("ProjectNetworkPolicyControllerMock.EnqueueFunc: method is nil but ProjectNetworkPolicyController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockProjectNetworkPolicyControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockProjectNetworkPolicyControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedProjectNetworkPolicyController.EnqueueCalls()) +func (mock *ProjectNetworkPolicyControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockProjectNetworkPolicyControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockProjectNetworkPolicyControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *ProjectNetworkPolicyControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("ProjectNetworkPolicyControllerMock.GenericFunc: method is nil but ProjectNetworkPolicyController.Generic was just called") + } + callInfo := struct { + }{} + lockProjectNetworkPolicyControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockProjectNetworkPolicyControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedProjectNetworkPolicyController.GenericCalls()) +func (mock *ProjectNetworkPolicyControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockProjectNetworkPolicyControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockProjectNetworkPolicyControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *ProjectNetworkPolicyControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("ProjectNetworkPolicyControllerMock.InformerFunc: method is nil but ProjectNetworkPolicyController.Informer was just called") + } + callInfo := struct { + }{} + lockProjectNetworkPolicyControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockProjectNetworkPolicyControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedProjectNetworkPolicyController.InformerCalls()) +func (mock *ProjectNetworkPolicyControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockProjectNetworkPolicyControllerMockInformer.RLock() + calls = mock.calls.Informer + lockProjectNetworkPolicyControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *ProjectNetworkPolicyControllerMock) Lister() v3.ProjectNetworkPolicyLister { + if mock.ListerFunc == nil { + panic("ProjectNetworkPolicyControllerMock.ListerFunc: method is nil but ProjectNetworkPolicyController.Lister was just called") + } + callInfo := struct { + }{} + lockProjectNetworkPolicyControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockProjectNetworkPolicyControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedProjectNetworkPolicyController.ListerCalls()) +func (mock *ProjectNetworkPolicyControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockProjectNetworkPolicyControllerMockLister.RLock() + calls = mock.calls.Lister + lockProjectNetworkPolicyControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *ProjectNetworkPolicyControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("ProjectNetworkPolicyControllerMock.StartFunc: method is nil but ProjectNetworkPolicyController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockProjectNetworkPolicyControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockProjectNetworkPolicyControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedProjectNetworkPolicyController.StartCalls()) +func (mock *ProjectNetworkPolicyControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockProjectNetworkPolicyControllerMockStart.RLock() + calls = mock.calls.Start + lockProjectNetworkPolicyControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *ProjectNetworkPolicyControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("ProjectNetworkPolicyControllerMock.SyncFunc: method is nil but ProjectNetworkPolicyController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockProjectNetworkPolicyControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockProjectNetworkPolicyControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedProjectNetworkPolicyController.SyncCalls()) +func (mock *ProjectNetworkPolicyControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockProjectNetworkPolicyControllerMockSync.RLock() + calls = mock.calls.Sync + lockProjectNetworkPolicyControllerMockSync.RUnlock() + return calls +} + +var ( + lockProjectNetworkPolicyInterfaceMockAddClusterScopedHandler sync.RWMutex + lockProjectNetworkPolicyInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockProjectNetworkPolicyInterfaceMockAddHandler sync.RWMutex + lockProjectNetworkPolicyInterfaceMockAddLifecycle sync.RWMutex + lockProjectNetworkPolicyInterfaceMockController sync.RWMutex + lockProjectNetworkPolicyInterfaceMockCreate sync.RWMutex + lockProjectNetworkPolicyInterfaceMockDelete sync.RWMutex + lockProjectNetworkPolicyInterfaceMockDeleteCollection sync.RWMutex + lockProjectNetworkPolicyInterfaceMockDeleteNamespaced sync.RWMutex + lockProjectNetworkPolicyInterfaceMockGet sync.RWMutex + lockProjectNetworkPolicyInterfaceMockGetNamespaced sync.RWMutex + lockProjectNetworkPolicyInterfaceMockList sync.RWMutex + lockProjectNetworkPolicyInterfaceMockObjectClient sync.RWMutex + lockProjectNetworkPolicyInterfaceMockUpdate sync.RWMutex + lockProjectNetworkPolicyInterfaceMockWatch sync.RWMutex +) + +// Ensure, that ProjectNetworkPolicyInterfaceMock does implement ProjectNetworkPolicyInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.ProjectNetworkPolicyInterface = &ProjectNetworkPolicyInterfaceMock{} + +// ProjectNetworkPolicyInterfaceMock is a mock implementation of ProjectNetworkPolicyInterface. +// +// func TestSomethingThatUsesProjectNetworkPolicyInterface(t *testing.T) { +// +// // make and configure a mocked ProjectNetworkPolicyInterface +// mockedProjectNetworkPolicyInterface := &ProjectNetworkPolicyInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.ProjectNetworkPolicyHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.ProjectNetworkPolicyLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.ProjectNetworkPolicyHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.ProjectNetworkPolicyLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.ProjectNetworkPolicyController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.ProjectNetworkPolicy) (*v3.ProjectNetworkPolicy, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.ProjectNetworkPolicy, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.ProjectNetworkPolicy, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.ProjectNetworkPolicyList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.ProjectNetworkPolicy) (*v3.ProjectNetworkPolicy, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedProjectNetworkPolicyInterface in code that requires ProjectNetworkPolicyInterface +// // and then make assertions. +// +// } +type ProjectNetworkPolicyInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.ProjectNetworkPolicyHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.ProjectNetworkPolicyLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.ProjectNetworkPolicyHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.ProjectNetworkPolicyLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.ProjectNetworkPolicyController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.ProjectNetworkPolicy) (*v3.ProjectNetworkPolicy, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.ProjectNetworkPolicy, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.ProjectNetworkPolicy, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.ProjectNetworkPolicyList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.ProjectNetworkPolicy) (*v3.ProjectNetworkPolicy, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.ProjectNetworkPolicyHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.ProjectNetworkPolicyLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.ProjectNetworkPolicyHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.ProjectNetworkPolicyLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.ProjectNetworkPolicy + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.ProjectNetworkPolicy + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ProjectNetworkPolicyInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.ProjectNetworkPolicyHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ProjectNetworkPolicyInterfaceMock.AddClusterScopedHandlerFunc: method is nil but ProjectNetworkPolicyInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ProjectNetworkPolicyHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockProjectNetworkPolicyInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockProjectNetworkPolicyInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedProjectNetworkPolicyInterface.AddClusterScopedHandlerCalls()) +func (mock *ProjectNetworkPolicyInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ProjectNetworkPolicyHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ProjectNetworkPolicyHandlerFunc + } + lockProjectNetworkPolicyInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockProjectNetworkPolicyInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *ProjectNetworkPolicyInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.ProjectNetworkPolicyLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("ProjectNetworkPolicyInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but ProjectNetworkPolicyInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ProjectNetworkPolicyLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockProjectNetworkPolicyInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockProjectNetworkPolicyInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedProjectNetworkPolicyInterface.AddClusterScopedLifecycleCalls()) +func (mock *ProjectNetworkPolicyInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ProjectNetworkPolicyLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ProjectNetworkPolicyLifecycle + } + lockProjectNetworkPolicyInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockProjectNetworkPolicyInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ProjectNetworkPolicyInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.ProjectNetworkPolicyHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ProjectNetworkPolicyInterfaceMock.AddHandlerFunc: method is nil but ProjectNetworkPolicyInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.ProjectNetworkPolicyHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockProjectNetworkPolicyInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockProjectNetworkPolicyInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedProjectNetworkPolicyInterface.AddHandlerCalls()) +func (mock *ProjectNetworkPolicyInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.ProjectNetworkPolicyHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.ProjectNetworkPolicyHandlerFunc + } + lockProjectNetworkPolicyInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockProjectNetworkPolicyInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *ProjectNetworkPolicyInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.ProjectNetworkPolicyLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("ProjectNetworkPolicyInterfaceMock.AddLifecycleFunc: method is nil but ProjectNetworkPolicyInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.ProjectNetworkPolicyLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockProjectNetworkPolicyInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockProjectNetworkPolicyInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedProjectNetworkPolicyInterface.AddLifecycleCalls()) +func (mock *ProjectNetworkPolicyInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.ProjectNetworkPolicyLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.ProjectNetworkPolicyLifecycle + } + lockProjectNetworkPolicyInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockProjectNetworkPolicyInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *ProjectNetworkPolicyInterfaceMock) Controller() v3.ProjectNetworkPolicyController { + if mock.ControllerFunc == nil { + panic("ProjectNetworkPolicyInterfaceMock.ControllerFunc: method is nil but ProjectNetworkPolicyInterface.Controller was just called") + } + callInfo := struct { + }{} + lockProjectNetworkPolicyInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockProjectNetworkPolicyInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedProjectNetworkPolicyInterface.ControllerCalls()) +func (mock *ProjectNetworkPolicyInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockProjectNetworkPolicyInterfaceMockController.RLock() + calls = mock.calls.Controller + lockProjectNetworkPolicyInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *ProjectNetworkPolicyInterfaceMock) Create(in1 *v3.ProjectNetworkPolicy) (*v3.ProjectNetworkPolicy, error) { + if mock.CreateFunc == nil { + panic("ProjectNetworkPolicyInterfaceMock.CreateFunc: method is nil but ProjectNetworkPolicyInterface.Create was just called") + } + callInfo := struct { + In1 *v3.ProjectNetworkPolicy + }{ + In1: in1, + } + lockProjectNetworkPolicyInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockProjectNetworkPolicyInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedProjectNetworkPolicyInterface.CreateCalls()) +func (mock *ProjectNetworkPolicyInterfaceMock) CreateCalls() []struct { + In1 *v3.ProjectNetworkPolicy +} { + var calls []struct { + In1 *v3.ProjectNetworkPolicy + } + lockProjectNetworkPolicyInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockProjectNetworkPolicyInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *ProjectNetworkPolicyInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("ProjectNetworkPolicyInterfaceMock.DeleteFunc: method is nil but ProjectNetworkPolicyInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockProjectNetworkPolicyInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockProjectNetworkPolicyInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedProjectNetworkPolicyInterface.DeleteCalls()) +func (mock *ProjectNetworkPolicyInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockProjectNetworkPolicyInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockProjectNetworkPolicyInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *ProjectNetworkPolicyInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("ProjectNetworkPolicyInterfaceMock.DeleteCollectionFunc: method is nil but ProjectNetworkPolicyInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockProjectNetworkPolicyInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockProjectNetworkPolicyInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedProjectNetworkPolicyInterface.DeleteCollectionCalls()) +func (mock *ProjectNetworkPolicyInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockProjectNetworkPolicyInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockProjectNetworkPolicyInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *ProjectNetworkPolicyInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("ProjectNetworkPolicyInterfaceMock.DeleteNamespacedFunc: method is nil but ProjectNetworkPolicyInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockProjectNetworkPolicyInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockProjectNetworkPolicyInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedProjectNetworkPolicyInterface.DeleteNamespacedCalls()) +func (mock *ProjectNetworkPolicyInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockProjectNetworkPolicyInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockProjectNetworkPolicyInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *ProjectNetworkPolicyInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.ProjectNetworkPolicy, error) { + if mock.GetFunc == nil { + panic("ProjectNetworkPolicyInterfaceMock.GetFunc: method is nil but ProjectNetworkPolicyInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockProjectNetworkPolicyInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockProjectNetworkPolicyInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedProjectNetworkPolicyInterface.GetCalls()) +func (mock *ProjectNetworkPolicyInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockProjectNetworkPolicyInterfaceMockGet.RLock() + calls = mock.calls.Get + lockProjectNetworkPolicyInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *ProjectNetworkPolicyInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.ProjectNetworkPolicy, error) { + if mock.GetNamespacedFunc == nil { + panic("ProjectNetworkPolicyInterfaceMock.GetNamespacedFunc: method is nil but ProjectNetworkPolicyInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockProjectNetworkPolicyInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockProjectNetworkPolicyInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedProjectNetworkPolicyInterface.GetNamespacedCalls()) +func (mock *ProjectNetworkPolicyInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockProjectNetworkPolicyInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockProjectNetworkPolicyInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ProjectNetworkPolicyInterfaceMock) List(opts v1.ListOptions) (*v3.ProjectNetworkPolicyList, error) { + if mock.ListFunc == nil { + panic("ProjectNetworkPolicyInterfaceMock.ListFunc: method is nil but ProjectNetworkPolicyInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockProjectNetworkPolicyInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockProjectNetworkPolicyInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedProjectNetworkPolicyInterface.ListCalls()) +func (mock *ProjectNetworkPolicyInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockProjectNetworkPolicyInterfaceMockList.RLock() + calls = mock.calls.List + lockProjectNetworkPolicyInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *ProjectNetworkPolicyInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("ProjectNetworkPolicyInterfaceMock.ObjectClientFunc: method is nil but ProjectNetworkPolicyInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockProjectNetworkPolicyInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockProjectNetworkPolicyInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedProjectNetworkPolicyInterface.ObjectClientCalls()) +func (mock *ProjectNetworkPolicyInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockProjectNetworkPolicyInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockProjectNetworkPolicyInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *ProjectNetworkPolicyInterfaceMock) Update(in1 *v3.ProjectNetworkPolicy) (*v3.ProjectNetworkPolicy, error) { + if mock.UpdateFunc == nil { + panic("ProjectNetworkPolicyInterfaceMock.UpdateFunc: method is nil but ProjectNetworkPolicyInterface.Update was just called") + } + callInfo := struct { + In1 *v3.ProjectNetworkPolicy + }{ + In1: in1, + } + lockProjectNetworkPolicyInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockProjectNetworkPolicyInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedProjectNetworkPolicyInterface.UpdateCalls()) +func (mock *ProjectNetworkPolicyInterfaceMock) UpdateCalls() []struct { + In1 *v3.ProjectNetworkPolicy +} { + var calls []struct { + In1 *v3.ProjectNetworkPolicy + } + lockProjectNetworkPolicyInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockProjectNetworkPolicyInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *ProjectNetworkPolicyInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("ProjectNetworkPolicyInterfaceMock.WatchFunc: method is nil but ProjectNetworkPolicyInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockProjectNetworkPolicyInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockProjectNetworkPolicyInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedProjectNetworkPolicyInterface.WatchCalls()) +func (mock *ProjectNetworkPolicyInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockProjectNetworkPolicyInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockProjectNetworkPolicyInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockProjectNetworkPoliciesGetterMockProjectNetworkPolicies sync.RWMutex +) + +// Ensure, that ProjectNetworkPoliciesGetterMock does implement ProjectNetworkPoliciesGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.ProjectNetworkPoliciesGetter = &ProjectNetworkPoliciesGetterMock{} + +// ProjectNetworkPoliciesGetterMock is a mock implementation of ProjectNetworkPoliciesGetter. +// +// func TestSomethingThatUsesProjectNetworkPoliciesGetter(t *testing.T) { +// +// // make and configure a mocked ProjectNetworkPoliciesGetter +// mockedProjectNetworkPoliciesGetter := &ProjectNetworkPoliciesGetterMock{ +// ProjectNetworkPoliciesFunc: func(namespace string) v3.ProjectNetworkPolicyInterface { +// panic("mock out the ProjectNetworkPolicies method") +// }, +// } +// +// // use mockedProjectNetworkPoliciesGetter in code that requires ProjectNetworkPoliciesGetter +// // and then make assertions. +// +// } +type ProjectNetworkPoliciesGetterMock struct { + // ProjectNetworkPoliciesFunc mocks the ProjectNetworkPolicies method. + ProjectNetworkPoliciesFunc func(namespace string) v3.ProjectNetworkPolicyInterface + + // calls tracks calls to the methods. + calls struct { + // ProjectNetworkPolicies holds details about calls to the ProjectNetworkPolicies method. + ProjectNetworkPolicies []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// ProjectNetworkPolicies calls ProjectNetworkPoliciesFunc. +func (mock *ProjectNetworkPoliciesGetterMock) ProjectNetworkPolicies(namespace string) v3.ProjectNetworkPolicyInterface { + if mock.ProjectNetworkPoliciesFunc == nil { + panic("ProjectNetworkPoliciesGetterMock.ProjectNetworkPoliciesFunc: method is nil but ProjectNetworkPoliciesGetter.ProjectNetworkPolicies was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockProjectNetworkPoliciesGetterMockProjectNetworkPolicies.Lock() + mock.calls.ProjectNetworkPolicies = append(mock.calls.ProjectNetworkPolicies, callInfo) + lockProjectNetworkPoliciesGetterMockProjectNetworkPolicies.Unlock() + return mock.ProjectNetworkPoliciesFunc(namespace) +} + +// ProjectNetworkPoliciesCalls gets all the calls that were made to ProjectNetworkPolicies. +// Check the length with: +// len(mockedProjectNetworkPoliciesGetter.ProjectNetworkPoliciesCalls()) +func (mock *ProjectNetworkPoliciesGetterMock) ProjectNetworkPoliciesCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockProjectNetworkPoliciesGetterMockProjectNetworkPolicies.RLock() + calls = mock.calls.ProjectNetworkPolicies + lockProjectNetworkPoliciesGetterMockProjectNetworkPolicies.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_project_role_template_binding_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_project_role_template_binding_mock_test.go new file mode 100644 index 00000000..96189930 --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_project_role_template_binding_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockProjectRoleTemplateBindingListerMockGet sync.RWMutex + lockProjectRoleTemplateBindingListerMockList sync.RWMutex +) + +// Ensure, that ProjectRoleTemplateBindingListerMock does implement ProjectRoleTemplateBindingLister. +// If this is not the case, regenerate this file with moq. +var _ v3.ProjectRoleTemplateBindingLister = &ProjectRoleTemplateBindingListerMock{} + +// ProjectRoleTemplateBindingListerMock is a mock implementation of ProjectRoleTemplateBindingLister. +// +// func TestSomethingThatUsesProjectRoleTemplateBindingLister(t *testing.T) { +// +// // make and configure a mocked ProjectRoleTemplateBindingLister +// mockedProjectRoleTemplateBindingLister := &ProjectRoleTemplateBindingListerMock{ +// GetFunc: func(namespace string, name string) (*v3.ProjectRoleTemplateBinding, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.ProjectRoleTemplateBinding, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedProjectRoleTemplateBindingLister in code that requires ProjectRoleTemplateBindingLister +// // and then make assertions. +// +// } +type ProjectRoleTemplateBindingListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.ProjectRoleTemplateBinding, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.ProjectRoleTemplateBinding, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *ProjectRoleTemplateBindingListerMock) Get(namespace string, name string) (*v3.ProjectRoleTemplateBinding, error) { + if mock.GetFunc == nil { + panic("ProjectRoleTemplateBindingListerMock.GetFunc: method is nil but ProjectRoleTemplateBindingLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockProjectRoleTemplateBindingListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockProjectRoleTemplateBindingListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedProjectRoleTemplateBindingLister.GetCalls()) +func (mock *ProjectRoleTemplateBindingListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockProjectRoleTemplateBindingListerMockGet.RLock() + calls = mock.calls.Get + lockProjectRoleTemplateBindingListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ProjectRoleTemplateBindingListerMock) List(namespace string, selector labels.Selector) ([]*v3.ProjectRoleTemplateBinding, error) { + if mock.ListFunc == nil { + panic("ProjectRoleTemplateBindingListerMock.ListFunc: method is nil but ProjectRoleTemplateBindingLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockProjectRoleTemplateBindingListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockProjectRoleTemplateBindingListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedProjectRoleTemplateBindingLister.ListCalls()) +func (mock *ProjectRoleTemplateBindingListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockProjectRoleTemplateBindingListerMockList.RLock() + calls = mock.calls.List + lockProjectRoleTemplateBindingListerMockList.RUnlock() + return calls +} + +var ( + lockProjectRoleTemplateBindingControllerMockAddClusterScopedHandler sync.RWMutex + lockProjectRoleTemplateBindingControllerMockAddHandler sync.RWMutex + lockProjectRoleTemplateBindingControllerMockEnqueue sync.RWMutex + lockProjectRoleTemplateBindingControllerMockGeneric sync.RWMutex + lockProjectRoleTemplateBindingControllerMockInformer sync.RWMutex + lockProjectRoleTemplateBindingControllerMockLister sync.RWMutex + lockProjectRoleTemplateBindingControllerMockStart sync.RWMutex + lockProjectRoleTemplateBindingControllerMockSync sync.RWMutex +) + +// Ensure, that ProjectRoleTemplateBindingControllerMock does implement ProjectRoleTemplateBindingController. +// If this is not the case, regenerate this file with moq. +var _ v3.ProjectRoleTemplateBindingController = &ProjectRoleTemplateBindingControllerMock{} + +// ProjectRoleTemplateBindingControllerMock is a mock implementation of ProjectRoleTemplateBindingController. +// +// func TestSomethingThatUsesProjectRoleTemplateBindingController(t *testing.T) { +// +// // make and configure a mocked ProjectRoleTemplateBindingController +// mockedProjectRoleTemplateBindingController := &ProjectRoleTemplateBindingControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.ProjectRoleTemplateBindingHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.ProjectRoleTemplateBindingHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.ProjectRoleTemplateBindingLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedProjectRoleTemplateBindingController in code that requires ProjectRoleTemplateBindingController +// // and then make assertions. +// +// } +type ProjectRoleTemplateBindingControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.ProjectRoleTemplateBindingHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.ProjectRoleTemplateBindingHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.ProjectRoleTemplateBindingLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.ProjectRoleTemplateBindingHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.ProjectRoleTemplateBindingHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ProjectRoleTemplateBindingControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.ProjectRoleTemplateBindingHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ProjectRoleTemplateBindingControllerMock.AddClusterScopedHandlerFunc: method is nil but ProjectRoleTemplateBindingController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ProjectRoleTemplateBindingHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockProjectRoleTemplateBindingControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockProjectRoleTemplateBindingControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedProjectRoleTemplateBindingController.AddClusterScopedHandlerCalls()) +func (mock *ProjectRoleTemplateBindingControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ProjectRoleTemplateBindingHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ProjectRoleTemplateBindingHandlerFunc + } + lockProjectRoleTemplateBindingControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockProjectRoleTemplateBindingControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ProjectRoleTemplateBindingControllerMock) AddHandler(ctx context.Context, name string, handler v3.ProjectRoleTemplateBindingHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ProjectRoleTemplateBindingControllerMock.AddHandlerFunc: method is nil but ProjectRoleTemplateBindingController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.ProjectRoleTemplateBindingHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockProjectRoleTemplateBindingControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockProjectRoleTemplateBindingControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedProjectRoleTemplateBindingController.AddHandlerCalls()) +func (mock *ProjectRoleTemplateBindingControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.ProjectRoleTemplateBindingHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.ProjectRoleTemplateBindingHandlerFunc + } + lockProjectRoleTemplateBindingControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockProjectRoleTemplateBindingControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *ProjectRoleTemplateBindingControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("ProjectRoleTemplateBindingControllerMock.EnqueueFunc: method is nil but ProjectRoleTemplateBindingController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockProjectRoleTemplateBindingControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockProjectRoleTemplateBindingControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedProjectRoleTemplateBindingController.EnqueueCalls()) +func (mock *ProjectRoleTemplateBindingControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockProjectRoleTemplateBindingControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockProjectRoleTemplateBindingControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *ProjectRoleTemplateBindingControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("ProjectRoleTemplateBindingControllerMock.GenericFunc: method is nil but ProjectRoleTemplateBindingController.Generic was just called") + } + callInfo := struct { + }{} + lockProjectRoleTemplateBindingControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockProjectRoleTemplateBindingControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedProjectRoleTemplateBindingController.GenericCalls()) +func (mock *ProjectRoleTemplateBindingControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockProjectRoleTemplateBindingControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockProjectRoleTemplateBindingControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *ProjectRoleTemplateBindingControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("ProjectRoleTemplateBindingControllerMock.InformerFunc: method is nil but ProjectRoleTemplateBindingController.Informer was just called") + } + callInfo := struct { + }{} + lockProjectRoleTemplateBindingControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockProjectRoleTemplateBindingControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedProjectRoleTemplateBindingController.InformerCalls()) +func (mock *ProjectRoleTemplateBindingControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockProjectRoleTemplateBindingControllerMockInformer.RLock() + calls = mock.calls.Informer + lockProjectRoleTemplateBindingControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *ProjectRoleTemplateBindingControllerMock) Lister() v3.ProjectRoleTemplateBindingLister { + if mock.ListerFunc == nil { + panic("ProjectRoleTemplateBindingControllerMock.ListerFunc: method is nil but ProjectRoleTemplateBindingController.Lister was just called") + } + callInfo := struct { + }{} + lockProjectRoleTemplateBindingControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockProjectRoleTemplateBindingControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedProjectRoleTemplateBindingController.ListerCalls()) +func (mock *ProjectRoleTemplateBindingControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockProjectRoleTemplateBindingControllerMockLister.RLock() + calls = mock.calls.Lister + lockProjectRoleTemplateBindingControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *ProjectRoleTemplateBindingControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("ProjectRoleTemplateBindingControllerMock.StartFunc: method is nil but ProjectRoleTemplateBindingController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockProjectRoleTemplateBindingControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockProjectRoleTemplateBindingControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedProjectRoleTemplateBindingController.StartCalls()) +func (mock *ProjectRoleTemplateBindingControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockProjectRoleTemplateBindingControllerMockStart.RLock() + calls = mock.calls.Start + lockProjectRoleTemplateBindingControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *ProjectRoleTemplateBindingControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("ProjectRoleTemplateBindingControllerMock.SyncFunc: method is nil but ProjectRoleTemplateBindingController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockProjectRoleTemplateBindingControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockProjectRoleTemplateBindingControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedProjectRoleTemplateBindingController.SyncCalls()) +func (mock *ProjectRoleTemplateBindingControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockProjectRoleTemplateBindingControllerMockSync.RLock() + calls = mock.calls.Sync + lockProjectRoleTemplateBindingControllerMockSync.RUnlock() + return calls +} + +var ( + lockProjectRoleTemplateBindingInterfaceMockAddClusterScopedHandler sync.RWMutex + lockProjectRoleTemplateBindingInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockProjectRoleTemplateBindingInterfaceMockAddHandler sync.RWMutex + lockProjectRoleTemplateBindingInterfaceMockAddLifecycle sync.RWMutex + lockProjectRoleTemplateBindingInterfaceMockController sync.RWMutex + lockProjectRoleTemplateBindingInterfaceMockCreate sync.RWMutex + lockProjectRoleTemplateBindingInterfaceMockDelete sync.RWMutex + lockProjectRoleTemplateBindingInterfaceMockDeleteCollection sync.RWMutex + lockProjectRoleTemplateBindingInterfaceMockDeleteNamespaced sync.RWMutex + lockProjectRoleTemplateBindingInterfaceMockGet sync.RWMutex + lockProjectRoleTemplateBindingInterfaceMockGetNamespaced sync.RWMutex + lockProjectRoleTemplateBindingInterfaceMockList sync.RWMutex + lockProjectRoleTemplateBindingInterfaceMockObjectClient sync.RWMutex + lockProjectRoleTemplateBindingInterfaceMockUpdate sync.RWMutex + lockProjectRoleTemplateBindingInterfaceMockWatch sync.RWMutex +) + +// Ensure, that ProjectRoleTemplateBindingInterfaceMock does implement ProjectRoleTemplateBindingInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.ProjectRoleTemplateBindingInterface = &ProjectRoleTemplateBindingInterfaceMock{} + +// ProjectRoleTemplateBindingInterfaceMock is a mock implementation of ProjectRoleTemplateBindingInterface. +// +// func TestSomethingThatUsesProjectRoleTemplateBindingInterface(t *testing.T) { +// +// // make and configure a mocked ProjectRoleTemplateBindingInterface +// mockedProjectRoleTemplateBindingInterface := &ProjectRoleTemplateBindingInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.ProjectRoleTemplateBindingHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.ProjectRoleTemplateBindingLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.ProjectRoleTemplateBindingHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.ProjectRoleTemplateBindingLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.ProjectRoleTemplateBindingController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.ProjectRoleTemplateBinding) (*v3.ProjectRoleTemplateBinding, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.ProjectRoleTemplateBinding, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.ProjectRoleTemplateBinding, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.ProjectRoleTemplateBindingList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.ProjectRoleTemplateBinding) (*v3.ProjectRoleTemplateBinding, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedProjectRoleTemplateBindingInterface in code that requires ProjectRoleTemplateBindingInterface +// // and then make assertions. +// +// } +type ProjectRoleTemplateBindingInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.ProjectRoleTemplateBindingHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.ProjectRoleTemplateBindingLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.ProjectRoleTemplateBindingHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.ProjectRoleTemplateBindingLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.ProjectRoleTemplateBindingController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.ProjectRoleTemplateBinding) (*v3.ProjectRoleTemplateBinding, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.ProjectRoleTemplateBinding, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.ProjectRoleTemplateBinding, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.ProjectRoleTemplateBindingList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.ProjectRoleTemplateBinding) (*v3.ProjectRoleTemplateBinding, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.ProjectRoleTemplateBindingHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.ProjectRoleTemplateBindingLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.ProjectRoleTemplateBindingHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.ProjectRoleTemplateBindingLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.ProjectRoleTemplateBinding + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.ProjectRoleTemplateBinding + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ProjectRoleTemplateBindingInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.ProjectRoleTemplateBindingHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ProjectRoleTemplateBindingInterfaceMock.AddClusterScopedHandlerFunc: method is nil but ProjectRoleTemplateBindingInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ProjectRoleTemplateBindingHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockProjectRoleTemplateBindingInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockProjectRoleTemplateBindingInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedProjectRoleTemplateBindingInterface.AddClusterScopedHandlerCalls()) +func (mock *ProjectRoleTemplateBindingInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ProjectRoleTemplateBindingHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ProjectRoleTemplateBindingHandlerFunc + } + lockProjectRoleTemplateBindingInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockProjectRoleTemplateBindingInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *ProjectRoleTemplateBindingInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.ProjectRoleTemplateBindingLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("ProjectRoleTemplateBindingInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but ProjectRoleTemplateBindingInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ProjectRoleTemplateBindingLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockProjectRoleTemplateBindingInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockProjectRoleTemplateBindingInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedProjectRoleTemplateBindingInterface.AddClusterScopedLifecycleCalls()) +func (mock *ProjectRoleTemplateBindingInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ProjectRoleTemplateBindingLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ProjectRoleTemplateBindingLifecycle + } + lockProjectRoleTemplateBindingInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockProjectRoleTemplateBindingInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ProjectRoleTemplateBindingInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.ProjectRoleTemplateBindingHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ProjectRoleTemplateBindingInterfaceMock.AddHandlerFunc: method is nil but ProjectRoleTemplateBindingInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.ProjectRoleTemplateBindingHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockProjectRoleTemplateBindingInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockProjectRoleTemplateBindingInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedProjectRoleTemplateBindingInterface.AddHandlerCalls()) +func (mock *ProjectRoleTemplateBindingInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.ProjectRoleTemplateBindingHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.ProjectRoleTemplateBindingHandlerFunc + } + lockProjectRoleTemplateBindingInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockProjectRoleTemplateBindingInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *ProjectRoleTemplateBindingInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.ProjectRoleTemplateBindingLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("ProjectRoleTemplateBindingInterfaceMock.AddLifecycleFunc: method is nil but ProjectRoleTemplateBindingInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.ProjectRoleTemplateBindingLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockProjectRoleTemplateBindingInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockProjectRoleTemplateBindingInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedProjectRoleTemplateBindingInterface.AddLifecycleCalls()) +func (mock *ProjectRoleTemplateBindingInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.ProjectRoleTemplateBindingLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.ProjectRoleTemplateBindingLifecycle + } + lockProjectRoleTemplateBindingInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockProjectRoleTemplateBindingInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *ProjectRoleTemplateBindingInterfaceMock) Controller() v3.ProjectRoleTemplateBindingController { + if mock.ControllerFunc == nil { + panic("ProjectRoleTemplateBindingInterfaceMock.ControllerFunc: method is nil but ProjectRoleTemplateBindingInterface.Controller was just called") + } + callInfo := struct { + }{} + lockProjectRoleTemplateBindingInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockProjectRoleTemplateBindingInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedProjectRoleTemplateBindingInterface.ControllerCalls()) +func (mock *ProjectRoleTemplateBindingInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockProjectRoleTemplateBindingInterfaceMockController.RLock() + calls = mock.calls.Controller + lockProjectRoleTemplateBindingInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *ProjectRoleTemplateBindingInterfaceMock) Create(in1 *v3.ProjectRoleTemplateBinding) (*v3.ProjectRoleTemplateBinding, error) { + if mock.CreateFunc == nil { + panic("ProjectRoleTemplateBindingInterfaceMock.CreateFunc: method is nil but ProjectRoleTemplateBindingInterface.Create was just called") + } + callInfo := struct { + In1 *v3.ProjectRoleTemplateBinding + }{ + In1: in1, + } + lockProjectRoleTemplateBindingInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockProjectRoleTemplateBindingInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedProjectRoleTemplateBindingInterface.CreateCalls()) +func (mock *ProjectRoleTemplateBindingInterfaceMock) CreateCalls() []struct { + In1 *v3.ProjectRoleTemplateBinding +} { + var calls []struct { + In1 *v3.ProjectRoleTemplateBinding + } + lockProjectRoleTemplateBindingInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockProjectRoleTemplateBindingInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *ProjectRoleTemplateBindingInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("ProjectRoleTemplateBindingInterfaceMock.DeleteFunc: method is nil but ProjectRoleTemplateBindingInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockProjectRoleTemplateBindingInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockProjectRoleTemplateBindingInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedProjectRoleTemplateBindingInterface.DeleteCalls()) +func (mock *ProjectRoleTemplateBindingInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockProjectRoleTemplateBindingInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockProjectRoleTemplateBindingInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *ProjectRoleTemplateBindingInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("ProjectRoleTemplateBindingInterfaceMock.DeleteCollectionFunc: method is nil but ProjectRoleTemplateBindingInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockProjectRoleTemplateBindingInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockProjectRoleTemplateBindingInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedProjectRoleTemplateBindingInterface.DeleteCollectionCalls()) +func (mock *ProjectRoleTemplateBindingInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockProjectRoleTemplateBindingInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockProjectRoleTemplateBindingInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *ProjectRoleTemplateBindingInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("ProjectRoleTemplateBindingInterfaceMock.DeleteNamespacedFunc: method is nil but ProjectRoleTemplateBindingInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockProjectRoleTemplateBindingInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockProjectRoleTemplateBindingInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedProjectRoleTemplateBindingInterface.DeleteNamespacedCalls()) +func (mock *ProjectRoleTemplateBindingInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockProjectRoleTemplateBindingInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockProjectRoleTemplateBindingInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *ProjectRoleTemplateBindingInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.ProjectRoleTemplateBinding, error) { + if mock.GetFunc == nil { + panic("ProjectRoleTemplateBindingInterfaceMock.GetFunc: method is nil but ProjectRoleTemplateBindingInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockProjectRoleTemplateBindingInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockProjectRoleTemplateBindingInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedProjectRoleTemplateBindingInterface.GetCalls()) +func (mock *ProjectRoleTemplateBindingInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockProjectRoleTemplateBindingInterfaceMockGet.RLock() + calls = mock.calls.Get + lockProjectRoleTemplateBindingInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *ProjectRoleTemplateBindingInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.ProjectRoleTemplateBinding, error) { + if mock.GetNamespacedFunc == nil { + panic("ProjectRoleTemplateBindingInterfaceMock.GetNamespacedFunc: method is nil but ProjectRoleTemplateBindingInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockProjectRoleTemplateBindingInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockProjectRoleTemplateBindingInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedProjectRoleTemplateBindingInterface.GetNamespacedCalls()) +func (mock *ProjectRoleTemplateBindingInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockProjectRoleTemplateBindingInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockProjectRoleTemplateBindingInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ProjectRoleTemplateBindingInterfaceMock) List(opts v1.ListOptions) (*v3.ProjectRoleTemplateBindingList, error) { + if mock.ListFunc == nil { + panic("ProjectRoleTemplateBindingInterfaceMock.ListFunc: method is nil but ProjectRoleTemplateBindingInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockProjectRoleTemplateBindingInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockProjectRoleTemplateBindingInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedProjectRoleTemplateBindingInterface.ListCalls()) +func (mock *ProjectRoleTemplateBindingInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockProjectRoleTemplateBindingInterfaceMockList.RLock() + calls = mock.calls.List + lockProjectRoleTemplateBindingInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *ProjectRoleTemplateBindingInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("ProjectRoleTemplateBindingInterfaceMock.ObjectClientFunc: method is nil but ProjectRoleTemplateBindingInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockProjectRoleTemplateBindingInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockProjectRoleTemplateBindingInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedProjectRoleTemplateBindingInterface.ObjectClientCalls()) +func (mock *ProjectRoleTemplateBindingInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockProjectRoleTemplateBindingInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockProjectRoleTemplateBindingInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *ProjectRoleTemplateBindingInterfaceMock) Update(in1 *v3.ProjectRoleTemplateBinding) (*v3.ProjectRoleTemplateBinding, error) { + if mock.UpdateFunc == nil { + panic("ProjectRoleTemplateBindingInterfaceMock.UpdateFunc: method is nil but ProjectRoleTemplateBindingInterface.Update was just called") + } + callInfo := struct { + In1 *v3.ProjectRoleTemplateBinding + }{ + In1: in1, + } + lockProjectRoleTemplateBindingInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockProjectRoleTemplateBindingInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedProjectRoleTemplateBindingInterface.UpdateCalls()) +func (mock *ProjectRoleTemplateBindingInterfaceMock) UpdateCalls() []struct { + In1 *v3.ProjectRoleTemplateBinding +} { + var calls []struct { + In1 *v3.ProjectRoleTemplateBinding + } + lockProjectRoleTemplateBindingInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockProjectRoleTemplateBindingInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *ProjectRoleTemplateBindingInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("ProjectRoleTemplateBindingInterfaceMock.WatchFunc: method is nil but ProjectRoleTemplateBindingInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockProjectRoleTemplateBindingInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockProjectRoleTemplateBindingInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedProjectRoleTemplateBindingInterface.WatchCalls()) +func (mock *ProjectRoleTemplateBindingInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockProjectRoleTemplateBindingInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockProjectRoleTemplateBindingInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockProjectRoleTemplateBindingsGetterMockProjectRoleTemplateBindings sync.RWMutex +) + +// Ensure, that ProjectRoleTemplateBindingsGetterMock does implement ProjectRoleTemplateBindingsGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.ProjectRoleTemplateBindingsGetter = &ProjectRoleTemplateBindingsGetterMock{} + +// ProjectRoleTemplateBindingsGetterMock is a mock implementation of ProjectRoleTemplateBindingsGetter. +// +// func TestSomethingThatUsesProjectRoleTemplateBindingsGetter(t *testing.T) { +// +// // make and configure a mocked ProjectRoleTemplateBindingsGetter +// mockedProjectRoleTemplateBindingsGetter := &ProjectRoleTemplateBindingsGetterMock{ +// ProjectRoleTemplateBindingsFunc: func(namespace string) v3.ProjectRoleTemplateBindingInterface { +// panic("mock out the ProjectRoleTemplateBindings method") +// }, +// } +// +// // use mockedProjectRoleTemplateBindingsGetter in code that requires ProjectRoleTemplateBindingsGetter +// // and then make assertions. +// +// } +type ProjectRoleTemplateBindingsGetterMock struct { + // ProjectRoleTemplateBindingsFunc mocks the ProjectRoleTemplateBindings method. + ProjectRoleTemplateBindingsFunc func(namespace string) v3.ProjectRoleTemplateBindingInterface + + // calls tracks calls to the methods. + calls struct { + // ProjectRoleTemplateBindings holds details about calls to the ProjectRoleTemplateBindings method. + ProjectRoleTemplateBindings []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// ProjectRoleTemplateBindings calls ProjectRoleTemplateBindingsFunc. +func (mock *ProjectRoleTemplateBindingsGetterMock) ProjectRoleTemplateBindings(namespace string) v3.ProjectRoleTemplateBindingInterface { + if mock.ProjectRoleTemplateBindingsFunc == nil { + panic("ProjectRoleTemplateBindingsGetterMock.ProjectRoleTemplateBindingsFunc: method is nil but ProjectRoleTemplateBindingsGetter.ProjectRoleTemplateBindings was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockProjectRoleTemplateBindingsGetterMockProjectRoleTemplateBindings.Lock() + mock.calls.ProjectRoleTemplateBindings = append(mock.calls.ProjectRoleTemplateBindings, callInfo) + lockProjectRoleTemplateBindingsGetterMockProjectRoleTemplateBindings.Unlock() + return mock.ProjectRoleTemplateBindingsFunc(namespace) +} + +// ProjectRoleTemplateBindingsCalls gets all the calls that were made to ProjectRoleTemplateBindings. +// Check the length with: +// len(mockedProjectRoleTemplateBindingsGetter.ProjectRoleTemplateBindingsCalls()) +func (mock *ProjectRoleTemplateBindingsGetterMock) ProjectRoleTemplateBindingsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockProjectRoleTemplateBindingsGetterMockProjectRoleTemplateBindings.RLock() + calls = mock.calls.ProjectRoleTemplateBindings + lockProjectRoleTemplateBindingsGetterMockProjectRoleTemplateBindings.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_role_template_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_role_template_mock_test.go new file mode 100644 index 00000000..93f8798e --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_role_template_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockRoleTemplateListerMockGet sync.RWMutex + lockRoleTemplateListerMockList sync.RWMutex +) + +// Ensure, that RoleTemplateListerMock does implement RoleTemplateLister. +// If this is not the case, regenerate this file with moq. +var _ v3.RoleTemplateLister = &RoleTemplateListerMock{} + +// RoleTemplateListerMock is a mock implementation of RoleTemplateLister. +// +// func TestSomethingThatUsesRoleTemplateLister(t *testing.T) { +// +// // make and configure a mocked RoleTemplateLister +// mockedRoleTemplateLister := &RoleTemplateListerMock{ +// GetFunc: func(namespace string, name string) (*v3.RoleTemplate, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.RoleTemplate, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedRoleTemplateLister in code that requires RoleTemplateLister +// // and then make assertions. +// +// } +type RoleTemplateListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.RoleTemplate, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.RoleTemplate, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *RoleTemplateListerMock) Get(namespace string, name string) (*v3.RoleTemplate, error) { + if mock.GetFunc == nil { + panic("RoleTemplateListerMock.GetFunc: method is nil but RoleTemplateLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockRoleTemplateListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockRoleTemplateListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedRoleTemplateLister.GetCalls()) +func (mock *RoleTemplateListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockRoleTemplateListerMockGet.RLock() + calls = mock.calls.Get + lockRoleTemplateListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *RoleTemplateListerMock) List(namespace string, selector labels.Selector) ([]*v3.RoleTemplate, error) { + if mock.ListFunc == nil { + panic("RoleTemplateListerMock.ListFunc: method is nil but RoleTemplateLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockRoleTemplateListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockRoleTemplateListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedRoleTemplateLister.ListCalls()) +func (mock *RoleTemplateListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockRoleTemplateListerMockList.RLock() + calls = mock.calls.List + lockRoleTemplateListerMockList.RUnlock() + return calls +} + +var ( + lockRoleTemplateControllerMockAddClusterScopedHandler sync.RWMutex + lockRoleTemplateControllerMockAddHandler sync.RWMutex + lockRoleTemplateControllerMockEnqueue sync.RWMutex + lockRoleTemplateControllerMockGeneric sync.RWMutex + lockRoleTemplateControllerMockInformer sync.RWMutex + lockRoleTemplateControllerMockLister sync.RWMutex + lockRoleTemplateControllerMockStart sync.RWMutex + lockRoleTemplateControllerMockSync sync.RWMutex +) + +// Ensure, that RoleTemplateControllerMock does implement RoleTemplateController. +// If this is not the case, regenerate this file with moq. +var _ v3.RoleTemplateController = &RoleTemplateControllerMock{} + +// RoleTemplateControllerMock is a mock implementation of RoleTemplateController. +// +// func TestSomethingThatUsesRoleTemplateController(t *testing.T) { +// +// // make and configure a mocked RoleTemplateController +// mockedRoleTemplateController := &RoleTemplateControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.RoleTemplateHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.RoleTemplateHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.RoleTemplateLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedRoleTemplateController in code that requires RoleTemplateController +// // and then make assertions. +// +// } +type RoleTemplateControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.RoleTemplateHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.RoleTemplateHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.RoleTemplateLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.RoleTemplateHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.RoleTemplateHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *RoleTemplateControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.RoleTemplateHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("RoleTemplateControllerMock.AddClusterScopedHandlerFunc: method is nil but RoleTemplateController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.RoleTemplateHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockRoleTemplateControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockRoleTemplateControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedRoleTemplateController.AddClusterScopedHandlerCalls()) +func (mock *RoleTemplateControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.RoleTemplateHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.RoleTemplateHandlerFunc + } + lockRoleTemplateControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockRoleTemplateControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *RoleTemplateControllerMock) AddHandler(ctx context.Context, name string, handler v3.RoleTemplateHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("RoleTemplateControllerMock.AddHandlerFunc: method is nil but RoleTemplateController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.RoleTemplateHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockRoleTemplateControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockRoleTemplateControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedRoleTemplateController.AddHandlerCalls()) +func (mock *RoleTemplateControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.RoleTemplateHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.RoleTemplateHandlerFunc + } + lockRoleTemplateControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockRoleTemplateControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *RoleTemplateControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("RoleTemplateControllerMock.EnqueueFunc: method is nil but RoleTemplateController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockRoleTemplateControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockRoleTemplateControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedRoleTemplateController.EnqueueCalls()) +func (mock *RoleTemplateControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockRoleTemplateControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockRoleTemplateControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *RoleTemplateControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("RoleTemplateControllerMock.GenericFunc: method is nil but RoleTemplateController.Generic was just called") + } + callInfo := struct { + }{} + lockRoleTemplateControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockRoleTemplateControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedRoleTemplateController.GenericCalls()) +func (mock *RoleTemplateControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockRoleTemplateControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockRoleTemplateControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *RoleTemplateControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("RoleTemplateControllerMock.InformerFunc: method is nil but RoleTemplateController.Informer was just called") + } + callInfo := struct { + }{} + lockRoleTemplateControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockRoleTemplateControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedRoleTemplateController.InformerCalls()) +func (mock *RoleTemplateControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockRoleTemplateControllerMockInformer.RLock() + calls = mock.calls.Informer + lockRoleTemplateControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *RoleTemplateControllerMock) Lister() v3.RoleTemplateLister { + if mock.ListerFunc == nil { + panic("RoleTemplateControllerMock.ListerFunc: method is nil but RoleTemplateController.Lister was just called") + } + callInfo := struct { + }{} + lockRoleTemplateControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockRoleTemplateControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedRoleTemplateController.ListerCalls()) +func (mock *RoleTemplateControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockRoleTemplateControllerMockLister.RLock() + calls = mock.calls.Lister + lockRoleTemplateControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *RoleTemplateControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("RoleTemplateControllerMock.StartFunc: method is nil but RoleTemplateController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockRoleTemplateControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockRoleTemplateControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedRoleTemplateController.StartCalls()) +func (mock *RoleTemplateControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockRoleTemplateControllerMockStart.RLock() + calls = mock.calls.Start + lockRoleTemplateControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *RoleTemplateControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("RoleTemplateControllerMock.SyncFunc: method is nil but RoleTemplateController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockRoleTemplateControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockRoleTemplateControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedRoleTemplateController.SyncCalls()) +func (mock *RoleTemplateControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockRoleTemplateControllerMockSync.RLock() + calls = mock.calls.Sync + lockRoleTemplateControllerMockSync.RUnlock() + return calls +} + +var ( + lockRoleTemplateInterfaceMockAddClusterScopedHandler sync.RWMutex + lockRoleTemplateInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockRoleTemplateInterfaceMockAddHandler sync.RWMutex + lockRoleTemplateInterfaceMockAddLifecycle sync.RWMutex + lockRoleTemplateInterfaceMockController sync.RWMutex + lockRoleTemplateInterfaceMockCreate sync.RWMutex + lockRoleTemplateInterfaceMockDelete sync.RWMutex + lockRoleTemplateInterfaceMockDeleteCollection sync.RWMutex + lockRoleTemplateInterfaceMockDeleteNamespaced sync.RWMutex + lockRoleTemplateInterfaceMockGet sync.RWMutex + lockRoleTemplateInterfaceMockGetNamespaced sync.RWMutex + lockRoleTemplateInterfaceMockList sync.RWMutex + lockRoleTemplateInterfaceMockObjectClient sync.RWMutex + lockRoleTemplateInterfaceMockUpdate sync.RWMutex + lockRoleTemplateInterfaceMockWatch sync.RWMutex +) + +// Ensure, that RoleTemplateInterfaceMock does implement RoleTemplateInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.RoleTemplateInterface = &RoleTemplateInterfaceMock{} + +// RoleTemplateInterfaceMock is a mock implementation of RoleTemplateInterface. +// +// func TestSomethingThatUsesRoleTemplateInterface(t *testing.T) { +// +// // make and configure a mocked RoleTemplateInterface +// mockedRoleTemplateInterface := &RoleTemplateInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.RoleTemplateHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.RoleTemplateLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.RoleTemplateHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.RoleTemplateLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.RoleTemplateController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.RoleTemplate) (*v3.RoleTemplate, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.RoleTemplate, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.RoleTemplate, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.RoleTemplateList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.RoleTemplate) (*v3.RoleTemplate, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedRoleTemplateInterface in code that requires RoleTemplateInterface +// // and then make assertions. +// +// } +type RoleTemplateInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.RoleTemplateHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.RoleTemplateLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.RoleTemplateHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.RoleTemplateLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.RoleTemplateController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.RoleTemplate) (*v3.RoleTemplate, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.RoleTemplate, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.RoleTemplate, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.RoleTemplateList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.RoleTemplate) (*v3.RoleTemplate, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.RoleTemplateHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.RoleTemplateLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.RoleTemplateHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.RoleTemplateLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.RoleTemplate + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.RoleTemplate + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *RoleTemplateInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.RoleTemplateHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("RoleTemplateInterfaceMock.AddClusterScopedHandlerFunc: method is nil but RoleTemplateInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.RoleTemplateHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockRoleTemplateInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockRoleTemplateInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedRoleTemplateInterface.AddClusterScopedHandlerCalls()) +func (mock *RoleTemplateInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.RoleTemplateHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.RoleTemplateHandlerFunc + } + lockRoleTemplateInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockRoleTemplateInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *RoleTemplateInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.RoleTemplateLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("RoleTemplateInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but RoleTemplateInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.RoleTemplateLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockRoleTemplateInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockRoleTemplateInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedRoleTemplateInterface.AddClusterScopedLifecycleCalls()) +func (mock *RoleTemplateInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.RoleTemplateLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.RoleTemplateLifecycle + } + lockRoleTemplateInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockRoleTemplateInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *RoleTemplateInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.RoleTemplateHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("RoleTemplateInterfaceMock.AddHandlerFunc: method is nil but RoleTemplateInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.RoleTemplateHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockRoleTemplateInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockRoleTemplateInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedRoleTemplateInterface.AddHandlerCalls()) +func (mock *RoleTemplateInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.RoleTemplateHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.RoleTemplateHandlerFunc + } + lockRoleTemplateInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockRoleTemplateInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *RoleTemplateInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.RoleTemplateLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("RoleTemplateInterfaceMock.AddLifecycleFunc: method is nil but RoleTemplateInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.RoleTemplateLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockRoleTemplateInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockRoleTemplateInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedRoleTemplateInterface.AddLifecycleCalls()) +func (mock *RoleTemplateInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.RoleTemplateLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.RoleTemplateLifecycle + } + lockRoleTemplateInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockRoleTemplateInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *RoleTemplateInterfaceMock) Controller() v3.RoleTemplateController { + if mock.ControllerFunc == nil { + panic("RoleTemplateInterfaceMock.ControllerFunc: method is nil but RoleTemplateInterface.Controller was just called") + } + callInfo := struct { + }{} + lockRoleTemplateInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockRoleTemplateInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedRoleTemplateInterface.ControllerCalls()) +func (mock *RoleTemplateInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockRoleTemplateInterfaceMockController.RLock() + calls = mock.calls.Controller + lockRoleTemplateInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *RoleTemplateInterfaceMock) Create(in1 *v3.RoleTemplate) (*v3.RoleTemplate, error) { + if mock.CreateFunc == nil { + panic("RoleTemplateInterfaceMock.CreateFunc: method is nil but RoleTemplateInterface.Create was just called") + } + callInfo := struct { + In1 *v3.RoleTemplate + }{ + In1: in1, + } + lockRoleTemplateInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockRoleTemplateInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedRoleTemplateInterface.CreateCalls()) +func (mock *RoleTemplateInterfaceMock) CreateCalls() []struct { + In1 *v3.RoleTemplate +} { + var calls []struct { + In1 *v3.RoleTemplate + } + lockRoleTemplateInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockRoleTemplateInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *RoleTemplateInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("RoleTemplateInterfaceMock.DeleteFunc: method is nil but RoleTemplateInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockRoleTemplateInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockRoleTemplateInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedRoleTemplateInterface.DeleteCalls()) +func (mock *RoleTemplateInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockRoleTemplateInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockRoleTemplateInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *RoleTemplateInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("RoleTemplateInterfaceMock.DeleteCollectionFunc: method is nil but RoleTemplateInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockRoleTemplateInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockRoleTemplateInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedRoleTemplateInterface.DeleteCollectionCalls()) +func (mock *RoleTemplateInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockRoleTemplateInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockRoleTemplateInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *RoleTemplateInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("RoleTemplateInterfaceMock.DeleteNamespacedFunc: method is nil but RoleTemplateInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockRoleTemplateInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockRoleTemplateInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedRoleTemplateInterface.DeleteNamespacedCalls()) +func (mock *RoleTemplateInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockRoleTemplateInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockRoleTemplateInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *RoleTemplateInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.RoleTemplate, error) { + if mock.GetFunc == nil { + panic("RoleTemplateInterfaceMock.GetFunc: method is nil but RoleTemplateInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockRoleTemplateInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockRoleTemplateInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedRoleTemplateInterface.GetCalls()) +func (mock *RoleTemplateInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockRoleTemplateInterfaceMockGet.RLock() + calls = mock.calls.Get + lockRoleTemplateInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *RoleTemplateInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.RoleTemplate, error) { + if mock.GetNamespacedFunc == nil { + panic("RoleTemplateInterfaceMock.GetNamespacedFunc: method is nil but RoleTemplateInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockRoleTemplateInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockRoleTemplateInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedRoleTemplateInterface.GetNamespacedCalls()) +func (mock *RoleTemplateInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockRoleTemplateInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockRoleTemplateInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *RoleTemplateInterfaceMock) List(opts v1.ListOptions) (*v3.RoleTemplateList, error) { + if mock.ListFunc == nil { + panic("RoleTemplateInterfaceMock.ListFunc: method is nil but RoleTemplateInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockRoleTemplateInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockRoleTemplateInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedRoleTemplateInterface.ListCalls()) +func (mock *RoleTemplateInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockRoleTemplateInterfaceMockList.RLock() + calls = mock.calls.List + lockRoleTemplateInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *RoleTemplateInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("RoleTemplateInterfaceMock.ObjectClientFunc: method is nil but RoleTemplateInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockRoleTemplateInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockRoleTemplateInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedRoleTemplateInterface.ObjectClientCalls()) +func (mock *RoleTemplateInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockRoleTemplateInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockRoleTemplateInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *RoleTemplateInterfaceMock) Update(in1 *v3.RoleTemplate) (*v3.RoleTemplate, error) { + if mock.UpdateFunc == nil { + panic("RoleTemplateInterfaceMock.UpdateFunc: method is nil but RoleTemplateInterface.Update was just called") + } + callInfo := struct { + In1 *v3.RoleTemplate + }{ + In1: in1, + } + lockRoleTemplateInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockRoleTemplateInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedRoleTemplateInterface.UpdateCalls()) +func (mock *RoleTemplateInterfaceMock) UpdateCalls() []struct { + In1 *v3.RoleTemplate +} { + var calls []struct { + In1 *v3.RoleTemplate + } + lockRoleTemplateInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockRoleTemplateInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *RoleTemplateInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("RoleTemplateInterfaceMock.WatchFunc: method is nil but RoleTemplateInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockRoleTemplateInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockRoleTemplateInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedRoleTemplateInterface.WatchCalls()) +func (mock *RoleTemplateInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockRoleTemplateInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockRoleTemplateInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockRoleTemplatesGetterMockRoleTemplates sync.RWMutex +) + +// Ensure, that RoleTemplatesGetterMock does implement RoleTemplatesGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.RoleTemplatesGetter = &RoleTemplatesGetterMock{} + +// RoleTemplatesGetterMock is a mock implementation of RoleTemplatesGetter. +// +// func TestSomethingThatUsesRoleTemplatesGetter(t *testing.T) { +// +// // make and configure a mocked RoleTemplatesGetter +// mockedRoleTemplatesGetter := &RoleTemplatesGetterMock{ +// RoleTemplatesFunc: func(namespace string) v3.RoleTemplateInterface { +// panic("mock out the RoleTemplates method") +// }, +// } +// +// // use mockedRoleTemplatesGetter in code that requires RoleTemplatesGetter +// // and then make assertions. +// +// } +type RoleTemplatesGetterMock struct { + // RoleTemplatesFunc mocks the RoleTemplates method. + RoleTemplatesFunc func(namespace string) v3.RoleTemplateInterface + + // calls tracks calls to the methods. + calls struct { + // RoleTemplates holds details about calls to the RoleTemplates method. + RoleTemplates []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// RoleTemplates calls RoleTemplatesFunc. +func (mock *RoleTemplatesGetterMock) RoleTemplates(namespace string) v3.RoleTemplateInterface { + if mock.RoleTemplatesFunc == nil { + panic("RoleTemplatesGetterMock.RoleTemplatesFunc: method is nil but RoleTemplatesGetter.RoleTemplates was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockRoleTemplatesGetterMockRoleTemplates.Lock() + mock.calls.RoleTemplates = append(mock.calls.RoleTemplates, callInfo) + lockRoleTemplatesGetterMockRoleTemplates.Unlock() + return mock.RoleTemplatesFunc(namespace) +} + +// RoleTemplatesCalls gets all the calls that were made to RoleTemplates. +// Check the length with: +// len(mockedRoleTemplatesGetter.RoleTemplatesCalls()) +func (mock *RoleTemplatesGetterMock) RoleTemplatesCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockRoleTemplatesGetterMockRoleTemplates.RLock() + calls = mock.calls.RoleTemplates + lockRoleTemplatesGetterMockRoleTemplates.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_setting_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_setting_mock_test.go new file mode 100644 index 00000000..fcde20c0 --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_setting_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockSettingListerMockGet sync.RWMutex + lockSettingListerMockList sync.RWMutex +) + +// Ensure, that SettingListerMock does implement SettingLister. +// If this is not the case, regenerate this file with moq. +var _ v3.SettingLister = &SettingListerMock{} + +// SettingListerMock is a mock implementation of SettingLister. +// +// func TestSomethingThatUsesSettingLister(t *testing.T) { +// +// // make and configure a mocked SettingLister +// mockedSettingLister := &SettingListerMock{ +// GetFunc: func(namespace string, name string) (*v3.Setting, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.Setting, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedSettingLister in code that requires SettingLister +// // and then make assertions. +// +// } +type SettingListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.Setting, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.Setting, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *SettingListerMock) Get(namespace string, name string) (*v3.Setting, error) { + if mock.GetFunc == nil { + panic("SettingListerMock.GetFunc: method is nil but SettingLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockSettingListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockSettingListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedSettingLister.GetCalls()) +func (mock *SettingListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockSettingListerMockGet.RLock() + calls = mock.calls.Get + lockSettingListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *SettingListerMock) List(namespace string, selector labels.Selector) ([]*v3.Setting, error) { + if mock.ListFunc == nil { + panic("SettingListerMock.ListFunc: method is nil but SettingLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockSettingListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockSettingListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedSettingLister.ListCalls()) +func (mock *SettingListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockSettingListerMockList.RLock() + calls = mock.calls.List + lockSettingListerMockList.RUnlock() + return calls +} + +var ( + lockSettingControllerMockAddClusterScopedHandler sync.RWMutex + lockSettingControllerMockAddHandler sync.RWMutex + lockSettingControllerMockEnqueue sync.RWMutex + lockSettingControllerMockGeneric sync.RWMutex + lockSettingControllerMockInformer sync.RWMutex + lockSettingControllerMockLister sync.RWMutex + lockSettingControllerMockStart sync.RWMutex + lockSettingControllerMockSync sync.RWMutex +) + +// Ensure, that SettingControllerMock does implement SettingController. +// If this is not the case, regenerate this file with moq. +var _ v3.SettingController = &SettingControllerMock{} + +// SettingControllerMock is a mock implementation of SettingController. +// +// func TestSomethingThatUsesSettingController(t *testing.T) { +// +// // make and configure a mocked SettingController +// mockedSettingController := &SettingControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.SettingHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.SettingHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.SettingLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedSettingController in code that requires SettingController +// // and then make assertions. +// +// } +type SettingControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.SettingHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.SettingHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.SettingLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.SettingHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.SettingHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *SettingControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.SettingHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("SettingControllerMock.AddClusterScopedHandlerFunc: method is nil but SettingController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.SettingHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockSettingControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockSettingControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedSettingController.AddClusterScopedHandlerCalls()) +func (mock *SettingControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.SettingHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.SettingHandlerFunc + } + lockSettingControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockSettingControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *SettingControllerMock) AddHandler(ctx context.Context, name string, handler v3.SettingHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("SettingControllerMock.AddHandlerFunc: method is nil but SettingController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.SettingHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockSettingControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockSettingControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedSettingController.AddHandlerCalls()) +func (mock *SettingControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.SettingHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.SettingHandlerFunc + } + lockSettingControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockSettingControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *SettingControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("SettingControllerMock.EnqueueFunc: method is nil but SettingController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockSettingControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockSettingControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedSettingController.EnqueueCalls()) +func (mock *SettingControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockSettingControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockSettingControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *SettingControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("SettingControllerMock.GenericFunc: method is nil but SettingController.Generic was just called") + } + callInfo := struct { + }{} + lockSettingControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockSettingControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedSettingController.GenericCalls()) +func (mock *SettingControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockSettingControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockSettingControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *SettingControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("SettingControllerMock.InformerFunc: method is nil but SettingController.Informer was just called") + } + callInfo := struct { + }{} + lockSettingControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockSettingControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedSettingController.InformerCalls()) +func (mock *SettingControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockSettingControllerMockInformer.RLock() + calls = mock.calls.Informer + lockSettingControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *SettingControllerMock) Lister() v3.SettingLister { + if mock.ListerFunc == nil { + panic("SettingControllerMock.ListerFunc: method is nil but SettingController.Lister was just called") + } + callInfo := struct { + }{} + lockSettingControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockSettingControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedSettingController.ListerCalls()) +func (mock *SettingControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockSettingControllerMockLister.RLock() + calls = mock.calls.Lister + lockSettingControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *SettingControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("SettingControllerMock.StartFunc: method is nil but SettingController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockSettingControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockSettingControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedSettingController.StartCalls()) +func (mock *SettingControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockSettingControllerMockStart.RLock() + calls = mock.calls.Start + lockSettingControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *SettingControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("SettingControllerMock.SyncFunc: method is nil but SettingController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockSettingControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockSettingControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedSettingController.SyncCalls()) +func (mock *SettingControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockSettingControllerMockSync.RLock() + calls = mock.calls.Sync + lockSettingControllerMockSync.RUnlock() + return calls +} + +var ( + lockSettingInterfaceMockAddClusterScopedHandler sync.RWMutex + lockSettingInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockSettingInterfaceMockAddHandler sync.RWMutex + lockSettingInterfaceMockAddLifecycle sync.RWMutex + lockSettingInterfaceMockController sync.RWMutex + lockSettingInterfaceMockCreate sync.RWMutex + lockSettingInterfaceMockDelete sync.RWMutex + lockSettingInterfaceMockDeleteCollection sync.RWMutex + lockSettingInterfaceMockDeleteNamespaced sync.RWMutex + lockSettingInterfaceMockGet sync.RWMutex + lockSettingInterfaceMockGetNamespaced sync.RWMutex + lockSettingInterfaceMockList sync.RWMutex + lockSettingInterfaceMockObjectClient sync.RWMutex + lockSettingInterfaceMockUpdate sync.RWMutex + lockSettingInterfaceMockWatch sync.RWMutex +) + +// Ensure, that SettingInterfaceMock does implement SettingInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.SettingInterface = &SettingInterfaceMock{} + +// SettingInterfaceMock is a mock implementation of SettingInterface. +// +// func TestSomethingThatUsesSettingInterface(t *testing.T) { +// +// // make and configure a mocked SettingInterface +// mockedSettingInterface := &SettingInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.SettingHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.SettingLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.SettingHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.SettingLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.SettingController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.Setting) (*v3.Setting, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.Setting, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.Setting, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.SettingList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.Setting) (*v3.Setting, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedSettingInterface in code that requires SettingInterface +// // and then make assertions. +// +// } +type SettingInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.SettingHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.SettingLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.SettingHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.SettingLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.SettingController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.Setting) (*v3.Setting, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.Setting, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.Setting, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.SettingList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.Setting) (*v3.Setting, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.SettingHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.SettingLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.SettingHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.SettingLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.Setting + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.Setting + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *SettingInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.SettingHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("SettingInterfaceMock.AddClusterScopedHandlerFunc: method is nil but SettingInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.SettingHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockSettingInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockSettingInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedSettingInterface.AddClusterScopedHandlerCalls()) +func (mock *SettingInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.SettingHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.SettingHandlerFunc + } + lockSettingInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockSettingInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *SettingInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.SettingLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("SettingInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but SettingInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.SettingLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockSettingInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockSettingInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedSettingInterface.AddClusterScopedLifecycleCalls()) +func (mock *SettingInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.SettingLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.SettingLifecycle + } + lockSettingInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockSettingInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *SettingInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.SettingHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("SettingInterfaceMock.AddHandlerFunc: method is nil but SettingInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.SettingHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockSettingInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockSettingInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedSettingInterface.AddHandlerCalls()) +func (mock *SettingInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.SettingHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.SettingHandlerFunc + } + lockSettingInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockSettingInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *SettingInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.SettingLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("SettingInterfaceMock.AddLifecycleFunc: method is nil but SettingInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.SettingLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockSettingInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockSettingInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedSettingInterface.AddLifecycleCalls()) +func (mock *SettingInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.SettingLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.SettingLifecycle + } + lockSettingInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockSettingInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *SettingInterfaceMock) Controller() v3.SettingController { + if mock.ControllerFunc == nil { + panic("SettingInterfaceMock.ControllerFunc: method is nil but SettingInterface.Controller was just called") + } + callInfo := struct { + }{} + lockSettingInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockSettingInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedSettingInterface.ControllerCalls()) +func (mock *SettingInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockSettingInterfaceMockController.RLock() + calls = mock.calls.Controller + lockSettingInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *SettingInterfaceMock) Create(in1 *v3.Setting) (*v3.Setting, error) { + if mock.CreateFunc == nil { + panic("SettingInterfaceMock.CreateFunc: method is nil but SettingInterface.Create was just called") + } + callInfo := struct { + In1 *v3.Setting + }{ + In1: in1, + } + lockSettingInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockSettingInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedSettingInterface.CreateCalls()) +func (mock *SettingInterfaceMock) CreateCalls() []struct { + In1 *v3.Setting +} { + var calls []struct { + In1 *v3.Setting + } + lockSettingInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockSettingInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *SettingInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("SettingInterfaceMock.DeleteFunc: method is nil but SettingInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockSettingInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockSettingInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedSettingInterface.DeleteCalls()) +func (mock *SettingInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockSettingInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockSettingInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *SettingInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("SettingInterfaceMock.DeleteCollectionFunc: method is nil but SettingInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockSettingInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockSettingInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedSettingInterface.DeleteCollectionCalls()) +func (mock *SettingInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockSettingInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockSettingInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *SettingInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("SettingInterfaceMock.DeleteNamespacedFunc: method is nil but SettingInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockSettingInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockSettingInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedSettingInterface.DeleteNamespacedCalls()) +func (mock *SettingInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockSettingInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockSettingInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *SettingInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.Setting, error) { + if mock.GetFunc == nil { + panic("SettingInterfaceMock.GetFunc: method is nil but SettingInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockSettingInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockSettingInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedSettingInterface.GetCalls()) +func (mock *SettingInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockSettingInterfaceMockGet.RLock() + calls = mock.calls.Get + lockSettingInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *SettingInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.Setting, error) { + if mock.GetNamespacedFunc == nil { + panic("SettingInterfaceMock.GetNamespacedFunc: method is nil but SettingInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockSettingInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockSettingInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedSettingInterface.GetNamespacedCalls()) +func (mock *SettingInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockSettingInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockSettingInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *SettingInterfaceMock) List(opts v1.ListOptions) (*v3.SettingList, error) { + if mock.ListFunc == nil { + panic("SettingInterfaceMock.ListFunc: method is nil but SettingInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockSettingInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockSettingInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedSettingInterface.ListCalls()) +func (mock *SettingInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockSettingInterfaceMockList.RLock() + calls = mock.calls.List + lockSettingInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *SettingInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("SettingInterfaceMock.ObjectClientFunc: method is nil but SettingInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockSettingInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockSettingInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedSettingInterface.ObjectClientCalls()) +func (mock *SettingInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockSettingInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockSettingInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *SettingInterfaceMock) Update(in1 *v3.Setting) (*v3.Setting, error) { + if mock.UpdateFunc == nil { + panic("SettingInterfaceMock.UpdateFunc: method is nil but SettingInterface.Update was just called") + } + callInfo := struct { + In1 *v3.Setting + }{ + In1: in1, + } + lockSettingInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockSettingInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedSettingInterface.UpdateCalls()) +func (mock *SettingInterfaceMock) UpdateCalls() []struct { + In1 *v3.Setting +} { + var calls []struct { + In1 *v3.Setting + } + lockSettingInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockSettingInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *SettingInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("SettingInterfaceMock.WatchFunc: method is nil but SettingInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockSettingInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockSettingInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedSettingInterface.WatchCalls()) +func (mock *SettingInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockSettingInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockSettingInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockSettingsGetterMockSettings sync.RWMutex +) + +// Ensure, that SettingsGetterMock does implement SettingsGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.SettingsGetter = &SettingsGetterMock{} + +// SettingsGetterMock is a mock implementation of SettingsGetter. +// +// func TestSomethingThatUsesSettingsGetter(t *testing.T) { +// +// // make and configure a mocked SettingsGetter +// mockedSettingsGetter := &SettingsGetterMock{ +// SettingsFunc: func(namespace string) v3.SettingInterface { +// panic("mock out the Settings method") +// }, +// } +// +// // use mockedSettingsGetter in code that requires SettingsGetter +// // and then make assertions. +// +// } +type SettingsGetterMock struct { + // SettingsFunc mocks the Settings method. + SettingsFunc func(namespace string) v3.SettingInterface + + // calls tracks calls to the methods. + calls struct { + // Settings holds details about calls to the Settings method. + Settings []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// Settings calls SettingsFunc. +func (mock *SettingsGetterMock) Settings(namespace string) v3.SettingInterface { + if mock.SettingsFunc == nil { + panic("SettingsGetterMock.SettingsFunc: method is nil but SettingsGetter.Settings was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockSettingsGetterMockSettings.Lock() + mock.calls.Settings = append(mock.calls.Settings, callInfo) + lockSettingsGetterMockSettings.Unlock() + return mock.SettingsFunc(namespace) +} + +// SettingsCalls gets all the calls that were made to Settings. +// Check the length with: +// len(mockedSettingsGetter.SettingsCalls()) +func (mock *SettingsGetterMock) SettingsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockSettingsGetterMockSettings.RLock() + calls = mock.calls.Settings + lockSettingsGetterMockSettings.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_template_content_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_template_content_mock_test.go new file mode 100644 index 00000000..9d6002b7 --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_template_content_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockTemplateContentListerMockGet sync.RWMutex + lockTemplateContentListerMockList sync.RWMutex +) + +// Ensure, that TemplateContentListerMock does implement TemplateContentLister. +// If this is not the case, regenerate this file with moq. +var _ v3.TemplateContentLister = &TemplateContentListerMock{} + +// TemplateContentListerMock is a mock implementation of TemplateContentLister. +// +// func TestSomethingThatUsesTemplateContentLister(t *testing.T) { +// +// // make and configure a mocked TemplateContentLister +// mockedTemplateContentLister := &TemplateContentListerMock{ +// GetFunc: func(namespace string, name string) (*v3.TemplateContent, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.TemplateContent, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedTemplateContentLister in code that requires TemplateContentLister +// // and then make assertions. +// +// } +type TemplateContentListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.TemplateContent, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.TemplateContent, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *TemplateContentListerMock) Get(namespace string, name string) (*v3.TemplateContent, error) { + if mock.GetFunc == nil { + panic("TemplateContentListerMock.GetFunc: method is nil but TemplateContentLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockTemplateContentListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockTemplateContentListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedTemplateContentLister.GetCalls()) +func (mock *TemplateContentListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockTemplateContentListerMockGet.RLock() + calls = mock.calls.Get + lockTemplateContentListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *TemplateContentListerMock) List(namespace string, selector labels.Selector) ([]*v3.TemplateContent, error) { + if mock.ListFunc == nil { + panic("TemplateContentListerMock.ListFunc: method is nil but TemplateContentLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockTemplateContentListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockTemplateContentListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedTemplateContentLister.ListCalls()) +func (mock *TemplateContentListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockTemplateContentListerMockList.RLock() + calls = mock.calls.List + lockTemplateContentListerMockList.RUnlock() + return calls +} + +var ( + lockTemplateContentControllerMockAddClusterScopedHandler sync.RWMutex + lockTemplateContentControllerMockAddHandler sync.RWMutex + lockTemplateContentControllerMockEnqueue sync.RWMutex + lockTemplateContentControllerMockGeneric sync.RWMutex + lockTemplateContentControllerMockInformer sync.RWMutex + lockTemplateContentControllerMockLister sync.RWMutex + lockTemplateContentControllerMockStart sync.RWMutex + lockTemplateContentControllerMockSync sync.RWMutex +) + +// Ensure, that TemplateContentControllerMock does implement TemplateContentController. +// If this is not the case, regenerate this file with moq. +var _ v3.TemplateContentController = &TemplateContentControllerMock{} + +// TemplateContentControllerMock is a mock implementation of TemplateContentController. +// +// func TestSomethingThatUsesTemplateContentController(t *testing.T) { +// +// // make and configure a mocked TemplateContentController +// mockedTemplateContentController := &TemplateContentControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.TemplateContentHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.TemplateContentHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.TemplateContentLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedTemplateContentController in code that requires TemplateContentController +// // and then make assertions. +// +// } +type TemplateContentControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.TemplateContentHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.TemplateContentHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.TemplateContentLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.TemplateContentHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.TemplateContentHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *TemplateContentControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.TemplateContentHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("TemplateContentControllerMock.AddClusterScopedHandlerFunc: method is nil but TemplateContentController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.TemplateContentHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockTemplateContentControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockTemplateContentControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedTemplateContentController.AddClusterScopedHandlerCalls()) +func (mock *TemplateContentControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.TemplateContentHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.TemplateContentHandlerFunc + } + lockTemplateContentControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockTemplateContentControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *TemplateContentControllerMock) AddHandler(ctx context.Context, name string, handler v3.TemplateContentHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("TemplateContentControllerMock.AddHandlerFunc: method is nil but TemplateContentController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.TemplateContentHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockTemplateContentControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockTemplateContentControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedTemplateContentController.AddHandlerCalls()) +func (mock *TemplateContentControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.TemplateContentHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.TemplateContentHandlerFunc + } + lockTemplateContentControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockTemplateContentControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *TemplateContentControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("TemplateContentControllerMock.EnqueueFunc: method is nil but TemplateContentController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockTemplateContentControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockTemplateContentControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedTemplateContentController.EnqueueCalls()) +func (mock *TemplateContentControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockTemplateContentControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockTemplateContentControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *TemplateContentControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("TemplateContentControllerMock.GenericFunc: method is nil but TemplateContentController.Generic was just called") + } + callInfo := struct { + }{} + lockTemplateContentControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockTemplateContentControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedTemplateContentController.GenericCalls()) +func (mock *TemplateContentControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockTemplateContentControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockTemplateContentControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *TemplateContentControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("TemplateContentControllerMock.InformerFunc: method is nil but TemplateContentController.Informer was just called") + } + callInfo := struct { + }{} + lockTemplateContentControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockTemplateContentControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedTemplateContentController.InformerCalls()) +func (mock *TemplateContentControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockTemplateContentControllerMockInformer.RLock() + calls = mock.calls.Informer + lockTemplateContentControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *TemplateContentControllerMock) Lister() v3.TemplateContentLister { + if mock.ListerFunc == nil { + panic("TemplateContentControllerMock.ListerFunc: method is nil but TemplateContentController.Lister was just called") + } + callInfo := struct { + }{} + lockTemplateContentControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockTemplateContentControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedTemplateContentController.ListerCalls()) +func (mock *TemplateContentControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockTemplateContentControllerMockLister.RLock() + calls = mock.calls.Lister + lockTemplateContentControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *TemplateContentControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("TemplateContentControllerMock.StartFunc: method is nil but TemplateContentController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockTemplateContentControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockTemplateContentControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedTemplateContentController.StartCalls()) +func (mock *TemplateContentControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockTemplateContentControllerMockStart.RLock() + calls = mock.calls.Start + lockTemplateContentControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *TemplateContentControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("TemplateContentControllerMock.SyncFunc: method is nil but TemplateContentController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockTemplateContentControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockTemplateContentControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedTemplateContentController.SyncCalls()) +func (mock *TemplateContentControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockTemplateContentControllerMockSync.RLock() + calls = mock.calls.Sync + lockTemplateContentControllerMockSync.RUnlock() + return calls +} + +var ( + lockTemplateContentInterfaceMockAddClusterScopedHandler sync.RWMutex + lockTemplateContentInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockTemplateContentInterfaceMockAddHandler sync.RWMutex + lockTemplateContentInterfaceMockAddLifecycle sync.RWMutex + lockTemplateContentInterfaceMockController sync.RWMutex + lockTemplateContentInterfaceMockCreate sync.RWMutex + lockTemplateContentInterfaceMockDelete sync.RWMutex + lockTemplateContentInterfaceMockDeleteCollection sync.RWMutex + lockTemplateContentInterfaceMockDeleteNamespaced sync.RWMutex + lockTemplateContentInterfaceMockGet sync.RWMutex + lockTemplateContentInterfaceMockGetNamespaced sync.RWMutex + lockTemplateContentInterfaceMockList sync.RWMutex + lockTemplateContentInterfaceMockObjectClient sync.RWMutex + lockTemplateContentInterfaceMockUpdate sync.RWMutex + lockTemplateContentInterfaceMockWatch sync.RWMutex +) + +// Ensure, that TemplateContentInterfaceMock does implement TemplateContentInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.TemplateContentInterface = &TemplateContentInterfaceMock{} + +// TemplateContentInterfaceMock is a mock implementation of TemplateContentInterface. +// +// func TestSomethingThatUsesTemplateContentInterface(t *testing.T) { +// +// // make and configure a mocked TemplateContentInterface +// mockedTemplateContentInterface := &TemplateContentInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.TemplateContentHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.TemplateContentLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.TemplateContentHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.TemplateContentLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.TemplateContentController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.TemplateContent) (*v3.TemplateContent, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.TemplateContent, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.TemplateContent, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.TemplateContentList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.TemplateContent) (*v3.TemplateContent, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedTemplateContentInterface in code that requires TemplateContentInterface +// // and then make assertions. +// +// } +type TemplateContentInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.TemplateContentHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.TemplateContentLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.TemplateContentHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.TemplateContentLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.TemplateContentController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.TemplateContent) (*v3.TemplateContent, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.TemplateContent, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.TemplateContent, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.TemplateContentList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.TemplateContent) (*v3.TemplateContent, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.TemplateContentHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.TemplateContentLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.TemplateContentHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.TemplateContentLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.TemplateContent + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.TemplateContent + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *TemplateContentInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.TemplateContentHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("TemplateContentInterfaceMock.AddClusterScopedHandlerFunc: method is nil but TemplateContentInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.TemplateContentHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockTemplateContentInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockTemplateContentInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedTemplateContentInterface.AddClusterScopedHandlerCalls()) +func (mock *TemplateContentInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.TemplateContentHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.TemplateContentHandlerFunc + } + lockTemplateContentInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockTemplateContentInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *TemplateContentInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.TemplateContentLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("TemplateContentInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but TemplateContentInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.TemplateContentLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockTemplateContentInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockTemplateContentInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedTemplateContentInterface.AddClusterScopedLifecycleCalls()) +func (mock *TemplateContentInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.TemplateContentLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.TemplateContentLifecycle + } + lockTemplateContentInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockTemplateContentInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *TemplateContentInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.TemplateContentHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("TemplateContentInterfaceMock.AddHandlerFunc: method is nil but TemplateContentInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.TemplateContentHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockTemplateContentInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockTemplateContentInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedTemplateContentInterface.AddHandlerCalls()) +func (mock *TemplateContentInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.TemplateContentHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.TemplateContentHandlerFunc + } + lockTemplateContentInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockTemplateContentInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *TemplateContentInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.TemplateContentLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("TemplateContentInterfaceMock.AddLifecycleFunc: method is nil but TemplateContentInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.TemplateContentLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockTemplateContentInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockTemplateContentInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedTemplateContentInterface.AddLifecycleCalls()) +func (mock *TemplateContentInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.TemplateContentLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.TemplateContentLifecycle + } + lockTemplateContentInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockTemplateContentInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *TemplateContentInterfaceMock) Controller() v3.TemplateContentController { + if mock.ControllerFunc == nil { + panic("TemplateContentInterfaceMock.ControllerFunc: method is nil but TemplateContentInterface.Controller was just called") + } + callInfo := struct { + }{} + lockTemplateContentInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockTemplateContentInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedTemplateContentInterface.ControllerCalls()) +func (mock *TemplateContentInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockTemplateContentInterfaceMockController.RLock() + calls = mock.calls.Controller + lockTemplateContentInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *TemplateContentInterfaceMock) Create(in1 *v3.TemplateContent) (*v3.TemplateContent, error) { + if mock.CreateFunc == nil { + panic("TemplateContentInterfaceMock.CreateFunc: method is nil but TemplateContentInterface.Create was just called") + } + callInfo := struct { + In1 *v3.TemplateContent + }{ + In1: in1, + } + lockTemplateContentInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockTemplateContentInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedTemplateContentInterface.CreateCalls()) +func (mock *TemplateContentInterfaceMock) CreateCalls() []struct { + In1 *v3.TemplateContent +} { + var calls []struct { + In1 *v3.TemplateContent + } + lockTemplateContentInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockTemplateContentInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *TemplateContentInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("TemplateContentInterfaceMock.DeleteFunc: method is nil but TemplateContentInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockTemplateContentInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockTemplateContentInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedTemplateContentInterface.DeleteCalls()) +func (mock *TemplateContentInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockTemplateContentInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockTemplateContentInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *TemplateContentInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("TemplateContentInterfaceMock.DeleteCollectionFunc: method is nil but TemplateContentInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockTemplateContentInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockTemplateContentInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedTemplateContentInterface.DeleteCollectionCalls()) +func (mock *TemplateContentInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockTemplateContentInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockTemplateContentInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *TemplateContentInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("TemplateContentInterfaceMock.DeleteNamespacedFunc: method is nil but TemplateContentInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockTemplateContentInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockTemplateContentInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedTemplateContentInterface.DeleteNamespacedCalls()) +func (mock *TemplateContentInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockTemplateContentInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockTemplateContentInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *TemplateContentInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.TemplateContent, error) { + if mock.GetFunc == nil { + panic("TemplateContentInterfaceMock.GetFunc: method is nil but TemplateContentInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockTemplateContentInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockTemplateContentInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedTemplateContentInterface.GetCalls()) +func (mock *TemplateContentInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockTemplateContentInterfaceMockGet.RLock() + calls = mock.calls.Get + lockTemplateContentInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *TemplateContentInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.TemplateContent, error) { + if mock.GetNamespacedFunc == nil { + panic("TemplateContentInterfaceMock.GetNamespacedFunc: method is nil but TemplateContentInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockTemplateContentInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockTemplateContentInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedTemplateContentInterface.GetNamespacedCalls()) +func (mock *TemplateContentInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockTemplateContentInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockTemplateContentInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *TemplateContentInterfaceMock) List(opts v1.ListOptions) (*v3.TemplateContentList, error) { + if mock.ListFunc == nil { + panic("TemplateContentInterfaceMock.ListFunc: method is nil but TemplateContentInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockTemplateContentInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockTemplateContentInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedTemplateContentInterface.ListCalls()) +func (mock *TemplateContentInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockTemplateContentInterfaceMockList.RLock() + calls = mock.calls.List + lockTemplateContentInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *TemplateContentInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("TemplateContentInterfaceMock.ObjectClientFunc: method is nil but TemplateContentInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockTemplateContentInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockTemplateContentInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedTemplateContentInterface.ObjectClientCalls()) +func (mock *TemplateContentInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockTemplateContentInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockTemplateContentInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *TemplateContentInterfaceMock) Update(in1 *v3.TemplateContent) (*v3.TemplateContent, error) { + if mock.UpdateFunc == nil { + panic("TemplateContentInterfaceMock.UpdateFunc: method is nil but TemplateContentInterface.Update was just called") + } + callInfo := struct { + In1 *v3.TemplateContent + }{ + In1: in1, + } + lockTemplateContentInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockTemplateContentInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedTemplateContentInterface.UpdateCalls()) +func (mock *TemplateContentInterfaceMock) UpdateCalls() []struct { + In1 *v3.TemplateContent +} { + var calls []struct { + In1 *v3.TemplateContent + } + lockTemplateContentInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockTemplateContentInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *TemplateContentInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("TemplateContentInterfaceMock.WatchFunc: method is nil but TemplateContentInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockTemplateContentInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockTemplateContentInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedTemplateContentInterface.WatchCalls()) +func (mock *TemplateContentInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockTemplateContentInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockTemplateContentInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockTemplateContentsGetterMockTemplateContents sync.RWMutex +) + +// Ensure, that TemplateContentsGetterMock does implement TemplateContentsGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.TemplateContentsGetter = &TemplateContentsGetterMock{} + +// TemplateContentsGetterMock is a mock implementation of TemplateContentsGetter. +// +// func TestSomethingThatUsesTemplateContentsGetter(t *testing.T) { +// +// // make and configure a mocked TemplateContentsGetter +// mockedTemplateContentsGetter := &TemplateContentsGetterMock{ +// TemplateContentsFunc: func(namespace string) v3.TemplateContentInterface { +// panic("mock out the TemplateContents method") +// }, +// } +// +// // use mockedTemplateContentsGetter in code that requires TemplateContentsGetter +// // and then make assertions. +// +// } +type TemplateContentsGetterMock struct { + // TemplateContentsFunc mocks the TemplateContents method. + TemplateContentsFunc func(namespace string) v3.TemplateContentInterface + + // calls tracks calls to the methods. + calls struct { + // TemplateContents holds details about calls to the TemplateContents method. + TemplateContents []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// TemplateContents calls TemplateContentsFunc. +func (mock *TemplateContentsGetterMock) TemplateContents(namespace string) v3.TemplateContentInterface { + if mock.TemplateContentsFunc == nil { + panic("TemplateContentsGetterMock.TemplateContentsFunc: method is nil but TemplateContentsGetter.TemplateContents was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockTemplateContentsGetterMockTemplateContents.Lock() + mock.calls.TemplateContents = append(mock.calls.TemplateContents, callInfo) + lockTemplateContentsGetterMockTemplateContents.Unlock() + return mock.TemplateContentsFunc(namespace) +} + +// TemplateContentsCalls gets all the calls that were made to TemplateContents. +// Check the length with: +// len(mockedTemplateContentsGetter.TemplateContentsCalls()) +func (mock *TemplateContentsGetterMock) TemplateContentsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockTemplateContentsGetterMockTemplateContents.RLock() + calls = mock.calls.TemplateContents + lockTemplateContentsGetterMockTemplateContents.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_template_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_template_mock_test.go new file mode 100644 index 00000000..fe2b197d --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_template_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockTemplateListerMockGet sync.RWMutex + lockTemplateListerMockList sync.RWMutex +) + +// Ensure, that TemplateListerMock does implement TemplateLister. +// If this is not the case, regenerate this file with moq. +var _ v3.TemplateLister = &TemplateListerMock{} + +// TemplateListerMock is a mock implementation of TemplateLister. +// +// func TestSomethingThatUsesTemplateLister(t *testing.T) { +// +// // make and configure a mocked TemplateLister +// mockedTemplateLister := &TemplateListerMock{ +// GetFunc: func(namespace string, name string) (*v3.Template, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.Template, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedTemplateLister in code that requires TemplateLister +// // and then make assertions. +// +// } +type TemplateListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.Template, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.Template, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *TemplateListerMock) Get(namespace string, name string) (*v3.Template, error) { + if mock.GetFunc == nil { + panic("TemplateListerMock.GetFunc: method is nil but TemplateLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockTemplateListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockTemplateListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedTemplateLister.GetCalls()) +func (mock *TemplateListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockTemplateListerMockGet.RLock() + calls = mock.calls.Get + lockTemplateListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *TemplateListerMock) List(namespace string, selector labels.Selector) ([]*v3.Template, error) { + if mock.ListFunc == nil { + panic("TemplateListerMock.ListFunc: method is nil but TemplateLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockTemplateListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockTemplateListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedTemplateLister.ListCalls()) +func (mock *TemplateListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockTemplateListerMockList.RLock() + calls = mock.calls.List + lockTemplateListerMockList.RUnlock() + return calls +} + +var ( + lockTemplateControllerMockAddClusterScopedHandler sync.RWMutex + lockTemplateControllerMockAddHandler sync.RWMutex + lockTemplateControllerMockEnqueue sync.RWMutex + lockTemplateControllerMockGeneric sync.RWMutex + lockTemplateControllerMockInformer sync.RWMutex + lockTemplateControllerMockLister sync.RWMutex + lockTemplateControllerMockStart sync.RWMutex + lockTemplateControllerMockSync sync.RWMutex +) + +// Ensure, that TemplateControllerMock does implement TemplateController. +// If this is not the case, regenerate this file with moq. +var _ v3.TemplateController = &TemplateControllerMock{} + +// TemplateControllerMock is a mock implementation of TemplateController. +// +// func TestSomethingThatUsesTemplateController(t *testing.T) { +// +// // make and configure a mocked TemplateController +// mockedTemplateController := &TemplateControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.TemplateHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.TemplateHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.TemplateLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedTemplateController in code that requires TemplateController +// // and then make assertions. +// +// } +type TemplateControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.TemplateHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.TemplateHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.TemplateLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.TemplateHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.TemplateHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *TemplateControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.TemplateHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("TemplateControllerMock.AddClusterScopedHandlerFunc: method is nil but TemplateController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.TemplateHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockTemplateControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockTemplateControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedTemplateController.AddClusterScopedHandlerCalls()) +func (mock *TemplateControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.TemplateHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.TemplateHandlerFunc + } + lockTemplateControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockTemplateControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *TemplateControllerMock) AddHandler(ctx context.Context, name string, handler v3.TemplateHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("TemplateControllerMock.AddHandlerFunc: method is nil but TemplateController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.TemplateHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockTemplateControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockTemplateControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedTemplateController.AddHandlerCalls()) +func (mock *TemplateControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.TemplateHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.TemplateHandlerFunc + } + lockTemplateControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockTemplateControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *TemplateControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("TemplateControllerMock.EnqueueFunc: method is nil but TemplateController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockTemplateControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockTemplateControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedTemplateController.EnqueueCalls()) +func (mock *TemplateControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockTemplateControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockTemplateControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *TemplateControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("TemplateControllerMock.GenericFunc: method is nil but TemplateController.Generic was just called") + } + callInfo := struct { + }{} + lockTemplateControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockTemplateControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedTemplateController.GenericCalls()) +func (mock *TemplateControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockTemplateControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockTemplateControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *TemplateControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("TemplateControllerMock.InformerFunc: method is nil but TemplateController.Informer was just called") + } + callInfo := struct { + }{} + lockTemplateControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockTemplateControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedTemplateController.InformerCalls()) +func (mock *TemplateControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockTemplateControllerMockInformer.RLock() + calls = mock.calls.Informer + lockTemplateControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *TemplateControllerMock) Lister() v3.TemplateLister { + if mock.ListerFunc == nil { + panic("TemplateControllerMock.ListerFunc: method is nil but TemplateController.Lister was just called") + } + callInfo := struct { + }{} + lockTemplateControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockTemplateControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedTemplateController.ListerCalls()) +func (mock *TemplateControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockTemplateControllerMockLister.RLock() + calls = mock.calls.Lister + lockTemplateControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *TemplateControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("TemplateControllerMock.StartFunc: method is nil but TemplateController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockTemplateControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockTemplateControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedTemplateController.StartCalls()) +func (mock *TemplateControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockTemplateControllerMockStart.RLock() + calls = mock.calls.Start + lockTemplateControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *TemplateControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("TemplateControllerMock.SyncFunc: method is nil but TemplateController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockTemplateControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockTemplateControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedTemplateController.SyncCalls()) +func (mock *TemplateControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockTemplateControllerMockSync.RLock() + calls = mock.calls.Sync + lockTemplateControllerMockSync.RUnlock() + return calls +} + +var ( + lockTemplateInterfaceMockAddClusterScopedHandler sync.RWMutex + lockTemplateInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockTemplateInterfaceMockAddHandler sync.RWMutex + lockTemplateInterfaceMockAddLifecycle sync.RWMutex + lockTemplateInterfaceMockController sync.RWMutex + lockTemplateInterfaceMockCreate sync.RWMutex + lockTemplateInterfaceMockDelete sync.RWMutex + lockTemplateInterfaceMockDeleteCollection sync.RWMutex + lockTemplateInterfaceMockDeleteNamespaced sync.RWMutex + lockTemplateInterfaceMockGet sync.RWMutex + lockTemplateInterfaceMockGetNamespaced sync.RWMutex + lockTemplateInterfaceMockList sync.RWMutex + lockTemplateInterfaceMockObjectClient sync.RWMutex + lockTemplateInterfaceMockUpdate sync.RWMutex + lockTemplateInterfaceMockWatch sync.RWMutex +) + +// Ensure, that TemplateInterfaceMock does implement TemplateInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.TemplateInterface = &TemplateInterfaceMock{} + +// TemplateInterfaceMock is a mock implementation of TemplateInterface. +// +// func TestSomethingThatUsesTemplateInterface(t *testing.T) { +// +// // make and configure a mocked TemplateInterface +// mockedTemplateInterface := &TemplateInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.TemplateHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.TemplateLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.TemplateHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.TemplateLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.TemplateController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.Template) (*v3.Template, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.Template, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.Template, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.TemplateList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.Template) (*v3.Template, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedTemplateInterface in code that requires TemplateInterface +// // and then make assertions. +// +// } +type TemplateInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.TemplateHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.TemplateLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.TemplateHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.TemplateLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.TemplateController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.Template) (*v3.Template, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.Template, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.Template, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.TemplateList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.Template) (*v3.Template, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.TemplateHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.TemplateLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.TemplateHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.TemplateLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.Template + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.Template + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *TemplateInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.TemplateHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("TemplateInterfaceMock.AddClusterScopedHandlerFunc: method is nil but TemplateInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.TemplateHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockTemplateInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockTemplateInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedTemplateInterface.AddClusterScopedHandlerCalls()) +func (mock *TemplateInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.TemplateHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.TemplateHandlerFunc + } + lockTemplateInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockTemplateInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *TemplateInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.TemplateLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("TemplateInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but TemplateInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.TemplateLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockTemplateInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockTemplateInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedTemplateInterface.AddClusterScopedLifecycleCalls()) +func (mock *TemplateInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.TemplateLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.TemplateLifecycle + } + lockTemplateInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockTemplateInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *TemplateInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.TemplateHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("TemplateInterfaceMock.AddHandlerFunc: method is nil but TemplateInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.TemplateHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockTemplateInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockTemplateInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedTemplateInterface.AddHandlerCalls()) +func (mock *TemplateInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.TemplateHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.TemplateHandlerFunc + } + lockTemplateInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockTemplateInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *TemplateInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.TemplateLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("TemplateInterfaceMock.AddLifecycleFunc: method is nil but TemplateInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.TemplateLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockTemplateInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockTemplateInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedTemplateInterface.AddLifecycleCalls()) +func (mock *TemplateInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.TemplateLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.TemplateLifecycle + } + lockTemplateInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockTemplateInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *TemplateInterfaceMock) Controller() v3.TemplateController { + if mock.ControllerFunc == nil { + panic("TemplateInterfaceMock.ControllerFunc: method is nil but TemplateInterface.Controller was just called") + } + callInfo := struct { + }{} + lockTemplateInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockTemplateInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedTemplateInterface.ControllerCalls()) +func (mock *TemplateInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockTemplateInterfaceMockController.RLock() + calls = mock.calls.Controller + lockTemplateInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *TemplateInterfaceMock) Create(in1 *v3.Template) (*v3.Template, error) { + if mock.CreateFunc == nil { + panic("TemplateInterfaceMock.CreateFunc: method is nil but TemplateInterface.Create was just called") + } + callInfo := struct { + In1 *v3.Template + }{ + In1: in1, + } + lockTemplateInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockTemplateInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedTemplateInterface.CreateCalls()) +func (mock *TemplateInterfaceMock) CreateCalls() []struct { + In1 *v3.Template +} { + var calls []struct { + In1 *v3.Template + } + lockTemplateInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockTemplateInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *TemplateInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("TemplateInterfaceMock.DeleteFunc: method is nil but TemplateInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockTemplateInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockTemplateInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedTemplateInterface.DeleteCalls()) +func (mock *TemplateInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockTemplateInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockTemplateInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *TemplateInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("TemplateInterfaceMock.DeleteCollectionFunc: method is nil but TemplateInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockTemplateInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockTemplateInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedTemplateInterface.DeleteCollectionCalls()) +func (mock *TemplateInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockTemplateInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockTemplateInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *TemplateInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("TemplateInterfaceMock.DeleteNamespacedFunc: method is nil but TemplateInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockTemplateInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockTemplateInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedTemplateInterface.DeleteNamespacedCalls()) +func (mock *TemplateInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockTemplateInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockTemplateInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *TemplateInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.Template, error) { + if mock.GetFunc == nil { + panic("TemplateInterfaceMock.GetFunc: method is nil but TemplateInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockTemplateInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockTemplateInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedTemplateInterface.GetCalls()) +func (mock *TemplateInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockTemplateInterfaceMockGet.RLock() + calls = mock.calls.Get + lockTemplateInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *TemplateInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.Template, error) { + if mock.GetNamespacedFunc == nil { + panic("TemplateInterfaceMock.GetNamespacedFunc: method is nil but TemplateInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockTemplateInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockTemplateInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedTemplateInterface.GetNamespacedCalls()) +func (mock *TemplateInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockTemplateInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockTemplateInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *TemplateInterfaceMock) List(opts v1.ListOptions) (*v3.TemplateList, error) { + if mock.ListFunc == nil { + panic("TemplateInterfaceMock.ListFunc: method is nil but TemplateInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockTemplateInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockTemplateInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedTemplateInterface.ListCalls()) +func (mock *TemplateInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockTemplateInterfaceMockList.RLock() + calls = mock.calls.List + lockTemplateInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *TemplateInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("TemplateInterfaceMock.ObjectClientFunc: method is nil but TemplateInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockTemplateInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockTemplateInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedTemplateInterface.ObjectClientCalls()) +func (mock *TemplateInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockTemplateInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockTemplateInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *TemplateInterfaceMock) Update(in1 *v3.Template) (*v3.Template, error) { + if mock.UpdateFunc == nil { + panic("TemplateInterfaceMock.UpdateFunc: method is nil but TemplateInterface.Update was just called") + } + callInfo := struct { + In1 *v3.Template + }{ + In1: in1, + } + lockTemplateInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockTemplateInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedTemplateInterface.UpdateCalls()) +func (mock *TemplateInterfaceMock) UpdateCalls() []struct { + In1 *v3.Template +} { + var calls []struct { + In1 *v3.Template + } + lockTemplateInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockTemplateInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *TemplateInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("TemplateInterfaceMock.WatchFunc: method is nil but TemplateInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockTemplateInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockTemplateInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedTemplateInterface.WatchCalls()) +func (mock *TemplateInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockTemplateInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockTemplateInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockTemplatesGetterMockTemplates sync.RWMutex +) + +// Ensure, that TemplatesGetterMock does implement TemplatesGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.TemplatesGetter = &TemplatesGetterMock{} + +// TemplatesGetterMock is a mock implementation of TemplatesGetter. +// +// func TestSomethingThatUsesTemplatesGetter(t *testing.T) { +// +// // make and configure a mocked TemplatesGetter +// mockedTemplatesGetter := &TemplatesGetterMock{ +// TemplatesFunc: func(namespace string) v3.TemplateInterface { +// panic("mock out the Templates method") +// }, +// } +// +// // use mockedTemplatesGetter in code that requires TemplatesGetter +// // and then make assertions. +// +// } +type TemplatesGetterMock struct { + // TemplatesFunc mocks the Templates method. + TemplatesFunc func(namespace string) v3.TemplateInterface + + // calls tracks calls to the methods. + calls struct { + // Templates holds details about calls to the Templates method. + Templates []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// Templates calls TemplatesFunc. +func (mock *TemplatesGetterMock) Templates(namespace string) v3.TemplateInterface { + if mock.TemplatesFunc == nil { + panic("TemplatesGetterMock.TemplatesFunc: method is nil but TemplatesGetter.Templates was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockTemplatesGetterMockTemplates.Lock() + mock.calls.Templates = append(mock.calls.Templates, callInfo) + lockTemplatesGetterMockTemplates.Unlock() + return mock.TemplatesFunc(namespace) +} + +// TemplatesCalls gets all the calls that were made to Templates. +// Check the length with: +// len(mockedTemplatesGetter.TemplatesCalls()) +func (mock *TemplatesGetterMock) TemplatesCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockTemplatesGetterMockTemplates.RLock() + calls = mock.calls.Templates + lockTemplatesGetterMockTemplates.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_template_version_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_template_version_mock_test.go new file mode 100644 index 00000000..ecf0c9fe --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_template_version_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockTemplateVersionListerMockGet sync.RWMutex + lockTemplateVersionListerMockList sync.RWMutex +) + +// Ensure, that TemplateVersionListerMock does implement TemplateVersionLister. +// If this is not the case, regenerate this file with moq. +var _ v3.TemplateVersionLister = &TemplateVersionListerMock{} + +// TemplateVersionListerMock is a mock implementation of TemplateVersionLister. +// +// func TestSomethingThatUsesTemplateVersionLister(t *testing.T) { +// +// // make and configure a mocked TemplateVersionLister +// mockedTemplateVersionLister := &TemplateVersionListerMock{ +// GetFunc: func(namespace string, name string) (*v3.TemplateVersion, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.TemplateVersion, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedTemplateVersionLister in code that requires TemplateVersionLister +// // and then make assertions. +// +// } +type TemplateVersionListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.TemplateVersion, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.TemplateVersion, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *TemplateVersionListerMock) Get(namespace string, name string) (*v3.TemplateVersion, error) { + if mock.GetFunc == nil { + panic("TemplateVersionListerMock.GetFunc: method is nil but TemplateVersionLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockTemplateVersionListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockTemplateVersionListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedTemplateVersionLister.GetCalls()) +func (mock *TemplateVersionListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockTemplateVersionListerMockGet.RLock() + calls = mock.calls.Get + lockTemplateVersionListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *TemplateVersionListerMock) List(namespace string, selector labels.Selector) ([]*v3.TemplateVersion, error) { + if mock.ListFunc == nil { + panic("TemplateVersionListerMock.ListFunc: method is nil but TemplateVersionLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockTemplateVersionListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockTemplateVersionListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedTemplateVersionLister.ListCalls()) +func (mock *TemplateVersionListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockTemplateVersionListerMockList.RLock() + calls = mock.calls.List + lockTemplateVersionListerMockList.RUnlock() + return calls +} + +var ( + lockTemplateVersionControllerMockAddClusterScopedHandler sync.RWMutex + lockTemplateVersionControllerMockAddHandler sync.RWMutex + lockTemplateVersionControllerMockEnqueue sync.RWMutex + lockTemplateVersionControllerMockGeneric sync.RWMutex + lockTemplateVersionControllerMockInformer sync.RWMutex + lockTemplateVersionControllerMockLister sync.RWMutex + lockTemplateVersionControllerMockStart sync.RWMutex + lockTemplateVersionControllerMockSync sync.RWMutex +) + +// Ensure, that TemplateVersionControllerMock does implement TemplateVersionController. +// If this is not the case, regenerate this file with moq. +var _ v3.TemplateVersionController = &TemplateVersionControllerMock{} + +// TemplateVersionControllerMock is a mock implementation of TemplateVersionController. +// +// func TestSomethingThatUsesTemplateVersionController(t *testing.T) { +// +// // make and configure a mocked TemplateVersionController +// mockedTemplateVersionController := &TemplateVersionControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.TemplateVersionHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.TemplateVersionHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.TemplateVersionLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedTemplateVersionController in code that requires TemplateVersionController +// // and then make assertions. +// +// } +type TemplateVersionControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.TemplateVersionHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.TemplateVersionHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.TemplateVersionLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.TemplateVersionHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.TemplateVersionHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *TemplateVersionControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.TemplateVersionHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("TemplateVersionControllerMock.AddClusterScopedHandlerFunc: method is nil but TemplateVersionController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.TemplateVersionHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockTemplateVersionControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockTemplateVersionControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedTemplateVersionController.AddClusterScopedHandlerCalls()) +func (mock *TemplateVersionControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.TemplateVersionHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.TemplateVersionHandlerFunc + } + lockTemplateVersionControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockTemplateVersionControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *TemplateVersionControllerMock) AddHandler(ctx context.Context, name string, handler v3.TemplateVersionHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("TemplateVersionControllerMock.AddHandlerFunc: method is nil but TemplateVersionController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.TemplateVersionHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockTemplateVersionControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockTemplateVersionControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedTemplateVersionController.AddHandlerCalls()) +func (mock *TemplateVersionControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.TemplateVersionHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.TemplateVersionHandlerFunc + } + lockTemplateVersionControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockTemplateVersionControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *TemplateVersionControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("TemplateVersionControllerMock.EnqueueFunc: method is nil but TemplateVersionController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockTemplateVersionControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockTemplateVersionControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedTemplateVersionController.EnqueueCalls()) +func (mock *TemplateVersionControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockTemplateVersionControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockTemplateVersionControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *TemplateVersionControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("TemplateVersionControllerMock.GenericFunc: method is nil but TemplateVersionController.Generic was just called") + } + callInfo := struct { + }{} + lockTemplateVersionControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockTemplateVersionControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedTemplateVersionController.GenericCalls()) +func (mock *TemplateVersionControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockTemplateVersionControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockTemplateVersionControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *TemplateVersionControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("TemplateVersionControllerMock.InformerFunc: method is nil but TemplateVersionController.Informer was just called") + } + callInfo := struct { + }{} + lockTemplateVersionControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockTemplateVersionControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedTemplateVersionController.InformerCalls()) +func (mock *TemplateVersionControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockTemplateVersionControllerMockInformer.RLock() + calls = mock.calls.Informer + lockTemplateVersionControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *TemplateVersionControllerMock) Lister() v3.TemplateVersionLister { + if mock.ListerFunc == nil { + panic("TemplateVersionControllerMock.ListerFunc: method is nil but TemplateVersionController.Lister was just called") + } + callInfo := struct { + }{} + lockTemplateVersionControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockTemplateVersionControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedTemplateVersionController.ListerCalls()) +func (mock *TemplateVersionControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockTemplateVersionControllerMockLister.RLock() + calls = mock.calls.Lister + lockTemplateVersionControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *TemplateVersionControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("TemplateVersionControllerMock.StartFunc: method is nil but TemplateVersionController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockTemplateVersionControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockTemplateVersionControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedTemplateVersionController.StartCalls()) +func (mock *TemplateVersionControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockTemplateVersionControllerMockStart.RLock() + calls = mock.calls.Start + lockTemplateVersionControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *TemplateVersionControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("TemplateVersionControllerMock.SyncFunc: method is nil but TemplateVersionController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockTemplateVersionControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockTemplateVersionControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedTemplateVersionController.SyncCalls()) +func (mock *TemplateVersionControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockTemplateVersionControllerMockSync.RLock() + calls = mock.calls.Sync + lockTemplateVersionControllerMockSync.RUnlock() + return calls +} + +var ( + lockTemplateVersionInterfaceMockAddClusterScopedHandler sync.RWMutex + lockTemplateVersionInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockTemplateVersionInterfaceMockAddHandler sync.RWMutex + lockTemplateVersionInterfaceMockAddLifecycle sync.RWMutex + lockTemplateVersionInterfaceMockController sync.RWMutex + lockTemplateVersionInterfaceMockCreate sync.RWMutex + lockTemplateVersionInterfaceMockDelete sync.RWMutex + lockTemplateVersionInterfaceMockDeleteCollection sync.RWMutex + lockTemplateVersionInterfaceMockDeleteNamespaced sync.RWMutex + lockTemplateVersionInterfaceMockGet sync.RWMutex + lockTemplateVersionInterfaceMockGetNamespaced sync.RWMutex + lockTemplateVersionInterfaceMockList sync.RWMutex + lockTemplateVersionInterfaceMockObjectClient sync.RWMutex + lockTemplateVersionInterfaceMockUpdate sync.RWMutex + lockTemplateVersionInterfaceMockWatch sync.RWMutex +) + +// Ensure, that TemplateVersionInterfaceMock does implement TemplateVersionInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.TemplateVersionInterface = &TemplateVersionInterfaceMock{} + +// TemplateVersionInterfaceMock is a mock implementation of TemplateVersionInterface. +// +// func TestSomethingThatUsesTemplateVersionInterface(t *testing.T) { +// +// // make and configure a mocked TemplateVersionInterface +// mockedTemplateVersionInterface := &TemplateVersionInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.TemplateVersionHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.TemplateVersionLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.TemplateVersionHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.TemplateVersionLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.TemplateVersionController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.TemplateVersion) (*v3.TemplateVersion, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.TemplateVersion, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.TemplateVersion, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.TemplateVersionList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.TemplateVersion) (*v3.TemplateVersion, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedTemplateVersionInterface in code that requires TemplateVersionInterface +// // and then make assertions. +// +// } +type TemplateVersionInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.TemplateVersionHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.TemplateVersionLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.TemplateVersionHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.TemplateVersionLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.TemplateVersionController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.TemplateVersion) (*v3.TemplateVersion, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.TemplateVersion, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.TemplateVersion, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.TemplateVersionList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.TemplateVersion) (*v3.TemplateVersion, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.TemplateVersionHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.TemplateVersionLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.TemplateVersionHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.TemplateVersionLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.TemplateVersion + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.TemplateVersion + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *TemplateVersionInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.TemplateVersionHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("TemplateVersionInterfaceMock.AddClusterScopedHandlerFunc: method is nil but TemplateVersionInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.TemplateVersionHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockTemplateVersionInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockTemplateVersionInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedTemplateVersionInterface.AddClusterScopedHandlerCalls()) +func (mock *TemplateVersionInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.TemplateVersionHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.TemplateVersionHandlerFunc + } + lockTemplateVersionInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockTemplateVersionInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *TemplateVersionInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.TemplateVersionLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("TemplateVersionInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but TemplateVersionInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.TemplateVersionLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockTemplateVersionInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockTemplateVersionInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedTemplateVersionInterface.AddClusterScopedLifecycleCalls()) +func (mock *TemplateVersionInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.TemplateVersionLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.TemplateVersionLifecycle + } + lockTemplateVersionInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockTemplateVersionInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *TemplateVersionInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.TemplateVersionHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("TemplateVersionInterfaceMock.AddHandlerFunc: method is nil but TemplateVersionInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.TemplateVersionHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockTemplateVersionInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockTemplateVersionInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedTemplateVersionInterface.AddHandlerCalls()) +func (mock *TemplateVersionInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.TemplateVersionHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.TemplateVersionHandlerFunc + } + lockTemplateVersionInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockTemplateVersionInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *TemplateVersionInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.TemplateVersionLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("TemplateVersionInterfaceMock.AddLifecycleFunc: method is nil but TemplateVersionInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.TemplateVersionLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockTemplateVersionInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockTemplateVersionInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedTemplateVersionInterface.AddLifecycleCalls()) +func (mock *TemplateVersionInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.TemplateVersionLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.TemplateVersionLifecycle + } + lockTemplateVersionInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockTemplateVersionInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *TemplateVersionInterfaceMock) Controller() v3.TemplateVersionController { + if mock.ControllerFunc == nil { + panic("TemplateVersionInterfaceMock.ControllerFunc: method is nil but TemplateVersionInterface.Controller was just called") + } + callInfo := struct { + }{} + lockTemplateVersionInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockTemplateVersionInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedTemplateVersionInterface.ControllerCalls()) +func (mock *TemplateVersionInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockTemplateVersionInterfaceMockController.RLock() + calls = mock.calls.Controller + lockTemplateVersionInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *TemplateVersionInterfaceMock) Create(in1 *v3.TemplateVersion) (*v3.TemplateVersion, error) { + if mock.CreateFunc == nil { + panic("TemplateVersionInterfaceMock.CreateFunc: method is nil but TemplateVersionInterface.Create was just called") + } + callInfo := struct { + In1 *v3.TemplateVersion + }{ + In1: in1, + } + lockTemplateVersionInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockTemplateVersionInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedTemplateVersionInterface.CreateCalls()) +func (mock *TemplateVersionInterfaceMock) CreateCalls() []struct { + In1 *v3.TemplateVersion +} { + var calls []struct { + In1 *v3.TemplateVersion + } + lockTemplateVersionInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockTemplateVersionInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *TemplateVersionInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("TemplateVersionInterfaceMock.DeleteFunc: method is nil but TemplateVersionInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockTemplateVersionInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockTemplateVersionInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedTemplateVersionInterface.DeleteCalls()) +func (mock *TemplateVersionInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockTemplateVersionInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockTemplateVersionInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *TemplateVersionInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("TemplateVersionInterfaceMock.DeleteCollectionFunc: method is nil but TemplateVersionInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockTemplateVersionInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockTemplateVersionInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedTemplateVersionInterface.DeleteCollectionCalls()) +func (mock *TemplateVersionInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockTemplateVersionInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockTemplateVersionInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *TemplateVersionInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("TemplateVersionInterfaceMock.DeleteNamespacedFunc: method is nil but TemplateVersionInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockTemplateVersionInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockTemplateVersionInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedTemplateVersionInterface.DeleteNamespacedCalls()) +func (mock *TemplateVersionInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockTemplateVersionInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockTemplateVersionInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *TemplateVersionInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.TemplateVersion, error) { + if mock.GetFunc == nil { + panic("TemplateVersionInterfaceMock.GetFunc: method is nil but TemplateVersionInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockTemplateVersionInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockTemplateVersionInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedTemplateVersionInterface.GetCalls()) +func (mock *TemplateVersionInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockTemplateVersionInterfaceMockGet.RLock() + calls = mock.calls.Get + lockTemplateVersionInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *TemplateVersionInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.TemplateVersion, error) { + if mock.GetNamespacedFunc == nil { + panic("TemplateVersionInterfaceMock.GetNamespacedFunc: method is nil but TemplateVersionInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockTemplateVersionInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockTemplateVersionInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedTemplateVersionInterface.GetNamespacedCalls()) +func (mock *TemplateVersionInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockTemplateVersionInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockTemplateVersionInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *TemplateVersionInterfaceMock) List(opts v1.ListOptions) (*v3.TemplateVersionList, error) { + if mock.ListFunc == nil { + panic("TemplateVersionInterfaceMock.ListFunc: method is nil but TemplateVersionInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockTemplateVersionInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockTemplateVersionInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedTemplateVersionInterface.ListCalls()) +func (mock *TemplateVersionInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockTemplateVersionInterfaceMockList.RLock() + calls = mock.calls.List + lockTemplateVersionInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *TemplateVersionInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("TemplateVersionInterfaceMock.ObjectClientFunc: method is nil but TemplateVersionInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockTemplateVersionInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockTemplateVersionInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedTemplateVersionInterface.ObjectClientCalls()) +func (mock *TemplateVersionInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockTemplateVersionInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockTemplateVersionInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *TemplateVersionInterfaceMock) Update(in1 *v3.TemplateVersion) (*v3.TemplateVersion, error) { + if mock.UpdateFunc == nil { + panic("TemplateVersionInterfaceMock.UpdateFunc: method is nil but TemplateVersionInterface.Update was just called") + } + callInfo := struct { + In1 *v3.TemplateVersion + }{ + In1: in1, + } + lockTemplateVersionInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockTemplateVersionInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedTemplateVersionInterface.UpdateCalls()) +func (mock *TemplateVersionInterfaceMock) UpdateCalls() []struct { + In1 *v3.TemplateVersion +} { + var calls []struct { + In1 *v3.TemplateVersion + } + lockTemplateVersionInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockTemplateVersionInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *TemplateVersionInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("TemplateVersionInterfaceMock.WatchFunc: method is nil but TemplateVersionInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockTemplateVersionInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockTemplateVersionInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedTemplateVersionInterface.WatchCalls()) +func (mock *TemplateVersionInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockTemplateVersionInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockTemplateVersionInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockTemplateVersionsGetterMockTemplateVersions sync.RWMutex +) + +// Ensure, that TemplateVersionsGetterMock does implement TemplateVersionsGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.TemplateVersionsGetter = &TemplateVersionsGetterMock{} + +// TemplateVersionsGetterMock is a mock implementation of TemplateVersionsGetter. +// +// func TestSomethingThatUsesTemplateVersionsGetter(t *testing.T) { +// +// // make and configure a mocked TemplateVersionsGetter +// mockedTemplateVersionsGetter := &TemplateVersionsGetterMock{ +// TemplateVersionsFunc: func(namespace string) v3.TemplateVersionInterface { +// panic("mock out the TemplateVersions method") +// }, +// } +// +// // use mockedTemplateVersionsGetter in code that requires TemplateVersionsGetter +// // and then make assertions. +// +// } +type TemplateVersionsGetterMock struct { + // TemplateVersionsFunc mocks the TemplateVersions method. + TemplateVersionsFunc func(namespace string) v3.TemplateVersionInterface + + // calls tracks calls to the methods. + calls struct { + // TemplateVersions holds details about calls to the TemplateVersions method. + TemplateVersions []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// TemplateVersions calls TemplateVersionsFunc. +func (mock *TemplateVersionsGetterMock) TemplateVersions(namespace string) v3.TemplateVersionInterface { + if mock.TemplateVersionsFunc == nil { + panic("TemplateVersionsGetterMock.TemplateVersionsFunc: method is nil but TemplateVersionsGetter.TemplateVersions was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockTemplateVersionsGetterMockTemplateVersions.Lock() + mock.calls.TemplateVersions = append(mock.calls.TemplateVersions, callInfo) + lockTemplateVersionsGetterMockTemplateVersions.Unlock() + return mock.TemplateVersionsFunc(namespace) +} + +// TemplateVersionsCalls gets all the calls that were made to TemplateVersions. +// Check the length with: +// len(mockedTemplateVersionsGetter.TemplateVersionsCalls()) +func (mock *TemplateVersionsGetterMock) TemplateVersionsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockTemplateVersionsGetterMockTemplateVersions.RLock() + calls = mock.calls.TemplateVersions + lockTemplateVersionsGetterMockTemplateVersions.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_token_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_token_mock_test.go new file mode 100644 index 00000000..9d187235 --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_token_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockTokenListerMockGet sync.RWMutex + lockTokenListerMockList sync.RWMutex +) + +// Ensure, that TokenListerMock does implement TokenLister. +// If this is not the case, regenerate this file with moq. +var _ v3.TokenLister = &TokenListerMock{} + +// TokenListerMock is a mock implementation of TokenLister. +// +// func TestSomethingThatUsesTokenLister(t *testing.T) { +// +// // make and configure a mocked TokenLister +// mockedTokenLister := &TokenListerMock{ +// GetFunc: func(namespace string, name string) (*v3.Token, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.Token, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedTokenLister in code that requires TokenLister +// // and then make assertions. +// +// } +type TokenListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.Token, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.Token, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *TokenListerMock) Get(namespace string, name string) (*v3.Token, error) { + if mock.GetFunc == nil { + panic("TokenListerMock.GetFunc: method is nil but TokenLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockTokenListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockTokenListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedTokenLister.GetCalls()) +func (mock *TokenListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockTokenListerMockGet.RLock() + calls = mock.calls.Get + lockTokenListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *TokenListerMock) List(namespace string, selector labels.Selector) ([]*v3.Token, error) { + if mock.ListFunc == nil { + panic("TokenListerMock.ListFunc: method is nil but TokenLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockTokenListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockTokenListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedTokenLister.ListCalls()) +func (mock *TokenListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockTokenListerMockList.RLock() + calls = mock.calls.List + lockTokenListerMockList.RUnlock() + return calls +} + +var ( + lockTokenControllerMockAddClusterScopedHandler sync.RWMutex + lockTokenControllerMockAddHandler sync.RWMutex + lockTokenControllerMockEnqueue sync.RWMutex + lockTokenControllerMockGeneric sync.RWMutex + lockTokenControllerMockInformer sync.RWMutex + lockTokenControllerMockLister sync.RWMutex + lockTokenControllerMockStart sync.RWMutex + lockTokenControllerMockSync sync.RWMutex +) + +// Ensure, that TokenControllerMock does implement TokenController. +// If this is not the case, regenerate this file with moq. +var _ v3.TokenController = &TokenControllerMock{} + +// TokenControllerMock is a mock implementation of TokenController. +// +// func TestSomethingThatUsesTokenController(t *testing.T) { +// +// // make and configure a mocked TokenController +// mockedTokenController := &TokenControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.TokenHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.TokenHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.TokenLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedTokenController in code that requires TokenController +// // and then make assertions. +// +// } +type TokenControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.TokenHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.TokenHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.TokenLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.TokenHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.TokenHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *TokenControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.TokenHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("TokenControllerMock.AddClusterScopedHandlerFunc: method is nil but TokenController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.TokenHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockTokenControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockTokenControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedTokenController.AddClusterScopedHandlerCalls()) +func (mock *TokenControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.TokenHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.TokenHandlerFunc + } + lockTokenControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockTokenControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *TokenControllerMock) AddHandler(ctx context.Context, name string, handler v3.TokenHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("TokenControllerMock.AddHandlerFunc: method is nil but TokenController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.TokenHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockTokenControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockTokenControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedTokenController.AddHandlerCalls()) +func (mock *TokenControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.TokenHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.TokenHandlerFunc + } + lockTokenControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockTokenControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *TokenControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("TokenControllerMock.EnqueueFunc: method is nil but TokenController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockTokenControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockTokenControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedTokenController.EnqueueCalls()) +func (mock *TokenControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockTokenControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockTokenControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *TokenControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("TokenControllerMock.GenericFunc: method is nil but TokenController.Generic was just called") + } + callInfo := struct { + }{} + lockTokenControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockTokenControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedTokenController.GenericCalls()) +func (mock *TokenControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockTokenControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockTokenControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *TokenControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("TokenControllerMock.InformerFunc: method is nil but TokenController.Informer was just called") + } + callInfo := struct { + }{} + lockTokenControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockTokenControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedTokenController.InformerCalls()) +func (mock *TokenControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockTokenControllerMockInformer.RLock() + calls = mock.calls.Informer + lockTokenControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *TokenControllerMock) Lister() v3.TokenLister { + if mock.ListerFunc == nil { + panic("TokenControllerMock.ListerFunc: method is nil but TokenController.Lister was just called") + } + callInfo := struct { + }{} + lockTokenControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockTokenControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedTokenController.ListerCalls()) +func (mock *TokenControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockTokenControllerMockLister.RLock() + calls = mock.calls.Lister + lockTokenControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *TokenControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("TokenControllerMock.StartFunc: method is nil but TokenController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockTokenControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockTokenControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedTokenController.StartCalls()) +func (mock *TokenControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockTokenControllerMockStart.RLock() + calls = mock.calls.Start + lockTokenControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *TokenControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("TokenControllerMock.SyncFunc: method is nil but TokenController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockTokenControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockTokenControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedTokenController.SyncCalls()) +func (mock *TokenControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockTokenControllerMockSync.RLock() + calls = mock.calls.Sync + lockTokenControllerMockSync.RUnlock() + return calls +} + +var ( + lockTokenInterfaceMockAddClusterScopedHandler sync.RWMutex + lockTokenInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockTokenInterfaceMockAddHandler sync.RWMutex + lockTokenInterfaceMockAddLifecycle sync.RWMutex + lockTokenInterfaceMockController sync.RWMutex + lockTokenInterfaceMockCreate sync.RWMutex + lockTokenInterfaceMockDelete sync.RWMutex + lockTokenInterfaceMockDeleteCollection sync.RWMutex + lockTokenInterfaceMockDeleteNamespaced sync.RWMutex + lockTokenInterfaceMockGet sync.RWMutex + lockTokenInterfaceMockGetNamespaced sync.RWMutex + lockTokenInterfaceMockList sync.RWMutex + lockTokenInterfaceMockObjectClient sync.RWMutex + lockTokenInterfaceMockUpdate sync.RWMutex + lockTokenInterfaceMockWatch sync.RWMutex +) + +// Ensure, that TokenInterfaceMock does implement TokenInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.TokenInterface = &TokenInterfaceMock{} + +// TokenInterfaceMock is a mock implementation of TokenInterface. +// +// func TestSomethingThatUsesTokenInterface(t *testing.T) { +// +// // make and configure a mocked TokenInterface +// mockedTokenInterface := &TokenInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.TokenHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.TokenLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.TokenHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.TokenLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.TokenController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.Token) (*v3.Token, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.Token, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.Token, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.TokenList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.Token) (*v3.Token, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedTokenInterface in code that requires TokenInterface +// // and then make assertions. +// +// } +type TokenInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.TokenHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.TokenLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.TokenHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.TokenLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.TokenController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.Token) (*v3.Token, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.Token, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.Token, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.TokenList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.Token) (*v3.Token, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.TokenHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.TokenLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.TokenHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.TokenLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.Token + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.Token + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *TokenInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.TokenHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("TokenInterfaceMock.AddClusterScopedHandlerFunc: method is nil but TokenInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.TokenHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockTokenInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockTokenInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedTokenInterface.AddClusterScopedHandlerCalls()) +func (mock *TokenInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.TokenHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.TokenHandlerFunc + } + lockTokenInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockTokenInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *TokenInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.TokenLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("TokenInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but TokenInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.TokenLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockTokenInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockTokenInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedTokenInterface.AddClusterScopedLifecycleCalls()) +func (mock *TokenInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.TokenLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.TokenLifecycle + } + lockTokenInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockTokenInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *TokenInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.TokenHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("TokenInterfaceMock.AddHandlerFunc: method is nil but TokenInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.TokenHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockTokenInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockTokenInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedTokenInterface.AddHandlerCalls()) +func (mock *TokenInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.TokenHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.TokenHandlerFunc + } + lockTokenInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockTokenInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *TokenInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.TokenLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("TokenInterfaceMock.AddLifecycleFunc: method is nil but TokenInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.TokenLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockTokenInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockTokenInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedTokenInterface.AddLifecycleCalls()) +func (mock *TokenInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.TokenLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.TokenLifecycle + } + lockTokenInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockTokenInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *TokenInterfaceMock) Controller() v3.TokenController { + if mock.ControllerFunc == nil { + panic("TokenInterfaceMock.ControllerFunc: method is nil but TokenInterface.Controller was just called") + } + callInfo := struct { + }{} + lockTokenInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockTokenInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedTokenInterface.ControllerCalls()) +func (mock *TokenInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockTokenInterfaceMockController.RLock() + calls = mock.calls.Controller + lockTokenInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *TokenInterfaceMock) Create(in1 *v3.Token) (*v3.Token, error) { + if mock.CreateFunc == nil { + panic("TokenInterfaceMock.CreateFunc: method is nil but TokenInterface.Create was just called") + } + callInfo := struct { + In1 *v3.Token + }{ + In1: in1, + } + lockTokenInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockTokenInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedTokenInterface.CreateCalls()) +func (mock *TokenInterfaceMock) CreateCalls() []struct { + In1 *v3.Token +} { + var calls []struct { + In1 *v3.Token + } + lockTokenInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockTokenInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *TokenInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("TokenInterfaceMock.DeleteFunc: method is nil but TokenInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockTokenInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockTokenInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedTokenInterface.DeleteCalls()) +func (mock *TokenInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockTokenInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockTokenInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *TokenInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("TokenInterfaceMock.DeleteCollectionFunc: method is nil but TokenInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockTokenInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockTokenInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedTokenInterface.DeleteCollectionCalls()) +func (mock *TokenInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockTokenInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockTokenInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *TokenInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("TokenInterfaceMock.DeleteNamespacedFunc: method is nil but TokenInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockTokenInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockTokenInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedTokenInterface.DeleteNamespacedCalls()) +func (mock *TokenInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockTokenInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockTokenInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *TokenInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.Token, error) { + if mock.GetFunc == nil { + panic("TokenInterfaceMock.GetFunc: method is nil but TokenInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockTokenInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockTokenInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedTokenInterface.GetCalls()) +func (mock *TokenInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockTokenInterfaceMockGet.RLock() + calls = mock.calls.Get + lockTokenInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *TokenInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.Token, error) { + if mock.GetNamespacedFunc == nil { + panic("TokenInterfaceMock.GetNamespacedFunc: method is nil but TokenInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockTokenInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockTokenInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedTokenInterface.GetNamespacedCalls()) +func (mock *TokenInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockTokenInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockTokenInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *TokenInterfaceMock) List(opts v1.ListOptions) (*v3.TokenList, error) { + if mock.ListFunc == nil { + panic("TokenInterfaceMock.ListFunc: method is nil but TokenInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockTokenInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockTokenInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedTokenInterface.ListCalls()) +func (mock *TokenInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockTokenInterfaceMockList.RLock() + calls = mock.calls.List + lockTokenInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *TokenInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("TokenInterfaceMock.ObjectClientFunc: method is nil but TokenInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockTokenInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockTokenInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedTokenInterface.ObjectClientCalls()) +func (mock *TokenInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockTokenInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockTokenInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *TokenInterfaceMock) Update(in1 *v3.Token) (*v3.Token, error) { + if mock.UpdateFunc == nil { + panic("TokenInterfaceMock.UpdateFunc: method is nil but TokenInterface.Update was just called") + } + callInfo := struct { + In1 *v3.Token + }{ + In1: in1, + } + lockTokenInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockTokenInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedTokenInterface.UpdateCalls()) +func (mock *TokenInterfaceMock) UpdateCalls() []struct { + In1 *v3.Token +} { + var calls []struct { + In1 *v3.Token + } + lockTokenInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockTokenInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *TokenInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("TokenInterfaceMock.WatchFunc: method is nil but TokenInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockTokenInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockTokenInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedTokenInterface.WatchCalls()) +func (mock *TokenInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockTokenInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockTokenInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockTokensGetterMockTokens sync.RWMutex +) + +// Ensure, that TokensGetterMock does implement TokensGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.TokensGetter = &TokensGetterMock{} + +// TokensGetterMock is a mock implementation of TokensGetter. +// +// func TestSomethingThatUsesTokensGetter(t *testing.T) { +// +// // make and configure a mocked TokensGetter +// mockedTokensGetter := &TokensGetterMock{ +// TokensFunc: func(namespace string) v3.TokenInterface { +// panic("mock out the Tokens method") +// }, +// } +// +// // use mockedTokensGetter in code that requires TokensGetter +// // and then make assertions. +// +// } +type TokensGetterMock struct { + // TokensFunc mocks the Tokens method. + TokensFunc func(namespace string) v3.TokenInterface + + // calls tracks calls to the methods. + calls struct { + // Tokens holds details about calls to the Tokens method. + Tokens []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// Tokens calls TokensFunc. +func (mock *TokensGetterMock) Tokens(namespace string) v3.TokenInterface { + if mock.TokensFunc == nil { + panic("TokensGetterMock.TokensFunc: method is nil but TokensGetter.Tokens was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockTokensGetterMockTokens.Lock() + mock.calls.Tokens = append(mock.calls.Tokens, callInfo) + lockTokensGetterMockTokens.Unlock() + return mock.TokensFunc(namespace) +} + +// TokensCalls gets all the calls that were made to Tokens. +// Check the length with: +// len(mockedTokensGetter.TokensCalls()) +func (mock *TokensGetterMock) TokensCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockTokensGetterMockTokens.RLock() + calls = mock.calls.Tokens + lockTokensGetterMockTokens.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_user_attribute_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_user_attribute_mock_test.go new file mode 100644 index 00000000..f72ae570 --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_user_attribute_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockUserAttributeListerMockGet sync.RWMutex + lockUserAttributeListerMockList sync.RWMutex +) + +// Ensure, that UserAttributeListerMock does implement UserAttributeLister. +// If this is not the case, regenerate this file with moq. +var _ v3.UserAttributeLister = &UserAttributeListerMock{} + +// UserAttributeListerMock is a mock implementation of UserAttributeLister. +// +// func TestSomethingThatUsesUserAttributeLister(t *testing.T) { +// +// // make and configure a mocked UserAttributeLister +// mockedUserAttributeLister := &UserAttributeListerMock{ +// GetFunc: func(namespace string, name string) (*v3.UserAttribute, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.UserAttribute, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedUserAttributeLister in code that requires UserAttributeLister +// // and then make assertions. +// +// } +type UserAttributeListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.UserAttribute, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.UserAttribute, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *UserAttributeListerMock) Get(namespace string, name string) (*v3.UserAttribute, error) { + if mock.GetFunc == nil { + panic("UserAttributeListerMock.GetFunc: method is nil but UserAttributeLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockUserAttributeListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockUserAttributeListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedUserAttributeLister.GetCalls()) +func (mock *UserAttributeListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockUserAttributeListerMockGet.RLock() + calls = mock.calls.Get + lockUserAttributeListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *UserAttributeListerMock) List(namespace string, selector labels.Selector) ([]*v3.UserAttribute, error) { + if mock.ListFunc == nil { + panic("UserAttributeListerMock.ListFunc: method is nil but UserAttributeLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockUserAttributeListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockUserAttributeListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedUserAttributeLister.ListCalls()) +func (mock *UserAttributeListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockUserAttributeListerMockList.RLock() + calls = mock.calls.List + lockUserAttributeListerMockList.RUnlock() + return calls +} + +var ( + lockUserAttributeControllerMockAddClusterScopedHandler sync.RWMutex + lockUserAttributeControllerMockAddHandler sync.RWMutex + lockUserAttributeControllerMockEnqueue sync.RWMutex + lockUserAttributeControllerMockGeneric sync.RWMutex + lockUserAttributeControllerMockInformer sync.RWMutex + lockUserAttributeControllerMockLister sync.RWMutex + lockUserAttributeControllerMockStart sync.RWMutex + lockUserAttributeControllerMockSync sync.RWMutex +) + +// Ensure, that UserAttributeControllerMock does implement UserAttributeController. +// If this is not the case, regenerate this file with moq. +var _ v3.UserAttributeController = &UserAttributeControllerMock{} + +// UserAttributeControllerMock is a mock implementation of UserAttributeController. +// +// func TestSomethingThatUsesUserAttributeController(t *testing.T) { +// +// // make and configure a mocked UserAttributeController +// mockedUserAttributeController := &UserAttributeControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.UserAttributeHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.UserAttributeHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.UserAttributeLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedUserAttributeController in code that requires UserAttributeController +// // and then make assertions. +// +// } +type UserAttributeControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.UserAttributeHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.UserAttributeHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.UserAttributeLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.UserAttributeHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.UserAttributeHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *UserAttributeControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.UserAttributeHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("UserAttributeControllerMock.AddClusterScopedHandlerFunc: method is nil but UserAttributeController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.UserAttributeHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockUserAttributeControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockUserAttributeControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedUserAttributeController.AddClusterScopedHandlerCalls()) +func (mock *UserAttributeControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.UserAttributeHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.UserAttributeHandlerFunc + } + lockUserAttributeControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockUserAttributeControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *UserAttributeControllerMock) AddHandler(ctx context.Context, name string, handler v3.UserAttributeHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("UserAttributeControllerMock.AddHandlerFunc: method is nil but UserAttributeController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.UserAttributeHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockUserAttributeControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockUserAttributeControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedUserAttributeController.AddHandlerCalls()) +func (mock *UserAttributeControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.UserAttributeHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.UserAttributeHandlerFunc + } + lockUserAttributeControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockUserAttributeControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *UserAttributeControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("UserAttributeControllerMock.EnqueueFunc: method is nil but UserAttributeController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockUserAttributeControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockUserAttributeControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedUserAttributeController.EnqueueCalls()) +func (mock *UserAttributeControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockUserAttributeControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockUserAttributeControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *UserAttributeControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("UserAttributeControllerMock.GenericFunc: method is nil but UserAttributeController.Generic was just called") + } + callInfo := struct { + }{} + lockUserAttributeControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockUserAttributeControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedUserAttributeController.GenericCalls()) +func (mock *UserAttributeControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockUserAttributeControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockUserAttributeControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *UserAttributeControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("UserAttributeControllerMock.InformerFunc: method is nil but UserAttributeController.Informer was just called") + } + callInfo := struct { + }{} + lockUserAttributeControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockUserAttributeControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedUserAttributeController.InformerCalls()) +func (mock *UserAttributeControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockUserAttributeControllerMockInformer.RLock() + calls = mock.calls.Informer + lockUserAttributeControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *UserAttributeControllerMock) Lister() v3.UserAttributeLister { + if mock.ListerFunc == nil { + panic("UserAttributeControllerMock.ListerFunc: method is nil but UserAttributeController.Lister was just called") + } + callInfo := struct { + }{} + lockUserAttributeControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockUserAttributeControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedUserAttributeController.ListerCalls()) +func (mock *UserAttributeControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockUserAttributeControllerMockLister.RLock() + calls = mock.calls.Lister + lockUserAttributeControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *UserAttributeControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("UserAttributeControllerMock.StartFunc: method is nil but UserAttributeController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockUserAttributeControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockUserAttributeControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedUserAttributeController.StartCalls()) +func (mock *UserAttributeControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockUserAttributeControllerMockStart.RLock() + calls = mock.calls.Start + lockUserAttributeControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *UserAttributeControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("UserAttributeControllerMock.SyncFunc: method is nil but UserAttributeController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockUserAttributeControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockUserAttributeControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedUserAttributeController.SyncCalls()) +func (mock *UserAttributeControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockUserAttributeControllerMockSync.RLock() + calls = mock.calls.Sync + lockUserAttributeControllerMockSync.RUnlock() + return calls +} + +var ( + lockUserAttributeInterfaceMockAddClusterScopedHandler sync.RWMutex + lockUserAttributeInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockUserAttributeInterfaceMockAddHandler sync.RWMutex + lockUserAttributeInterfaceMockAddLifecycle sync.RWMutex + lockUserAttributeInterfaceMockController sync.RWMutex + lockUserAttributeInterfaceMockCreate sync.RWMutex + lockUserAttributeInterfaceMockDelete sync.RWMutex + lockUserAttributeInterfaceMockDeleteCollection sync.RWMutex + lockUserAttributeInterfaceMockDeleteNamespaced sync.RWMutex + lockUserAttributeInterfaceMockGet sync.RWMutex + lockUserAttributeInterfaceMockGetNamespaced sync.RWMutex + lockUserAttributeInterfaceMockList sync.RWMutex + lockUserAttributeInterfaceMockObjectClient sync.RWMutex + lockUserAttributeInterfaceMockUpdate sync.RWMutex + lockUserAttributeInterfaceMockWatch sync.RWMutex +) + +// Ensure, that UserAttributeInterfaceMock does implement UserAttributeInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.UserAttributeInterface = &UserAttributeInterfaceMock{} + +// UserAttributeInterfaceMock is a mock implementation of UserAttributeInterface. +// +// func TestSomethingThatUsesUserAttributeInterface(t *testing.T) { +// +// // make and configure a mocked UserAttributeInterface +// mockedUserAttributeInterface := &UserAttributeInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.UserAttributeHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.UserAttributeLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.UserAttributeHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.UserAttributeLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.UserAttributeController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.UserAttribute) (*v3.UserAttribute, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.UserAttribute, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.UserAttribute, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.UserAttributeList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.UserAttribute) (*v3.UserAttribute, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedUserAttributeInterface in code that requires UserAttributeInterface +// // and then make assertions. +// +// } +type UserAttributeInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.UserAttributeHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.UserAttributeLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.UserAttributeHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.UserAttributeLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.UserAttributeController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.UserAttribute) (*v3.UserAttribute, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.UserAttribute, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.UserAttribute, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.UserAttributeList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.UserAttribute) (*v3.UserAttribute, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.UserAttributeHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.UserAttributeLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.UserAttributeHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.UserAttributeLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.UserAttribute + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.UserAttribute + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *UserAttributeInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.UserAttributeHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("UserAttributeInterfaceMock.AddClusterScopedHandlerFunc: method is nil but UserAttributeInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.UserAttributeHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockUserAttributeInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockUserAttributeInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedUserAttributeInterface.AddClusterScopedHandlerCalls()) +func (mock *UserAttributeInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.UserAttributeHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.UserAttributeHandlerFunc + } + lockUserAttributeInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockUserAttributeInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *UserAttributeInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.UserAttributeLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("UserAttributeInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but UserAttributeInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.UserAttributeLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockUserAttributeInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockUserAttributeInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedUserAttributeInterface.AddClusterScopedLifecycleCalls()) +func (mock *UserAttributeInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.UserAttributeLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.UserAttributeLifecycle + } + lockUserAttributeInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockUserAttributeInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *UserAttributeInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.UserAttributeHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("UserAttributeInterfaceMock.AddHandlerFunc: method is nil but UserAttributeInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.UserAttributeHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockUserAttributeInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockUserAttributeInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedUserAttributeInterface.AddHandlerCalls()) +func (mock *UserAttributeInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.UserAttributeHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.UserAttributeHandlerFunc + } + lockUserAttributeInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockUserAttributeInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *UserAttributeInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.UserAttributeLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("UserAttributeInterfaceMock.AddLifecycleFunc: method is nil but UserAttributeInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.UserAttributeLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockUserAttributeInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockUserAttributeInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedUserAttributeInterface.AddLifecycleCalls()) +func (mock *UserAttributeInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.UserAttributeLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.UserAttributeLifecycle + } + lockUserAttributeInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockUserAttributeInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *UserAttributeInterfaceMock) Controller() v3.UserAttributeController { + if mock.ControllerFunc == nil { + panic("UserAttributeInterfaceMock.ControllerFunc: method is nil but UserAttributeInterface.Controller was just called") + } + callInfo := struct { + }{} + lockUserAttributeInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockUserAttributeInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedUserAttributeInterface.ControllerCalls()) +func (mock *UserAttributeInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockUserAttributeInterfaceMockController.RLock() + calls = mock.calls.Controller + lockUserAttributeInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *UserAttributeInterfaceMock) Create(in1 *v3.UserAttribute) (*v3.UserAttribute, error) { + if mock.CreateFunc == nil { + panic("UserAttributeInterfaceMock.CreateFunc: method is nil but UserAttributeInterface.Create was just called") + } + callInfo := struct { + In1 *v3.UserAttribute + }{ + In1: in1, + } + lockUserAttributeInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockUserAttributeInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedUserAttributeInterface.CreateCalls()) +func (mock *UserAttributeInterfaceMock) CreateCalls() []struct { + In1 *v3.UserAttribute +} { + var calls []struct { + In1 *v3.UserAttribute + } + lockUserAttributeInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockUserAttributeInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *UserAttributeInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("UserAttributeInterfaceMock.DeleteFunc: method is nil but UserAttributeInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockUserAttributeInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockUserAttributeInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedUserAttributeInterface.DeleteCalls()) +func (mock *UserAttributeInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockUserAttributeInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockUserAttributeInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *UserAttributeInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("UserAttributeInterfaceMock.DeleteCollectionFunc: method is nil but UserAttributeInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockUserAttributeInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockUserAttributeInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedUserAttributeInterface.DeleteCollectionCalls()) +func (mock *UserAttributeInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockUserAttributeInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockUserAttributeInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *UserAttributeInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("UserAttributeInterfaceMock.DeleteNamespacedFunc: method is nil but UserAttributeInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockUserAttributeInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockUserAttributeInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedUserAttributeInterface.DeleteNamespacedCalls()) +func (mock *UserAttributeInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockUserAttributeInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockUserAttributeInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *UserAttributeInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.UserAttribute, error) { + if mock.GetFunc == nil { + panic("UserAttributeInterfaceMock.GetFunc: method is nil but UserAttributeInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockUserAttributeInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockUserAttributeInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedUserAttributeInterface.GetCalls()) +func (mock *UserAttributeInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockUserAttributeInterfaceMockGet.RLock() + calls = mock.calls.Get + lockUserAttributeInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *UserAttributeInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.UserAttribute, error) { + if mock.GetNamespacedFunc == nil { + panic("UserAttributeInterfaceMock.GetNamespacedFunc: method is nil but UserAttributeInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockUserAttributeInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockUserAttributeInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedUserAttributeInterface.GetNamespacedCalls()) +func (mock *UserAttributeInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockUserAttributeInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockUserAttributeInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *UserAttributeInterfaceMock) List(opts v1.ListOptions) (*v3.UserAttributeList, error) { + if mock.ListFunc == nil { + panic("UserAttributeInterfaceMock.ListFunc: method is nil but UserAttributeInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockUserAttributeInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockUserAttributeInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedUserAttributeInterface.ListCalls()) +func (mock *UserAttributeInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockUserAttributeInterfaceMockList.RLock() + calls = mock.calls.List + lockUserAttributeInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *UserAttributeInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("UserAttributeInterfaceMock.ObjectClientFunc: method is nil but UserAttributeInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockUserAttributeInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockUserAttributeInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedUserAttributeInterface.ObjectClientCalls()) +func (mock *UserAttributeInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockUserAttributeInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockUserAttributeInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *UserAttributeInterfaceMock) Update(in1 *v3.UserAttribute) (*v3.UserAttribute, error) { + if mock.UpdateFunc == nil { + panic("UserAttributeInterfaceMock.UpdateFunc: method is nil but UserAttributeInterface.Update was just called") + } + callInfo := struct { + In1 *v3.UserAttribute + }{ + In1: in1, + } + lockUserAttributeInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockUserAttributeInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedUserAttributeInterface.UpdateCalls()) +func (mock *UserAttributeInterfaceMock) UpdateCalls() []struct { + In1 *v3.UserAttribute +} { + var calls []struct { + In1 *v3.UserAttribute + } + lockUserAttributeInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockUserAttributeInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *UserAttributeInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("UserAttributeInterfaceMock.WatchFunc: method is nil but UserAttributeInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockUserAttributeInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockUserAttributeInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedUserAttributeInterface.WatchCalls()) +func (mock *UserAttributeInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockUserAttributeInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockUserAttributeInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockUserAttributesGetterMockUserAttributes sync.RWMutex +) + +// Ensure, that UserAttributesGetterMock does implement UserAttributesGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.UserAttributesGetter = &UserAttributesGetterMock{} + +// UserAttributesGetterMock is a mock implementation of UserAttributesGetter. +// +// func TestSomethingThatUsesUserAttributesGetter(t *testing.T) { +// +// // make and configure a mocked UserAttributesGetter +// mockedUserAttributesGetter := &UserAttributesGetterMock{ +// UserAttributesFunc: func(namespace string) v3.UserAttributeInterface { +// panic("mock out the UserAttributes method") +// }, +// } +// +// // use mockedUserAttributesGetter in code that requires UserAttributesGetter +// // and then make assertions. +// +// } +type UserAttributesGetterMock struct { + // UserAttributesFunc mocks the UserAttributes method. + UserAttributesFunc func(namespace string) v3.UserAttributeInterface + + // calls tracks calls to the methods. + calls struct { + // UserAttributes holds details about calls to the UserAttributes method. + UserAttributes []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// UserAttributes calls UserAttributesFunc. +func (mock *UserAttributesGetterMock) UserAttributes(namespace string) v3.UserAttributeInterface { + if mock.UserAttributesFunc == nil { + panic("UserAttributesGetterMock.UserAttributesFunc: method is nil but UserAttributesGetter.UserAttributes was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockUserAttributesGetterMockUserAttributes.Lock() + mock.calls.UserAttributes = append(mock.calls.UserAttributes, callInfo) + lockUserAttributesGetterMockUserAttributes.Unlock() + return mock.UserAttributesFunc(namespace) +} + +// UserAttributesCalls gets all the calls that were made to UserAttributes. +// Check the length with: +// len(mockedUserAttributesGetter.UserAttributesCalls()) +func (mock *UserAttributesGetterMock) UserAttributesCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockUserAttributesGetterMockUserAttributes.RLock() + calls = mock.calls.UserAttributes + lockUserAttributesGetterMockUserAttributes.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_user_mock_test.go b/apis/management.cattle.io/v3/fakes/zz_generated_user_mock_test.go new file mode 100644 index 00000000..737905f2 --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_user_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockUserListerMockGet sync.RWMutex + lockUserListerMockList sync.RWMutex +) + +// Ensure, that UserListerMock does implement UserLister. +// If this is not the case, regenerate this file with moq. +var _ v3.UserLister = &UserListerMock{} + +// UserListerMock is a mock implementation of UserLister. +// +// func TestSomethingThatUsesUserLister(t *testing.T) { +// +// // make and configure a mocked UserLister +// mockedUserLister := &UserListerMock{ +// GetFunc: func(namespace string, name string) (*v3.User, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.User, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedUserLister in code that requires UserLister +// // and then make assertions. +// +// } +type UserListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.User, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.User, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *UserListerMock) Get(namespace string, name string) (*v3.User, error) { + if mock.GetFunc == nil { + panic("UserListerMock.GetFunc: method is nil but UserLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockUserListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockUserListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedUserLister.GetCalls()) +func (mock *UserListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockUserListerMockGet.RLock() + calls = mock.calls.Get + lockUserListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *UserListerMock) List(namespace string, selector labels.Selector) ([]*v3.User, error) { + if mock.ListFunc == nil { + panic("UserListerMock.ListFunc: method is nil but UserLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockUserListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockUserListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedUserLister.ListCalls()) +func (mock *UserListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockUserListerMockList.RLock() + calls = mock.calls.List + lockUserListerMockList.RUnlock() + return calls +} + +var ( + lockUserControllerMockAddClusterScopedHandler sync.RWMutex + lockUserControllerMockAddHandler sync.RWMutex + lockUserControllerMockEnqueue sync.RWMutex + lockUserControllerMockGeneric sync.RWMutex + lockUserControllerMockInformer sync.RWMutex + lockUserControllerMockLister sync.RWMutex + lockUserControllerMockStart sync.RWMutex + lockUserControllerMockSync sync.RWMutex +) + +// Ensure, that UserControllerMock does implement UserController. +// If this is not the case, regenerate this file with moq. +var _ v3.UserController = &UserControllerMock{} + +// UserControllerMock is a mock implementation of UserController. +// +// func TestSomethingThatUsesUserController(t *testing.T) { +// +// // make and configure a mocked UserController +// mockedUserController := &UserControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.UserHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.UserHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.UserLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedUserController in code that requires UserController +// // and then make assertions. +// +// } +type UserControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.UserHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.UserHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.UserLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.UserHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.UserHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *UserControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.UserHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("UserControllerMock.AddClusterScopedHandlerFunc: method is nil but UserController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.UserHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockUserControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockUserControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedUserController.AddClusterScopedHandlerCalls()) +func (mock *UserControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.UserHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.UserHandlerFunc + } + lockUserControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockUserControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *UserControllerMock) AddHandler(ctx context.Context, name string, handler v3.UserHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("UserControllerMock.AddHandlerFunc: method is nil but UserController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.UserHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockUserControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockUserControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedUserController.AddHandlerCalls()) +func (mock *UserControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.UserHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.UserHandlerFunc + } + lockUserControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockUserControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *UserControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("UserControllerMock.EnqueueFunc: method is nil but UserController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockUserControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockUserControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedUserController.EnqueueCalls()) +func (mock *UserControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockUserControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockUserControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *UserControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("UserControllerMock.GenericFunc: method is nil but UserController.Generic was just called") + } + callInfo := struct { + }{} + lockUserControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockUserControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedUserController.GenericCalls()) +func (mock *UserControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockUserControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockUserControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *UserControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("UserControllerMock.InformerFunc: method is nil but UserController.Informer was just called") + } + callInfo := struct { + }{} + lockUserControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockUserControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedUserController.InformerCalls()) +func (mock *UserControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockUserControllerMockInformer.RLock() + calls = mock.calls.Informer + lockUserControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *UserControllerMock) Lister() v3.UserLister { + if mock.ListerFunc == nil { + panic("UserControllerMock.ListerFunc: method is nil but UserController.Lister was just called") + } + callInfo := struct { + }{} + lockUserControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockUserControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedUserController.ListerCalls()) +func (mock *UserControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockUserControllerMockLister.RLock() + calls = mock.calls.Lister + lockUserControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *UserControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("UserControllerMock.StartFunc: method is nil but UserController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockUserControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockUserControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedUserController.StartCalls()) +func (mock *UserControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockUserControllerMockStart.RLock() + calls = mock.calls.Start + lockUserControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *UserControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("UserControllerMock.SyncFunc: method is nil but UserController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockUserControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockUserControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedUserController.SyncCalls()) +func (mock *UserControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockUserControllerMockSync.RLock() + calls = mock.calls.Sync + lockUserControllerMockSync.RUnlock() + return calls +} + +var ( + lockUserInterfaceMockAddClusterScopedHandler sync.RWMutex + lockUserInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockUserInterfaceMockAddHandler sync.RWMutex + lockUserInterfaceMockAddLifecycle sync.RWMutex + lockUserInterfaceMockController sync.RWMutex + lockUserInterfaceMockCreate sync.RWMutex + lockUserInterfaceMockDelete sync.RWMutex + lockUserInterfaceMockDeleteCollection sync.RWMutex + lockUserInterfaceMockDeleteNamespaced sync.RWMutex + lockUserInterfaceMockGet sync.RWMutex + lockUserInterfaceMockGetNamespaced sync.RWMutex + lockUserInterfaceMockList sync.RWMutex + lockUserInterfaceMockObjectClient sync.RWMutex + lockUserInterfaceMockUpdate sync.RWMutex + lockUserInterfaceMockWatch sync.RWMutex +) + +// Ensure, that UserInterfaceMock does implement UserInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.UserInterface = &UserInterfaceMock{} + +// UserInterfaceMock is a mock implementation of UserInterface. +// +// func TestSomethingThatUsesUserInterface(t *testing.T) { +// +// // make and configure a mocked UserInterface +// mockedUserInterface := &UserInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.UserHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.UserLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.UserHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.UserLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.UserController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.User) (*v3.User, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.User, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.User, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.UserList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.User) (*v3.User, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedUserInterface in code that requires UserInterface +// // and then make assertions. +// +// } +type UserInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.UserHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.UserLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.UserHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.UserLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.UserController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.User) (*v3.User, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.User, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.User, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.UserList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.User) (*v3.User, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.UserHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.UserLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.UserHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.UserLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.User + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.User + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *UserInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.UserHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("UserInterfaceMock.AddClusterScopedHandlerFunc: method is nil but UserInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.UserHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockUserInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockUserInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedUserInterface.AddClusterScopedHandlerCalls()) +func (mock *UserInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.UserHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.UserHandlerFunc + } + lockUserInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockUserInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *UserInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.UserLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("UserInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but UserInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.UserLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockUserInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockUserInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedUserInterface.AddClusterScopedLifecycleCalls()) +func (mock *UserInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.UserLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.UserLifecycle + } + lockUserInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockUserInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *UserInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.UserHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("UserInterfaceMock.AddHandlerFunc: method is nil but UserInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.UserHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockUserInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockUserInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedUserInterface.AddHandlerCalls()) +func (mock *UserInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.UserHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.UserHandlerFunc + } + lockUserInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockUserInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *UserInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.UserLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("UserInterfaceMock.AddLifecycleFunc: method is nil but UserInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.UserLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockUserInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockUserInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedUserInterface.AddLifecycleCalls()) +func (mock *UserInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.UserLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.UserLifecycle + } + lockUserInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockUserInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *UserInterfaceMock) Controller() v3.UserController { + if mock.ControllerFunc == nil { + panic("UserInterfaceMock.ControllerFunc: method is nil but UserInterface.Controller was just called") + } + callInfo := struct { + }{} + lockUserInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockUserInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedUserInterface.ControllerCalls()) +func (mock *UserInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockUserInterfaceMockController.RLock() + calls = mock.calls.Controller + lockUserInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *UserInterfaceMock) Create(in1 *v3.User) (*v3.User, error) { + if mock.CreateFunc == nil { + panic("UserInterfaceMock.CreateFunc: method is nil but UserInterface.Create was just called") + } + callInfo := struct { + In1 *v3.User + }{ + In1: in1, + } + lockUserInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockUserInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedUserInterface.CreateCalls()) +func (mock *UserInterfaceMock) CreateCalls() []struct { + In1 *v3.User +} { + var calls []struct { + In1 *v3.User + } + lockUserInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockUserInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *UserInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("UserInterfaceMock.DeleteFunc: method is nil but UserInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockUserInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockUserInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedUserInterface.DeleteCalls()) +func (mock *UserInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockUserInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockUserInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *UserInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("UserInterfaceMock.DeleteCollectionFunc: method is nil but UserInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockUserInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockUserInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedUserInterface.DeleteCollectionCalls()) +func (mock *UserInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockUserInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockUserInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *UserInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("UserInterfaceMock.DeleteNamespacedFunc: method is nil but UserInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockUserInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockUserInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedUserInterface.DeleteNamespacedCalls()) +func (mock *UserInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockUserInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockUserInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *UserInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.User, error) { + if mock.GetFunc == nil { + panic("UserInterfaceMock.GetFunc: method is nil but UserInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockUserInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockUserInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedUserInterface.GetCalls()) +func (mock *UserInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockUserInterfaceMockGet.RLock() + calls = mock.calls.Get + lockUserInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *UserInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.User, error) { + if mock.GetNamespacedFunc == nil { + panic("UserInterfaceMock.GetNamespacedFunc: method is nil but UserInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockUserInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockUserInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedUserInterface.GetNamespacedCalls()) +func (mock *UserInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockUserInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockUserInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *UserInterfaceMock) List(opts v1.ListOptions) (*v3.UserList, error) { + if mock.ListFunc == nil { + panic("UserInterfaceMock.ListFunc: method is nil but UserInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockUserInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockUserInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedUserInterface.ListCalls()) +func (mock *UserInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockUserInterfaceMockList.RLock() + calls = mock.calls.List + lockUserInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *UserInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("UserInterfaceMock.ObjectClientFunc: method is nil but UserInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockUserInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockUserInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedUserInterface.ObjectClientCalls()) +func (mock *UserInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockUserInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockUserInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *UserInterfaceMock) Update(in1 *v3.User) (*v3.User, error) { + if mock.UpdateFunc == nil { + panic("UserInterfaceMock.UpdateFunc: method is nil but UserInterface.Update was just called") + } + callInfo := struct { + In1 *v3.User + }{ + In1: in1, + } + lockUserInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockUserInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedUserInterface.UpdateCalls()) +func (mock *UserInterfaceMock) UpdateCalls() []struct { + In1 *v3.User +} { + var calls []struct { + In1 *v3.User + } + lockUserInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockUserInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *UserInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("UserInterfaceMock.WatchFunc: method is nil but UserInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockUserInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockUserInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedUserInterface.WatchCalls()) +func (mock *UserInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockUserInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockUserInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockUsersGetterMockUsers sync.RWMutex +) + +// Ensure, that UsersGetterMock does implement UsersGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.UsersGetter = &UsersGetterMock{} + +// UsersGetterMock is a mock implementation of UsersGetter. +// +// func TestSomethingThatUsesUsersGetter(t *testing.T) { +// +// // make and configure a mocked UsersGetter +// mockedUsersGetter := &UsersGetterMock{ +// UsersFunc: func(namespace string) v3.UserInterface { +// panic("mock out the Users method") +// }, +// } +// +// // use mockedUsersGetter in code that requires UsersGetter +// // and then make assertions. +// +// } +type UsersGetterMock struct { + // UsersFunc mocks the Users method. + UsersFunc func(namespace string) v3.UserInterface + + // calls tracks calls to the methods. + calls struct { + // Users holds details about calls to the Users method. + Users []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// Users calls UsersFunc. +func (mock *UsersGetterMock) Users(namespace string) v3.UserInterface { + if mock.UsersFunc == nil { + panic("UsersGetterMock.UsersFunc: method is nil but UsersGetter.Users was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockUsersGetterMockUsers.Lock() + mock.calls.Users = append(mock.calls.Users, callInfo) + lockUsersGetterMockUsers.Unlock() + return mock.UsersFunc(namespace) +} + +// UsersCalls gets all the calls that were made to Users. +// Check the length with: +// len(mockedUsersGetter.UsersCalls()) +func (mock *UsersGetterMock) UsersCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockUsersGetterMockUsers.RLock() + calls = mock.calls.Users + lockUsersGetterMockUsers.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/zz_generated_auth_config_controller.go b/apis/management.cattle.io/v3/zz_generated_auth_config_controller.go index d27f1bed..c8b5e051 100644 --- a/apis/management.cattle.io/v3/zz_generated_auth_config_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_auth_config_controller.go @@ -39,7 +39,7 @@ func NewAuthConfig(namespace, name string, obj AuthConfig) *AuthConfig { type AuthConfigList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []AuthConfig + Items []AuthConfig `json:"items"` } type AuthConfigHandlerFunc func(key string, obj *AuthConfig) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_catalog_controller.go b/apis/management.cattle.io/v3/zz_generated_catalog_controller.go index a16544eb..eadcf158 100644 --- a/apis/management.cattle.io/v3/zz_generated_catalog_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_catalog_controller.go @@ -39,7 +39,7 @@ func NewCatalog(namespace, name string, obj Catalog) *Catalog { type CatalogList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []Catalog + Items []Catalog `json:"items"` } type CatalogHandlerFunc func(key string, obj *Catalog) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_catalog_template_controller.go b/apis/management.cattle.io/v3/zz_generated_catalog_template_controller.go index f7dfb439..af62c178 100644 --- a/apis/management.cattle.io/v3/zz_generated_catalog_template_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_catalog_template_controller.go @@ -40,7 +40,7 @@ func NewCatalogTemplate(namespace, name string, obj CatalogTemplate) *CatalogTem type CatalogTemplateList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []CatalogTemplate + Items []CatalogTemplate `json:"items"` } type CatalogTemplateHandlerFunc func(key string, obj *CatalogTemplate) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_catalog_template_version_controller.go b/apis/management.cattle.io/v3/zz_generated_catalog_template_version_controller.go index 3ab64c50..28b3a033 100644 --- a/apis/management.cattle.io/v3/zz_generated_catalog_template_version_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_catalog_template_version_controller.go @@ -40,7 +40,7 @@ func NewCatalogTemplateVersion(namespace, name string, obj CatalogTemplateVersio type CatalogTemplateVersionList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []CatalogTemplateVersion + Items []CatalogTemplateVersion `json:"items"` } type CatalogTemplateVersionHandlerFunc func(key string, obj *CatalogTemplateVersion) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_cloud_credential_controller.go b/apis/management.cattle.io/v3/zz_generated_cloud_credential_controller.go index 856002b8..cee6a8c2 100644 --- a/apis/management.cattle.io/v3/zz_generated_cloud_credential_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_cloud_credential_controller.go @@ -40,7 +40,7 @@ func NewCloudCredential(namespace, name string, obj CloudCredential) *CloudCrede type CloudCredentialList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []CloudCredential + Items []CloudCredential `json:"items"` } type CloudCredentialHandlerFunc func(key string, obj *CloudCredential) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_cluster_alert_controller.go b/apis/management.cattle.io/v3/zz_generated_cluster_alert_controller.go index 5ac5f067..d5221694 100644 --- a/apis/management.cattle.io/v3/zz_generated_cluster_alert_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_cluster_alert_controller.go @@ -40,7 +40,7 @@ func NewClusterAlert(namespace, name string, obj ClusterAlert) *ClusterAlert { type ClusterAlertList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []ClusterAlert + Items []ClusterAlert `json:"items"` } type ClusterAlertHandlerFunc func(key string, obj *ClusterAlert) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_cluster_alert_group_controller.go b/apis/management.cattle.io/v3/zz_generated_cluster_alert_group_controller.go index 7efdd5ef..1a2e2901 100644 --- a/apis/management.cattle.io/v3/zz_generated_cluster_alert_group_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_cluster_alert_group_controller.go @@ -40,7 +40,7 @@ func NewClusterAlertGroup(namespace, name string, obj ClusterAlertGroup) *Cluste type ClusterAlertGroupList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []ClusterAlertGroup + Items []ClusterAlertGroup `json:"items"` } type ClusterAlertGroupHandlerFunc func(key string, obj *ClusterAlertGroup) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_cluster_alert_rule_controller.go b/apis/management.cattle.io/v3/zz_generated_cluster_alert_rule_controller.go index f5bd6779..dfb438b3 100644 --- a/apis/management.cattle.io/v3/zz_generated_cluster_alert_rule_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_cluster_alert_rule_controller.go @@ -40,7 +40,7 @@ func NewClusterAlertRule(namespace, name string, obj ClusterAlertRule) *ClusterA type ClusterAlertRuleList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []ClusterAlertRule + Items []ClusterAlertRule `json:"items"` } type ClusterAlertRuleHandlerFunc func(key string, obj *ClusterAlertRule) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_cluster_catalog_controller.go b/apis/management.cattle.io/v3/zz_generated_cluster_catalog_controller.go index aa91b49e..ba2c27d6 100644 --- a/apis/management.cattle.io/v3/zz_generated_cluster_catalog_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_cluster_catalog_controller.go @@ -40,7 +40,7 @@ func NewClusterCatalog(namespace, name string, obj ClusterCatalog) *ClusterCatal type ClusterCatalogList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []ClusterCatalog + Items []ClusterCatalog `json:"items"` } type ClusterCatalogHandlerFunc func(key string, obj *ClusterCatalog) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_cluster_controller.go b/apis/management.cattle.io/v3/zz_generated_cluster_controller.go index ae2df231..265f7ad2 100644 --- a/apis/management.cattle.io/v3/zz_generated_cluster_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_cluster_controller.go @@ -39,7 +39,7 @@ func NewCluster(namespace, name string, obj Cluster) *Cluster { type ClusterList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []Cluster + Items []Cluster `json:"items"` } type ClusterHandlerFunc func(key string, obj *Cluster) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_cluster_logging_controller.go b/apis/management.cattle.io/v3/zz_generated_cluster_logging_controller.go index bb8bad4b..7db1ce25 100644 --- a/apis/management.cattle.io/v3/zz_generated_cluster_logging_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_cluster_logging_controller.go @@ -40,7 +40,7 @@ func NewClusterLogging(namespace, name string, obj ClusterLogging) *ClusterLoggi type ClusterLoggingList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []ClusterLogging + Items []ClusterLogging `json:"items"` } type ClusterLoggingHandlerFunc func(key string, obj *ClusterLogging) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_cluster_monitor_graph_controller.go b/apis/management.cattle.io/v3/zz_generated_cluster_monitor_graph_controller.go index fe315647..f2baa366 100644 --- a/apis/management.cattle.io/v3/zz_generated_cluster_monitor_graph_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_cluster_monitor_graph_controller.go @@ -40,7 +40,7 @@ func NewClusterMonitorGraph(namespace, name string, obj ClusterMonitorGraph) *Cl type ClusterMonitorGraphList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []ClusterMonitorGraph + Items []ClusterMonitorGraph `json:"items"` } type ClusterMonitorGraphHandlerFunc func(key string, obj *ClusterMonitorGraph) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_cluster_registration_token_controller.go b/apis/management.cattle.io/v3/zz_generated_cluster_registration_token_controller.go index d604b19b..fea5b2fe 100644 --- a/apis/management.cattle.io/v3/zz_generated_cluster_registration_token_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_cluster_registration_token_controller.go @@ -40,7 +40,7 @@ func NewClusterRegistrationToken(namespace, name string, obj ClusterRegistration type ClusterRegistrationTokenList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []ClusterRegistrationToken + Items []ClusterRegistrationToken `json:"items"` } type ClusterRegistrationTokenHandlerFunc func(key string, obj *ClusterRegistrationToken) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_cluster_role_template_binding_controller.go b/apis/management.cattle.io/v3/zz_generated_cluster_role_template_binding_controller.go index 572d8893..0af24cda 100644 --- a/apis/management.cattle.io/v3/zz_generated_cluster_role_template_binding_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_cluster_role_template_binding_controller.go @@ -40,7 +40,7 @@ func NewClusterRoleTemplateBinding(namespace, name string, obj ClusterRoleTempla type ClusterRoleTemplateBindingList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []ClusterRoleTemplateBinding + Items []ClusterRoleTemplateBinding `json:"items"` } type ClusterRoleTemplateBindingHandlerFunc func(key string, obj *ClusterRoleTemplateBinding) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_compose_config_controller.go b/apis/management.cattle.io/v3/zz_generated_compose_config_controller.go index 96e9fbd4..f8339d96 100644 --- a/apis/management.cattle.io/v3/zz_generated_compose_config_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_compose_config_controller.go @@ -39,7 +39,7 @@ func NewComposeConfig(namespace, name string, obj ComposeConfig) *ComposeConfig type ComposeConfigList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []ComposeConfig + Items []ComposeConfig `json:"items"` } type ComposeConfigHandlerFunc func(key string, obj *ComposeConfig) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_dynamic_schema_controller.go b/apis/management.cattle.io/v3/zz_generated_dynamic_schema_controller.go index 2ac34be8..6664085b 100644 --- a/apis/management.cattle.io/v3/zz_generated_dynamic_schema_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_dynamic_schema_controller.go @@ -39,7 +39,7 @@ func NewDynamicSchema(namespace, name string, obj DynamicSchema) *DynamicSchema type DynamicSchemaList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []DynamicSchema + Items []DynamicSchema `json:"items"` } type DynamicSchemaHandlerFunc func(key string, obj *DynamicSchema) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_etcd_backup_controller.go b/apis/management.cattle.io/v3/zz_generated_etcd_backup_controller.go index f4c1dcea..7f6d2beb 100644 --- a/apis/management.cattle.io/v3/zz_generated_etcd_backup_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_etcd_backup_controller.go @@ -40,7 +40,7 @@ func NewEtcdBackup(namespace, name string, obj EtcdBackup) *EtcdBackup { type EtcdBackupList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []EtcdBackup + Items []EtcdBackup `json:"items"` } type EtcdBackupHandlerFunc func(key string, obj *EtcdBackup) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_global_dns_controller.go b/apis/management.cattle.io/v3/zz_generated_global_dns_controller.go index 7f1cfc94..9a3ef26a 100644 --- a/apis/management.cattle.io/v3/zz_generated_global_dns_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_global_dns_controller.go @@ -40,7 +40,7 @@ func NewGlobalDNS(namespace, name string, obj GlobalDNS) *GlobalDNS { type GlobalDNSList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []GlobalDNS + Items []GlobalDNS `json:"items"` } type GlobalDNSHandlerFunc func(key string, obj *GlobalDNS) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_global_dns_provider_controller.go b/apis/management.cattle.io/v3/zz_generated_global_dns_provider_controller.go index f414d535..9f3a6ca6 100644 --- a/apis/management.cattle.io/v3/zz_generated_global_dns_provider_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_global_dns_provider_controller.go @@ -40,7 +40,7 @@ func NewGlobalDNSProvider(namespace, name string, obj GlobalDNSProvider) *Global type GlobalDNSProviderList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []GlobalDNSProvider + Items []GlobalDNSProvider `json:"items"` } type GlobalDNSProviderHandlerFunc func(key string, obj *GlobalDNSProvider) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_global_role_binding_controller.go b/apis/management.cattle.io/v3/zz_generated_global_role_binding_controller.go index 6a156018..887b0f2f 100644 --- a/apis/management.cattle.io/v3/zz_generated_global_role_binding_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_global_role_binding_controller.go @@ -39,7 +39,7 @@ func NewGlobalRoleBinding(namespace, name string, obj GlobalRoleBinding) *Global type GlobalRoleBindingList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []GlobalRoleBinding + Items []GlobalRoleBinding `json:"items"` } type GlobalRoleBindingHandlerFunc func(key string, obj *GlobalRoleBinding) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_global_role_controller.go b/apis/management.cattle.io/v3/zz_generated_global_role_controller.go index c1bd1833..6a72e158 100644 --- a/apis/management.cattle.io/v3/zz_generated_global_role_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_global_role_controller.go @@ -39,7 +39,7 @@ func NewGlobalRole(namespace, name string, obj GlobalRole) *GlobalRole { type GlobalRoleList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []GlobalRole + Items []GlobalRole `json:"items"` } type GlobalRoleHandlerFunc func(key string, obj *GlobalRole) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_group_controller.go b/apis/management.cattle.io/v3/zz_generated_group_controller.go index c1163ddb..c49d3e5c 100644 --- a/apis/management.cattle.io/v3/zz_generated_group_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_group_controller.go @@ -39,7 +39,7 @@ func NewGroup(namespace, name string, obj Group) *Group { type GroupList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []Group + Items []Group `json:"items"` } type GroupHandlerFunc func(key string, obj *Group) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_group_member_controller.go b/apis/management.cattle.io/v3/zz_generated_group_member_controller.go index d72d0bee..4740e07c 100644 --- a/apis/management.cattle.io/v3/zz_generated_group_member_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_group_member_controller.go @@ -39,7 +39,7 @@ func NewGroupMember(namespace, name string, obj GroupMember) *GroupMember { type GroupMemberList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []GroupMember + Items []GroupMember `json:"items"` } type GroupMemberHandlerFunc func(key string, obj *GroupMember) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_kontainer_driver_controller.go b/apis/management.cattle.io/v3/zz_generated_kontainer_driver_controller.go index b23748fa..b389c338 100644 --- a/apis/management.cattle.io/v3/zz_generated_kontainer_driver_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_kontainer_driver_controller.go @@ -39,7 +39,7 @@ func NewKontainerDriver(namespace, name string, obj KontainerDriver) *KontainerD type KontainerDriverList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []KontainerDriver + Items []KontainerDriver `json:"items"` } type KontainerDriverHandlerFunc func(key string, obj *KontainerDriver) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_ldap_config_controller.go b/apis/management.cattle.io/v3/zz_generated_ldap_config_controller.go index 17ba4756..3aea0c48 100644 --- a/apis/management.cattle.io/v3/zz_generated_ldap_config_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_ldap_config_controller.go @@ -39,7 +39,7 @@ func NewLdapConfig(namespace, name string, obj LdapConfig) *LdapConfig { type LdapConfigList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []LdapConfig + Items []LdapConfig `json:"items"` } type LdapConfigHandlerFunc func(key string, obj *LdapConfig) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_listen_config_controller.go b/apis/management.cattle.io/v3/zz_generated_listen_config_controller.go index 481a6e4f..bc89276d 100644 --- a/apis/management.cattle.io/v3/zz_generated_listen_config_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_listen_config_controller.go @@ -39,7 +39,7 @@ func NewListenConfig(namespace, name string, obj ListenConfig) *ListenConfig { type ListenConfigList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []ListenConfig + Items []ListenConfig `json:"items"` } type ListenConfigHandlerFunc func(key string, obj *ListenConfig) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_monitor_metric_controller.go b/apis/management.cattle.io/v3/zz_generated_monitor_metric_controller.go index 9dd4f317..5bbb78f7 100644 --- a/apis/management.cattle.io/v3/zz_generated_monitor_metric_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_monitor_metric_controller.go @@ -40,7 +40,7 @@ func NewMonitorMetric(namespace, name string, obj MonitorMetric) *MonitorMetric type MonitorMetricList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []MonitorMetric + Items []MonitorMetric `json:"items"` } type MonitorMetricHandlerFunc func(key string, obj *MonitorMetric) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_multi_cluster_app_controller.go b/apis/management.cattle.io/v3/zz_generated_multi_cluster_app_controller.go index 1539e430..b4f6ecae 100644 --- a/apis/management.cattle.io/v3/zz_generated_multi_cluster_app_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_multi_cluster_app_controller.go @@ -40,7 +40,7 @@ func NewMultiClusterApp(namespace, name string, obj MultiClusterApp) *MultiClust type MultiClusterAppList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []MultiClusterApp + Items []MultiClusterApp `json:"items"` } type MultiClusterAppHandlerFunc func(key string, obj *MultiClusterApp) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_multi_cluster_app_revision_controller.go b/apis/management.cattle.io/v3/zz_generated_multi_cluster_app_revision_controller.go index 9b01aa4a..a9a5699c 100644 --- a/apis/management.cattle.io/v3/zz_generated_multi_cluster_app_revision_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_multi_cluster_app_revision_controller.go @@ -40,7 +40,7 @@ func NewMultiClusterAppRevision(namespace, name string, obj MultiClusterAppRevis type MultiClusterAppRevisionList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []MultiClusterAppRevision + Items []MultiClusterAppRevision `json:"items"` } type MultiClusterAppRevisionHandlerFunc func(key string, obj *MultiClusterAppRevision) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_node_controller.go b/apis/management.cattle.io/v3/zz_generated_node_controller.go index 894dbbad..08548a89 100644 --- a/apis/management.cattle.io/v3/zz_generated_node_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_node_controller.go @@ -40,7 +40,7 @@ func NewNode(namespace, name string, obj Node) *Node { type NodeList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []Node + Items []Node `json:"items"` } type NodeHandlerFunc func(key string, obj *Node) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_node_driver_controller.go b/apis/management.cattle.io/v3/zz_generated_node_driver_controller.go index c0ca1624..a3234faf 100644 --- a/apis/management.cattle.io/v3/zz_generated_node_driver_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_node_driver_controller.go @@ -39,7 +39,7 @@ func NewNodeDriver(namespace, name string, obj NodeDriver) *NodeDriver { type NodeDriverList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []NodeDriver + Items []NodeDriver `json:"items"` } type NodeDriverHandlerFunc func(key string, obj *NodeDriver) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_node_pool_controller.go b/apis/management.cattle.io/v3/zz_generated_node_pool_controller.go index d1adda35..76089117 100644 --- a/apis/management.cattle.io/v3/zz_generated_node_pool_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_node_pool_controller.go @@ -40,7 +40,7 @@ func NewNodePool(namespace, name string, obj NodePool) *NodePool { type NodePoolList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []NodePool + Items []NodePool `json:"items"` } type NodePoolHandlerFunc func(key string, obj *NodePool) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_node_template_controller.go b/apis/management.cattle.io/v3/zz_generated_node_template_controller.go index 3a837854..b7f4db01 100644 --- a/apis/management.cattle.io/v3/zz_generated_node_template_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_node_template_controller.go @@ -40,7 +40,7 @@ func NewNodeTemplate(namespace, name string, obj NodeTemplate) *NodeTemplate { type NodeTemplateList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []NodeTemplate + Items []NodeTemplate `json:"items"` } type NodeTemplateHandlerFunc func(key string, obj *NodeTemplate) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_notifier_controller.go b/apis/management.cattle.io/v3/zz_generated_notifier_controller.go index ebfc0a34..169647da 100644 --- a/apis/management.cattle.io/v3/zz_generated_notifier_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_notifier_controller.go @@ -40,7 +40,7 @@ func NewNotifier(namespace, name string, obj Notifier) *Notifier { type NotifierList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []Notifier + Items []Notifier `json:"items"` } type NotifierHandlerFunc func(key string, obj *Notifier) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_pod_security_policy_template_controller.go b/apis/management.cattle.io/v3/zz_generated_pod_security_policy_template_controller.go index c2ae64f1..f8108f95 100644 --- a/apis/management.cattle.io/v3/zz_generated_pod_security_policy_template_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_pod_security_policy_template_controller.go @@ -39,7 +39,7 @@ func NewPodSecurityPolicyTemplate(namespace, name string, obj PodSecurityPolicyT type PodSecurityPolicyTemplateList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []PodSecurityPolicyTemplate + Items []PodSecurityPolicyTemplate `json:"items"` } type PodSecurityPolicyTemplateHandlerFunc func(key string, obj *PodSecurityPolicyTemplate) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_pod_security_policy_template_project_binding_controller.go b/apis/management.cattle.io/v3/zz_generated_pod_security_policy_template_project_binding_controller.go index 19617abd..b6cdda94 100644 --- a/apis/management.cattle.io/v3/zz_generated_pod_security_policy_template_project_binding_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_pod_security_policy_template_project_binding_controller.go @@ -40,7 +40,7 @@ func NewPodSecurityPolicyTemplateProjectBinding(namespace, name string, obj PodS type PodSecurityPolicyTemplateProjectBindingList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []PodSecurityPolicyTemplateProjectBinding + Items []PodSecurityPolicyTemplateProjectBinding `json:"items"` } type PodSecurityPolicyTemplateProjectBindingHandlerFunc func(key string, obj *PodSecurityPolicyTemplateProjectBinding) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_preference_controller.go b/apis/management.cattle.io/v3/zz_generated_preference_controller.go index 4b03dbdf..20caa881 100644 --- a/apis/management.cattle.io/v3/zz_generated_preference_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_preference_controller.go @@ -40,7 +40,7 @@ func NewPreference(namespace, name string, obj Preference) *Preference { type PreferenceList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []Preference + Items []Preference `json:"items"` } type PreferenceHandlerFunc func(key string, obj *Preference) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_principal_controller.go b/apis/management.cattle.io/v3/zz_generated_principal_controller.go index cbb0e424..41d8b11c 100644 --- a/apis/management.cattle.io/v3/zz_generated_principal_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_principal_controller.go @@ -39,7 +39,7 @@ func NewPrincipal(namespace, name string, obj Principal) *Principal { type PrincipalList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []Principal + Items []Principal `json:"items"` } type PrincipalHandlerFunc func(key string, obj *Principal) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_project_alert_controller.go b/apis/management.cattle.io/v3/zz_generated_project_alert_controller.go index 341d5695..431cabb2 100644 --- a/apis/management.cattle.io/v3/zz_generated_project_alert_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_project_alert_controller.go @@ -40,7 +40,7 @@ func NewProjectAlert(namespace, name string, obj ProjectAlert) *ProjectAlert { type ProjectAlertList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []ProjectAlert + Items []ProjectAlert `json:"items"` } type ProjectAlertHandlerFunc func(key string, obj *ProjectAlert) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_project_alert_group_controller.go b/apis/management.cattle.io/v3/zz_generated_project_alert_group_controller.go index fd329cef..ea2c5e92 100644 --- a/apis/management.cattle.io/v3/zz_generated_project_alert_group_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_project_alert_group_controller.go @@ -40,7 +40,7 @@ func NewProjectAlertGroup(namespace, name string, obj ProjectAlertGroup) *Projec type ProjectAlertGroupList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []ProjectAlertGroup + Items []ProjectAlertGroup `json:"items"` } type ProjectAlertGroupHandlerFunc func(key string, obj *ProjectAlertGroup) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_project_alert_rule_controller.go b/apis/management.cattle.io/v3/zz_generated_project_alert_rule_controller.go index cc60dd1e..57385ce0 100644 --- a/apis/management.cattle.io/v3/zz_generated_project_alert_rule_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_project_alert_rule_controller.go @@ -40,7 +40,7 @@ func NewProjectAlertRule(namespace, name string, obj ProjectAlertRule) *ProjectA type ProjectAlertRuleList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []ProjectAlertRule + Items []ProjectAlertRule `json:"items"` } type ProjectAlertRuleHandlerFunc func(key string, obj *ProjectAlertRule) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_project_catalog_controller.go b/apis/management.cattle.io/v3/zz_generated_project_catalog_controller.go index 8da60da9..e848919a 100644 --- a/apis/management.cattle.io/v3/zz_generated_project_catalog_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_project_catalog_controller.go @@ -40,7 +40,7 @@ func NewProjectCatalog(namespace, name string, obj ProjectCatalog) *ProjectCatal type ProjectCatalogList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []ProjectCatalog + Items []ProjectCatalog `json:"items"` } type ProjectCatalogHandlerFunc func(key string, obj *ProjectCatalog) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_project_controller.go b/apis/management.cattle.io/v3/zz_generated_project_controller.go index 6c674e6b..002db00b 100644 --- a/apis/management.cattle.io/v3/zz_generated_project_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_project_controller.go @@ -40,7 +40,7 @@ func NewProject(namespace, name string, obj Project) *Project { type ProjectList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []Project + Items []Project `json:"items"` } type ProjectHandlerFunc func(key string, obj *Project) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_project_logging_controller.go b/apis/management.cattle.io/v3/zz_generated_project_logging_controller.go index 79e6bd50..34340492 100644 --- a/apis/management.cattle.io/v3/zz_generated_project_logging_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_project_logging_controller.go @@ -40,7 +40,7 @@ func NewProjectLogging(namespace, name string, obj ProjectLogging) *ProjectLoggi type ProjectLoggingList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []ProjectLogging + Items []ProjectLogging `json:"items"` } type ProjectLoggingHandlerFunc func(key string, obj *ProjectLogging) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_project_monitor_graph_controller.go b/apis/management.cattle.io/v3/zz_generated_project_monitor_graph_controller.go index acd61808..a2d75023 100644 --- a/apis/management.cattle.io/v3/zz_generated_project_monitor_graph_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_project_monitor_graph_controller.go @@ -40,7 +40,7 @@ func NewProjectMonitorGraph(namespace, name string, obj ProjectMonitorGraph) *Pr type ProjectMonitorGraphList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []ProjectMonitorGraph + Items []ProjectMonitorGraph `json:"items"` } type ProjectMonitorGraphHandlerFunc func(key string, obj *ProjectMonitorGraph) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_project_network_policy_controller.go b/apis/management.cattle.io/v3/zz_generated_project_network_policy_controller.go index 12a051f3..9b4b44cb 100644 --- a/apis/management.cattle.io/v3/zz_generated_project_network_policy_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_project_network_policy_controller.go @@ -40,7 +40,7 @@ func NewProjectNetworkPolicy(namespace, name string, obj ProjectNetworkPolicy) * type ProjectNetworkPolicyList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []ProjectNetworkPolicy + Items []ProjectNetworkPolicy `json:"items"` } type ProjectNetworkPolicyHandlerFunc func(key string, obj *ProjectNetworkPolicy) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_project_role_template_binding_controller.go b/apis/management.cattle.io/v3/zz_generated_project_role_template_binding_controller.go index adfd70f5..55740ec5 100644 --- a/apis/management.cattle.io/v3/zz_generated_project_role_template_binding_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_project_role_template_binding_controller.go @@ -40,7 +40,7 @@ func NewProjectRoleTemplateBinding(namespace, name string, obj ProjectRoleTempla type ProjectRoleTemplateBindingList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []ProjectRoleTemplateBinding + Items []ProjectRoleTemplateBinding `json:"items"` } type ProjectRoleTemplateBindingHandlerFunc func(key string, obj *ProjectRoleTemplateBinding) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_role_template_controller.go b/apis/management.cattle.io/v3/zz_generated_role_template_controller.go index 25b348c4..58964bf4 100644 --- a/apis/management.cattle.io/v3/zz_generated_role_template_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_role_template_controller.go @@ -39,7 +39,7 @@ func NewRoleTemplate(namespace, name string, obj RoleTemplate) *RoleTemplate { type RoleTemplateList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []RoleTemplate + Items []RoleTemplate `json:"items"` } type RoleTemplateHandlerFunc func(key string, obj *RoleTemplate) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_scheme.go b/apis/management.cattle.io/v3/zz_generated_scheme.go index 694d5741..29598f69 100644 --- a/apis/management.cattle.io/v3/zz_generated_scheme.go +++ b/apis/management.cattle.io/v3/zz_generated_scheme.go @@ -1,6 +1,7 @@ package v3 import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) @@ -143,5 +144,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &CloudCredential{}, &CloudCredentialList{}, ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil } diff --git a/apis/management.cattle.io/v3/zz_generated_setting_controller.go b/apis/management.cattle.io/v3/zz_generated_setting_controller.go index 46dc9b6c..571346dd 100644 --- a/apis/management.cattle.io/v3/zz_generated_setting_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_setting_controller.go @@ -39,7 +39,7 @@ func NewSetting(namespace, name string, obj Setting) *Setting { type SettingList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []Setting + Items []Setting `json:"items"` } type SettingHandlerFunc func(key string, obj *Setting) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_template_content_controller.go b/apis/management.cattle.io/v3/zz_generated_template_content_controller.go index 7a94dbab..e8ab44f6 100644 --- a/apis/management.cattle.io/v3/zz_generated_template_content_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_template_content_controller.go @@ -39,7 +39,7 @@ func NewTemplateContent(namespace, name string, obj TemplateContent) *TemplateCo type TemplateContentList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []TemplateContent + Items []TemplateContent `json:"items"` } type TemplateContentHandlerFunc func(key string, obj *TemplateContent) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_template_controller.go b/apis/management.cattle.io/v3/zz_generated_template_controller.go index 5b2b00a1..813577c8 100644 --- a/apis/management.cattle.io/v3/zz_generated_template_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_template_controller.go @@ -39,7 +39,7 @@ func NewTemplate(namespace, name string, obj Template) *Template { type TemplateList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []Template + Items []Template `json:"items"` } type TemplateHandlerFunc func(key string, obj *Template) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_template_version_controller.go b/apis/management.cattle.io/v3/zz_generated_template_version_controller.go index 30894415..9cdb94f1 100644 --- a/apis/management.cattle.io/v3/zz_generated_template_version_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_template_version_controller.go @@ -39,7 +39,7 @@ func NewTemplateVersion(namespace, name string, obj TemplateVersion) *TemplateVe type TemplateVersionList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []TemplateVersion + Items []TemplateVersion `json:"items"` } type TemplateVersionHandlerFunc func(key string, obj *TemplateVersion) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_token_controller.go b/apis/management.cattle.io/v3/zz_generated_token_controller.go index 3ed52f61..28c51d90 100644 --- a/apis/management.cattle.io/v3/zz_generated_token_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_token_controller.go @@ -39,7 +39,7 @@ func NewToken(namespace, name string, obj Token) *Token { type TokenList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []Token + Items []Token `json:"items"` } type TokenHandlerFunc func(key string, obj *Token) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_user_attribute_controller.go b/apis/management.cattle.io/v3/zz_generated_user_attribute_controller.go index ceb057df..562dc0d8 100644 --- a/apis/management.cattle.io/v3/zz_generated_user_attribute_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_user_attribute_controller.go @@ -39,7 +39,7 @@ func NewUserAttribute(namespace, name string, obj UserAttribute) *UserAttribute type UserAttributeList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []UserAttribute + Items []UserAttribute `json:"items"` } type UserAttributeHandlerFunc func(key string, obj *UserAttribute) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3/zz_generated_user_controller.go b/apis/management.cattle.io/v3/zz_generated_user_controller.go index 41cf7fae..91a3c5d6 100644 --- a/apis/management.cattle.io/v3/zz_generated_user_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_user_controller.go @@ -39,7 +39,7 @@ func NewUser(namespace, name string, obj User) *User { type UserList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []User + Items []User `json:"items"` } type UserHandlerFunc func(key string, obj *User) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3public/fakes/zz_generated_auth_provider_mock_test.go b/apis/management.cattle.io/v3public/fakes/zz_generated_auth_provider_mock_test.go new file mode 100644 index 00000000..e90a5c6e --- /dev/null +++ b/apis/management.cattle.io/v3public/fakes/zz_generated_auth_provider_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3public "github.com/rancher/types/apis/management.cattle.io/v3public" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockAuthProviderListerMockGet sync.RWMutex + lockAuthProviderListerMockList sync.RWMutex +) + +// Ensure, that AuthProviderListerMock does implement AuthProviderLister. +// If this is not the case, regenerate this file with moq. +var _ v3public.AuthProviderLister = &AuthProviderListerMock{} + +// AuthProviderListerMock is a mock implementation of AuthProviderLister. +// +// func TestSomethingThatUsesAuthProviderLister(t *testing.T) { +// +// // make and configure a mocked AuthProviderLister +// mockedAuthProviderLister := &AuthProviderListerMock{ +// GetFunc: func(namespace string, name string) (*v3public.AuthProvider, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3public.AuthProvider, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedAuthProviderLister in code that requires AuthProviderLister +// // and then make assertions. +// +// } +type AuthProviderListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3public.AuthProvider, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3public.AuthProvider, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *AuthProviderListerMock) Get(namespace string, name string) (*v3public.AuthProvider, error) { + if mock.GetFunc == nil { + panic("AuthProviderListerMock.GetFunc: method is nil but AuthProviderLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockAuthProviderListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockAuthProviderListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedAuthProviderLister.GetCalls()) +func (mock *AuthProviderListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockAuthProviderListerMockGet.RLock() + calls = mock.calls.Get + lockAuthProviderListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *AuthProviderListerMock) List(namespace string, selector labels.Selector) ([]*v3public.AuthProvider, error) { + if mock.ListFunc == nil { + panic("AuthProviderListerMock.ListFunc: method is nil but AuthProviderLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockAuthProviderListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockAuthProviderListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedAuthProviderLister.ListCalls()) +func (mock *AuthProviderListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockAuthProviderListerMockList.RLock() + calls = mock.calls.List + lockAuthProviderListerMockList.RUnlock() + return calls +} + +var ( + lockAuthProviderControllerMockAddClusterScopedHandler sync.RWMutex + lockAuthProviderControllerMockAddHandler sync.RWMutex + lockAuthProviderControllerMockEnqueue sync.RWMutex + lockAuthProviderControllerMockGeneric sync.RWMutex + lockAuthProviderControllerMockInformer sync.RWMutex + lockAuthProviderControllerMockLister sync.RWMutex + lockAuthProviderControllerMockStart sync.RWMutex + lockAuthProviderControllerMockSync sync.RWMutex +) + +// Ensure, that AuthProviderControllerMock does implement AuthProviderController. +// If this is not the case, regenerate this file with moq. +var _ v3public.AuthProviderController = &AuthProviderControllerMock{} + +// AuthProviderControllerMock is a mock implementation of AuthProviderController. +// +// func TestSomethingThatUsesAuthProviderController(t *testing.T) { +// +// // make and configure a mocked AuthProviderController +// mockedAuthProviderController := &AuthProviderControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3public.AuthProviderHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3public.AuthProviderHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3public.AuthProviderLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedAuthProviderController in code that requires AuthProviderController +// // and then make assertions. +// +// } +type AuthProviderControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3public.AuthProviderHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3public.AuthProviderHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3public.AuthProviderLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3public.AuthProviderHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3public.AuthProviderHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *AuthProviderControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3public.AuthProviderHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("AuthProviderControllerMock.AddClusterScopedHandlerFunc: method is nil but AuthProviderController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3public.AuthProviderHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockAuthProviderControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockAuthProviderControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedAuthProviderController.AddClusterScopedHandlerCalls()) +func (mock *AuthProviderControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3public.AuthProviderHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3public.AuthProviderHandlerFunc + } + lockAuthProviderControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockAuthProviderControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *AuthProviderControllerMock) AddHandler(ctx context.Context, name string, handler v3public.AuthProviderHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("AuthProviderControllerMock.AddHandlerFunc: method is nil but AuthProviderController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3public.AuthProviderHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockAuthProviderControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockAuthProviderControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedAuthProviderController.AddHandlerCalls()) +func (mock *AuthProviderControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3public.AuthProviderHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3public.AuthProviderHandlerFunc + } + lockAuthProviderControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockAuthProviderControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *AuthProviderControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("AuthProviderControllerMock.EnqueueFunc: method is nil but AuthProviderController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockAuthProviderControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockAuthProviderControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedAuthProviderController.EnqueueCalls()) +func (mock *AuthProviderControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockAuthProviderControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockAuthProviderControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *AuthProviderControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("AuthProviderControllerMock.GenericFunc: method is nil but AuthProviderController.Generic was just called") + } + callInfo := struct { + }{} + lockAuthProviderControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockAuthProviderControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedAuthProviderController.GenericCalls()) +func (mock *AuthProviderControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockAuthProviderControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockAuthProviderControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *AuthProviderControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("AuthProviderControllerMock.InformerFunc: method is nil but AuthProviderController.Informer was just called") + } + callInfo := struct { + }{} + lockAuthProviderControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockAuthProviderControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedAuthProviderController.InformerCalls()) +func (mock *AuthProviderControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockAuthProviderControllerMockInformer.RLock() + calls = mock.calls.Informer + lockAuthProviderControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *AuthProviderControllerMock) Lister() v3public.AuthProviderLister { + if mock.ListerFunc == nil { + panic("AuthProviderControllerMock.ListerFunc: method is nil but AuthProviderController.Lister was just called") + } + callInfo := struct { + }{} + lockAuthProviderControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockAuthProviderControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedAuthProviderController.ListerCalls()) +func (mock *AuthProviderControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockAuthProviderControllerMockLister.RLock() + calls = mock.calls.Lister + lockAuthProviderControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *AuthProviderControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("AuthProviderControllerMock.StartFunc: method is nil but AuthProviderController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockAuthProviderControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockAuthProviderControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedAuthProviderController.StartCalls()) +func (mock *AuthProviderControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockAuthProviderControllerMockStart.RLock() + calls = mock.calls.Start + lockAuthProviderControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *AuthProviderControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("AuthProviderControllerMock.SyncFunc: method is nil but AuthProviderController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockAuthProviderControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockAuthProviderControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedAuthProviderController.SyncCalls()) +func (mock *AuthProviderControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockAuthProviderControllerMockSync.RLock() + calls = mock.calls.Sync + lockAuthProviderControllerMockSync.RUnlock() + return calls +} + +var ( + lockAuthProviderInterfaceMockAddClusterScopedHandler sync.RWMutex + lockAuthProviderInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockAuthProviderInterfaceMockAddHandler sync.RWMutex + lockAuthProviderInterfaceMockAddLifecycle sync.RWMutex + lockAuthProviderInterfaceMockController sync.RWMutex + lockAuthProviderInterfaceMockCreate sync.RWMutex + lockAuthProviderInterfaceMockDelete sync.RWMutex + lockAuthProviderInterfaceMockDeleteCollection sync.RWMutex + lockAuthProviderInterfaceMockDeleteNamespaced sync.RWMutex + lockAuthProviderInterfaceMockGet sync.RWMutex + lockAuthProviderInterfaceMockGetNamespaced sync.RWMutex + lockAuthProviderInterfaceMockList sync.RWMutex + lockAuthProviderInterfaceMockObjectClient sync.RWMutex + lockAuthProviderInterfaceMockUpdate sync.RWMutex + lockAuthProviderInterfaceMockWatch sync.RWMutex +) + +// Ensure, that AuthProviderInterfaceMock does implement AuthProviderInterface. +// If this is not the case, regenerate this file with moq. +var _ v3public.AuthProviderInterface = &AuthProviderInterfaceMock{} + +// AuthProviderInterfaceMock is a mock implementation of AuthProviderInterface. +// +// func TestSomethingThatUsesAuthProviderInterface(t *testing.T) { +// +// // make and configure a mocked AuthProviderInterface +// mockedAuthProviderInterface := &AuthProviderInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3public.AuthProviderHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3public.AuthProviderLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3public.AuthProviderHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3public.AuthProviderLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3public.AuthProviderController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3public.AuthProvider) (*v3public.AuthProvider, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3public.AuthProvider, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3public.AuthProvider, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3public.AuthProviderList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3public.AuthProvider) (*v3public.AuthProvider, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedAuthProviderInterface in code that requires AuthProviderInterface +// // and then make assertions. +// +// } +type AuthProviderInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3public.AuthProviderHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3public.AuthProviderLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3public.AuthProviderHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3public.AuthProviderLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3public.AuthProviderController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3public.AuthProvider) (*v3public.AuthProvider, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3public.AuthProvider, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3public.AuthProvider, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3public.AuthProviderList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3public.AuthProvider) (*v3public.AuthProvider, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3public.AuthProviderHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3public.AuthProviderLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3public.AuthProviderHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3public.AuthProviderLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3public.AuthProvider + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3public.AuthProvider + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *AuthProviderInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3public.AuthProviderHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("AuthProviderInterfaceMock.AddClusterScopedHandlerFunc: method is nil but AuthProviderInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3public.AuthProviderHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockAuthProviderInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockAuthProviderInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedAuthProviderInterface.AddClusterScopedHandlerCalls()) +func (mock *AuthProviderInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3public.AuthProviderHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3public.AuthProviderHandlerFunc + } + lockAuthProviderInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockAuthProviderInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *AuthProviderInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3public.AuthProviderLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("AuthProviderInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but AuthProviderInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3public.AuthProviderLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockAuthProviderInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockAuthProviderInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedAuthProviderInterface.AddClusterScopedLifecycleCalls()) +func (mock *AuthProviderInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3public.AuthProviderLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3public.AuthProviderLifecycle + } + lockAuthProviderInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockAuthProviderInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *AuthProviderInterfaceMock) AddHandler(ctx context.Context, name string, sync v3public.AuthProviderHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("AuthProviderInterfaceMock.AddHandlerFunc: method is nil but AuthProviderInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3public.AuthProviderHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockAuthProviderInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockAuthProviderInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedAuthProviderInterface.AddHandlerCalls()) +func (mock *AuthProviderInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3public.AuthProviderHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3public.AuthProviderHandlerFunc + } + lockAuthProviderInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockAuthProviderInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *AuthProviderInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3public.AuthProviderLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("AuthProviderInterfaceMock.AddLifecycleFunc: method is nil but AuthProviderInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3public.AuthProviderLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockAuthProviderInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockAuthProviderInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedAuthProviderInterface.AddLifecycleCalls()) +func (mock *AuthProviderInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3public.AuthProviderLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3public.AuthProviderLifecycle + } + lockAuthProviderInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockAuthProviderInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *AuthProviderInterfaceMock) Controller() v3public.AuthProviderController { + if mock.ControllerFunc == nil { + panic("AuthProviderInterfaceMock.ControllerFunc: method is nil but AuthProviderInterface.Controller was just called") + } + callInfo := struct { + }{} + lockAuthProviderInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockAuthProviderInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedAuthProviderInterface.ControllerCalls()) +func (mock *AuthProviderInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockAuthProviderInterfaceMockController.RLock() + calls = mock.calls.Controller + lockAuthProviderInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *AuthProviderInterfaceMock) Create(in1 *v3public.AuthProvider) (*v3public.AuthProvider, error) { + if mock.CreateFunc == nil { + panic("AuthProviderInterfaceMock.CreateFunc: method is nil but AuthProviderInterface.Create was just called") + } + callInfo := struct { + In1 *v3public.AuthProvider + }{ + In1: in1, + } + lockAuthProviderInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockAuthProviderInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedAuthProviderInterface.CreateCalls()) +func (mock *AuthProviderInterfaceMock) CreateCalls() []struct { + In1 *v3public.AuthProvider +} { + var calls []struct { + In1 *v3public.AuthProvider + } + lockAuthProviderInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockAuthProviderInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *AuthProviderInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("AuthProviderInterfaceMock.DeleteFunc: method is nil but AuthProviderInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockAuthProviderInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockAuthProviderInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedAuthProviderInterface.DeleteCalls()) +func (mock *AuthProviderInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockAuthProviderInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockAuthProviderInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *AuthProviderInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("AuthProviderInterfaceMock.DeleteCollectionFunc: method is nil but AuthProviderInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockAuthProviderInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockAuthProviderInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedAuthProviderInterface.DeleteCollectionCalls()) +func (mock *AuthProviderInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockAuthProviderInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockAuthProviderInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *AuthProviderInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("AuthProviderInterfaceMock.DeleteNamespacedFunc: method is nil but AuthProviderInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockAuthProviderInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockAuthProviderInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedAuthProviderInterface.DeleteNamespacedCalls()) +func (mock *AuthProviderInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockAuthProviderInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockAuthProviderInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *AuthProviderInterfaceMock) Get(name string, opts v1.GetOptions) (*v3public.AuthProvider, error) { + if mock.GetFunc == nil { + panic("AuthProviderInterfaceMock.GetFunc: method is nil but AuthProviderInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockAuthProviderInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockAuthProviderInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedAuthProviderInterface.GetCalls()) +func (mock *AuthProviderInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockAuthProviderInterfaceMockGet.RLock() + calls = mock.calls.Get + lockAuthProviderInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *AuthProviderInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3public.AuthProvider, error) { + if mock.GetNamespacedFunc == nil { + panic("AuthProviderInterfaceMock.GetNamespacedFunc: method is nil but AuthProviderInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockAuthProviderInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockAuthProviderInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedAuthProviderInterface.GetNamespacedCalls()) +func (mock *AuthProviderInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockAuthProviderInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockAuthProviderInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *AuthProviderInterfaceMock) List(opts v1.ListOptions) (*v3public.AuthProviderList, error) { + if mock.ListFunc == nil { + panic("AuthProviderInterfaceMock.ListFunc: method is nil but AuthProviderInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockAuthProviderInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockAuthProviderInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedAuthProviderInterface.ListCalls()) +func (mock *AuthProviderInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockAuthProviderInterfaceMockList.RLock() + calls = mock.calls.List + lockAuthProviderInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *AuthProviderInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("AuthProviderInterfaceMock.ObjectClientFunc: method is nil but AuthProviderInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockAuthProviderInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockAuthProviderInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedAuthProviderInterface.ObjectClientCalls()) +func (mock *AuthProviderInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockAuthProviderInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockAuthProviderInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *AuthProviderInterfaceMock) Update(in1 *v3public.AuthProvider) (*v3public.AuthProvider, error) { + if mock.UpdateFunc == nil { + panic("AuthProviderInterfaceMock.UpdateFunc: method is nil but AuthProviderInterface.Update was just called") + } + callInfo := struct { + In1 *v3public.AuthProvider + }{ + In1: in1, + } + lockAuthProviderInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockAuthProviderInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedAuthProviderInterface.UpdateCalls()) +func (mock *AuthProviderInterfaceMock) UpdateCalls() []struct { + In1 *v3public.AuthProvider +} { + var calls []struct { + In1 *v3public.AuthProvider + } + lockAuthProviderInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockAuthProviderInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *AuthProviderInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("AuthProviderInterfaceMock.WatchFunc: method is nil but AuthProviderInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockAuthProviderInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockAuthProviderInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedAuthProviderInterface.WatchCalls()) +func (mock *AuthProviderInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockAuthProviderInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockAuthProviderInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockAuthProvidersGetterMockAuthProviders sync.RWMutex +) + +// Ensure, that AuthProvidersGetterMock does implement AuthProvidersGetter. +// If this is not the case, regenerate this file with moq. +var _ v3public.AuthProvidersGetter = &AuthProvidersGetterMock{} + +// AuthProvidersGetterMock is a mock implementation of AuthProvidersGetter. +// +// func TestSomethingThatUsesAuthProvidersGetter(t *testing.T) { +// +// // make and configure a mocked AuthProvidersGetter +// mockedAuthProvidersGetter := &AuthProvidersGetterMock{ +// AuthProvidersFunc: func(namespace string) v3public.AuthProviderInterface { +// panic("mock out the AuthProviders method") +// }, +// } +// +// // use mockedAuthProvidersGetter in code that requires AuthProvidersGetter +// // and then make assertions. +// +// } +type AuthProvidersGetterMock struct { + // AuthProvidersFunc mocks the AuthProviders method. + AuthProvidersFunc func(namespace string) v3public.AuthProviderInterface + + // calls tracks calls to the methods. + calls struct { + // AuthProviders holds details about calls to the AuthProviders method. + AuthProviders []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// AuthProviders calls AuthProvidersFunc. +func (mock *AuthProvidersGetterMock) AuthProviders(namespace string) v3public.AuthProviderInterface { + if mock.AuthProvidersFunc == nil { + panic("AuthProvidersGetterMock.AuthProvidersFunc: method is nil but AuthProvidersGetter.AuthProviders was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockAuthProvidersGetterMockAuthProviders.Lock() + mock.calls.AuthProviders = append(mock.calls.AuthProviders, callInfo) + lockAuthProvidersGetterMockAuthProviders.Unlock() + return mock.AuthProvidersFunc(namespace) +} + +// AuthProvidersCalls gets all the calls that were made to AuthProviders. +// Check the length with: +// len(mockedAuthProvidersGetter.AuthProvidersCalls()) +func (mock *AuthProvidersGetterMock) AuthProvidersCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockAuthProvidersGetterMockAuthProviders.RLock() + calls = mock.calls.AuthProviders + lockAuthProvidersGetterMockAuthProviders.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3public/zz_generated_auth_provider_controller.go b/apis/management.cattle.io/v3public/zz_generated_auth_provider_controller.go index 6cc96557..c5b2fc4b 100644 --- a/apis/management.cattle.io/v3public/zz_generated_auth_provider_controller.go +++ b/apis/management.cattle.io/v3public/zz_generated_auth_provider_controller.go @@ -39,7 +39,7 @@ func NewAuthProvider(namespace, name string, obj AuthProvider) *AuthProvider { type AuthProviderList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []AuthProvider + Items []AuthProvider `json:"items"` } type AuthProviderHandlerFunc func(key string, obj *AuthProvider) (runtime.Object, error) diff --git a/apis/management.cattle.io/v3public/zz_generated_scheme.go b/apis/management.cattle.io/v3public/zz_generated_scheme.go index cc5aa9f3..53a5ceaa 100644 --- a/apis/management.cattle.io/v3public/zz_generated_scheme.go +++ b/apis/management.cattle.io/v3public/zz_generated_scheme.go @@ -1,6 +1,7 @@ package v3public import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) @@ -36,5 +37,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &AuthProvider{}, &AuthProviderList{}, ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil } diff --git a/apis/monitoring.coreos.com/v1/fakes/zz_generated_alertmanager_mock_test.go b/apis/monitoring.coreos.com/v1/fakes/zz_generated_alertmanager_mock_test.go new file mode 100644 index 00000000..ec8f67ac --- /dev/null +++ b/apis/monitoring.coreos.com/v1/fakes/zz_generated_alertmanager_mock_test.go @@ -0,0 +1,1357 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + v1 "github.com/coreos/prometheus-operator/pkg/client/monitoring/v1" + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v1a "github.com/rancher/types/apis/monitoring.coreos.com/v1" + v1b "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockAlertmanagerListerMockGet sync.RWMutex + lockAlertmanagerListerMockList sync.RWMutex +) + +// Ensure, that AlertmanagerListerMock does implement AlertmanagerLister. +// If this is not the case, regenerate this file with moq. +var _ v1a.AlertmanagerLister = &AlertmanagerListerMock{} + +// AlertmanagerListerMock is a mock implementation of AlertmanagerLister. +// +// func TestSomethingThatUsesAlertmanagerLister(t *testing.T) { +// +// // make and configure a mocked AlertmanagerLister +// mockedAlertmanagerLister := &AlertmanagerListerMock{ +// GetFunc: func(namespace string, name string) (*v1.Alertmanager, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v1.Alertmanager, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedAlertmanagerLister in code that requires AlertmanagerLister +// // and then make assertions. +// +// } +type AlertmanagerListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v1.Alertmanager, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v1.Alertmanager, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *AlertmanagerListerMock) Get(namespace string, name string) (*v1.Alertmanager, error) { + if mock.GetFunc == nil { + panic("AlertmanagerListerMock.GetFunc: method is nil but AlertmanagerLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockAlertmanagerListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockAlertmanagerListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedAlertmanagerLister.GetCalls()) +func (mock *AlertmanagerListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockAlertmanagerListerMockGet.RLock() + calls = mock.calls.Get + lockAlertmanagerListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *AlertmanagerListerMock) List(namespace string, selector labels.Selector) ([]*v1.Alertmanager, error) { + if mock.ListFunc == nil { + panic("AlertmanagerListerMock.ListFunc: method is nil but AlertmanagerLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockAlertmanagerListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockAlertmanagerListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedAlertmanagerLister.ListCalls()) +func (mock *AlertmanagerListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockAlertmanagerListerMockList.RLock() + calls = mock.calls.List + lockAlertmanagerListerMockList.RUnlock() + return calls +} + +var ( + lockAlertmanagerControllerMockAddClusterScopedHandler sync.RWMutex + lockAlertmanagerControllerMockAddHandler sync.RWMutex + lockAlertmanagerControllerMockEnqueue sync.RWMutex + lockAlertmanagerControllerMockGeneric sync.RWMutex + lockAlertmanagerControllerMockInformer sync.RWMutex + lockAlertmanagerControllerMockLister sync.RWMutex + lockAlertmanagerControllerMockStart sync.RWMutex + lockAlertmanagerControllerMockSync sync.RWMutex +) + +// Ensure, that AlertmanagerControllerMock does implement AlertmanagerController. +// If this is not the case, regenerate this file with moq. +var _ v1a.AlertmanagerController = &AlertmanagerControllerMock{} + +// AlertmanagerControllerMock is a mock implementation of AlertmanagerController. +// +// func TestSomethingThatUsesAlertmanagerController(t *testing.T) { +// +// // make and configure a mocked AlertmanagerController +// mockedAlertmanagerController := &AlertmanagerControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v1a.AlertmanagerHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v1a.AlertmanagerHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v1a.AlertmanagerLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedAlertmanagerController in code that requires AlertmanagerController +// // and then make assertions. +// +// } +type AlertmanagerControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v1a.AlertmanagerHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v1a.AlertmanagerHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v1a.AlertmanagerLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v1a.AlertmanagerHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v1a.AlertmanagerHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *AlertmanagerControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v1a.AlertmanagerHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("AlertmanagerControllerMock.AddClusterScopedHandlerFunc: method is nil but AlertmanagerController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.AlertmanagerHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockAlertmanagerControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockAlertmanagerControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedAlertmanagerController.AddClusterScopedHandlerCalls()) +func (mock *AlertmanagerControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.AlertmanagerHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.AlertmanagerHandlerFunc + } + lockAlertmanagerControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockAlertmanagerControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *AlertmanagerControllerMock) AddHandler(ctx context.Context, name string, handler v1a.AlertmanagerHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("AlertmanagerControllerMock.AddHandlerFunc: method is nil but AlertmanagerController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v1a.AlertmanagerHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockAlertmanagerControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockAlertmanagerControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedAlertmanagerController.AddHandlerCalls()) +func (mock *AlertmanagerControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v1a.AlertmanagerHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v1a.AlertmanagerHandlerFunc + } + lockAlertmanagerControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockAlertmanagerControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *AlertmanagerControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("AlertmanagerControllerMock.EnqueueFunc: method is nil but AlertmanagerController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockAlertmanagerControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockAlertmanagerControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedAlertmanagerController.EnqueueCalls()) +func (mock *AlertmanagerControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockAlertmanagerControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockAlertmanagerControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *AlertmanagerControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("AlertmanagerControllerMock.GenericFunc: method is nil but AlertmanagerController.Generic was just called") + } + callInfo := struct { + }{} + lockAlertmanagerControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockAlertmanagerControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedAlertmanagerController.GenericCalls()) +func (mock *AlertmanagerControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockAlertmanagerControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockAlertmanagerControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *AlertmanagerControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("AlertmanagerControllerMock.InformerFunc: method is nil but AlertmanagerController.Informer was just called") + } + callInfo := struct { + }{} + lockAlertmanagerControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockAlertmanagerControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedAlertmanagerController.InformerCalls()) +func (mock *AlertmanagerControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockAlertmanagerControllerMockInformer.RLock() + calls = mock.calls.Informer + lockAlertmanagerControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *AlertmanagerControllerMock) Lister() v1a.AlertmanagerLister { + if mock.ListerFunc == nil { + panic("AlertmanagerControllerMock.ListerFunc: method is nil but AlertmanagerController.Lister was just called") + } + callInfo := struct { + }{} + lockAlertmanagerControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockAlertmanagerControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedAlertmanagerController.ListerCalls()) +func (mock *AlertmanagerControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockAlertmanagerControllerMockLister.RLock() + calls = mock.calls.Lister + lockAlertmanagerControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *AlertmanagerControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("AlertmanagerControllerMock.StartFunc: method is nil but AlertmanagerController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockAlertmanagerControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockAlertmanagerControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedAlertmanagerController.StartCalls()) +func (mock *AlertmanagerControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockAlertmanagerControllerMockStart.RLock() + calls = mock.calls.Start + lockAlertmanagerControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *AlertmanagerControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("AlertmanagerControllerMock.SyncFunc: method is nil but AlertmanagerController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockAlertmanagerControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockAlertmanagerControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedAlertmanagerController.SyncCalls()) +func (mock *AlertmanagerControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockAlertmanagerControllerMockSync.RLock() + calls = mock.calls.Sync + lockAlertmanagerControllerMockSync.RUnlock() + return calls +} + +var ( + lockAlertmanagerInterfaceMockAddClusterScopedHandler sync.RWMutex + lockAlertmanagerInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockAlertmanagerInterfaceMockAddHandler sync.RWMutex + lockAlertmanagerInterfaceMockAddLifecycle sync.RWMutex + lockAlertmanagerInterfaceMockController sync.RWMutex + lockAlertmanagerInterfaceMockCreate sync.RWMutex + lockAlertmanagerInterfaceMockDelete sync.RWMutex + lockAlertmanagerInterfaceMockDeleteCollection sync.RWMutex + lockAlertmanagerInterfaceMockDeleteNamespaced sync.RWMutex + lockAlertmanagerInterfaceMockGet sync.RWMutex + lockAlertmanagerInterfaceMockGetNamespaced sync.RWMutex + lockAlertmanagerInterfaceMockList sync.RWMutex + lockAlertmanagerInterfaceMockObjectClient sync.RWMutex + lockAlertmanagerInterfaceMockUpdate sync.RWMutex + lockAlertmanagerInterfaceMockWatch sync.RWMutex +) + +// Ensure, that AlertmanagerInterfaceMock does implement AlertmanagerInterface. +// If this is not the case, regenerate this file with moq. +var _ v1a.AlertmanagerInterface = &AlertmanagerInterfaceMock{} + +// AlertmanagerInterfaceMock is a mock implementation of AlertmanagerInterface. +// +// func TestSomethingThatUsesAlertmanagerInterface(t *testing.T) { +// +// // make and configure a mocked AlertmanagerInterface +// mockedAlertmanagerInterface := &AlertmanagerInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v1a.AlertmanagerHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v1a.AlertmanagerLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v1a.AlertmanagerHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v1a.AlertmanagerLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v1a.AlertmanagerController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v1.Alertmanager) (*v1.Alertmanager, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1b.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1b.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1b.GetOptions) (*v1.Alertmanager, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.Alertmanager, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1b.ListOptions) (*v1a.AlertmanagerList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v1.Alertmanager) (*v1.Alertmanager, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1b.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedAlertmanagerInterface in code that requires AlertmanagerInterface +// // and then make assertions. +// +// } +type AlertmanagerInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v1a.AlertmanagerHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v1a.AlertmanagerLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v1a.AlertmanagerHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v1a.AlertmanagerLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v1a.AlertmanagerController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v1.Alertmanager) (*v1.Alertmanager, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1b.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1b.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1b.GetOptions) (*v1.Alertmanager, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.Alertmanager, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1b.ListOptions) (*v1a.AlertmanagerList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v1.Alertmanager) (*v1.Alertmanager, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1b.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v1a.AlertmanagerHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v1a.AlertmanagerLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v1a.AlertmanagerHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v1a.AlertmanagerLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v1.Alertmanager + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1b.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1b.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1b.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1b.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1b.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1b.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1b.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v1.Alertmanager + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1b.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *AlertmanagerInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v1a.AlertmanagerHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("AlertmanagerInterfaceMock.AddClusterScopedHandlerFunc: method is nil but AlertmanagerInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.AlertmanagerHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockAlertmanagerInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockAlertmanagerInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedAlertmanagerInterface.AddClusterScopedHandlerCalls()) +func (mock *AlertmanagerInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.AlertmanagerHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.AlertmanagerHandlerFunc + } + lockAlertmanagerInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockAlertmanagerInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *AlertmanagerInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v1a.AlertmanagerLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("AlertmanagerInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but AlertmanagerInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.AlertmanagerLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockAlertmanagerInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockAlertmanagerInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedAlertmanagerInterface.AddClusterScopedLifecycleCalls()) +func (mock *AlertmanagerInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.AlertmanagerLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.AlertmanagerLifecycle + } + lockAlertmanagerInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockAlertmanagerInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *AlertmanagerInterfaceMock) AddHandler(ctx context.Context, name string, sync v1a.AlertmanagerHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("AlertmanagerInterfaceMock.AddHandlerFunc: method is nil but AlertmanagerInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v1a.AlertmanagerHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockAlertmanagerInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockAlertmanagerInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedAlertmanagerInterface.AddHandlerCalls()) +func (mock *AlertmanagerInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v1a.AlertmanagerHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v1a.AlertmanagerHandlerFunc + } + lockAlertmanagerInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockAlertmanagerInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *AlertmanagerInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v1a.AlertmanagerLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("AlertmanagerInterfaceMock.AddLifecycleFunc: method is nil but AlertmanagerInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v1a.AlertmanagerLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockAlertmanagerInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockAlertmanagerInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedAlertmanagerInterface.AddLifecycleCalls()) +func (mock *AlertmanagerInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v1a.AlertmanagerLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v1a.AlertmanagerLifecycle + } + lockAlertmanagerInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockAlertmanagerInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *AlertmanagerInterfaceMock) Controller() v1a.AlertmanagerController { + if mock.ControllerFunc == nil { + panic("AlertmanagerInterfaceMock.ControllerFunc: method is nil but AlertmanagerInterface.Controller was just called") + } + callInfo := struct { + }{} + lockAlertmanagerInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockAlertmanagerInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedAlertmanagerInterface.ControllerCalls()) +func (mock *AlertmanagerInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockAlertmanagerInterfaceMockController.RLock() + calls = mock.calls.Controller + lockAlertmanagerInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *AlertmanagerInterfaceMock) Create(in1 *v1.Alertmanager) (*v1.Alertmanager, error) { + if mock.CreateFunc == nil { + panic("AlertmanagerInterfaceMock.CreateFunc: method is nil but AlertmanagerInterface.Create was just called") + } + callInfo := struct { + In1 *v1.Alertmanager + }{ + In1: in1, + } + lockAlertmanagerInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockAlertmanagerInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedAlertmanagerInterface.CreateCalls()) +func (mock *AlertmanagerInterfaceMock) CreateCalls() []struct { + In1 *v1.Alertmanager +} { + var calls []struct { + In1 *v1.Alertmanager + } + lockAlertmanagerInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockAlertmanagerInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *AlertmanagerInterfaceMock) Delete(name string, options *v1b.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("AlertmanagerInterfaceMock.DeleteFunc: method is nil but AlertmanagerInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1b.DeleteOptions + }{ + Name: name, + Options: options, + } + lockAlertmanagerInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockAlertmanagerInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedAlertmanagerInterface.DeleteCalls()) +func (mock *AlertmanagerInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1b.DeleteOptions +} { + var calls []struct { + Name string + Options *v1b.DeleteOptions + } + lockAlertmanagerInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockAlertmanagerInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *AlertmanagerInterfaceMock) DeleteCollection(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("AlertmanagerInterfaceMock.DeleteCollectionFunc: method is nil but AlertmanagerInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockAlertmanagerInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockAlertmanagerInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedAlertmanagerInterface.DeleteCollectionCalls()) +func (mock *AlertmanagerInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions +} { + var calls []struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions + } + lockAlertmanagerInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockAlertmanagerInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *AlertmanagerInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1b.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("AlertmanagerInterfaceMock.DeleteNamespacedFunc: method is nil but AlertmanagerInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1b.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockAlertmanagerInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockAlertmanagerInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedAlertmanagerInterface.DeleteNamespacedCalls()) +func (mock *AlertmanagerInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1b.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1b.DeleteOptions + } + lockAlertmanagerInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockAlertmanagerInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *AlertmanagerInterfaceMock) Get(name string, opts v1b.GetOptions) (*v1.Alertmanager, error) { + if mock.GetFunc == nil { + panic("AlertmanagerInterfaceMock.GetFunc: method is nil but AlertmanagerInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1b.GetOptions + }{ + Name: name, + Opts: opts, + } + lockAlertmanagerInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockAlertmanagerInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedAlertmanagerInterface.GetCalls()) +func (mock *AlertmanagerInterfaceMock) GetCalls() []struct { + Name string + Opts v1b.GetOptions +} { + var calls []struct { + Name string + Opts v1b.GetOptions + } + lockAlertmanagerInterfaceMockGet.RLock() + calls = mock.calls.Get + lockAlertmanagerInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *AlertmanagerInterfaceMock) GetNamespaced(namespace string, name string, opts v1b.GetOptions) (*v1.Alertmanager, error) { + if mock.GetNamespacedFunc == nil { + panic("AlertmanagerInterfaceMock.GetNamespacedFunc: method is nil but AlertmanagerInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1b.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockAlertmanagerInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockAlertmanagerInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedAlertmanagerInterface.GetNamespacedCalls()) +func (mock *AlertmanagerInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1b.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1b.GetOptions + } + lockAlertmanagerInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockAlertmanagerInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *AlertmanagerInterfaceMock) List(opts v1b.ListOptions) (*v1a.AlertmanagerList, error) { + if mock.ListFunc == nil { + panic("AlertmanagerInterfaceMock.ListFunc: method is nil but AlertmanagerInterface.List was just called") + } + callInfo := struct { + Opts v1b.ListOptions + }{ + Opts: opts, + } + lockAlertmanagerInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockAlertmanagerInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedAlertmanagerInterface.ListCalls()) +func (mock *AlertmanagerInterfaceMock) ListCalls() []struct { + Opts v1b.ListOptions +} { + var calls []struct { + Opts v1b.ListOptions + } + lockAlertmanagerInterfaceMockList.RLock() + calls = mock.calls.List + lockAlertmanagerInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *AlertmanagerInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("AlertmanagerInterfaceMock.ObjectClientFunc: method is nil but AlertmanagerInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockAlertmanagerInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockAlertmanagerInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedAlertmanagerInterface.ObjectClientCalls()) +func (mock *AlertmanagerInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockAlertmanagerInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockAlertmanagerInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *AlertmanagerInterfaceMock) Update(in1 *v1.Alertmanager) (*v1.Alertmanager, error) { + if mock.UpdateFunc == nil { + panic("AlertmanagerInterfaceMock.UpdateFunc: method is nil but AlertmanagerInterface.Update was just called") + } + callInfo := struct { + In1 *v1.Alertmanager + }{ + In1: in1, + } + lockAlertmanagerInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockAlertmanagerInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedAlertmanagerInterface.UpdateCalls()) +func (mock *AlertmanagerInterfaceMock) UpdateCalls() []struct { + In1 *v1.Alertmanager +} { + var calls []struct { + In1 *v1.Alertmanager + } + lockAlertmanagerInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockAlertmanagerInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *AlertmanagerInterfaceMock) Watch(opts v1b.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("AlertmanagerInterfaceMock.WatchFunc: method is nil but AlertmanagerInterface.Watch was just called") + } + callInfo := struct { + Opts v1b.ListOptions + }{ + Opts: opts, + } + lockAlertmanagerInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockAlertmanagerInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedAlertmanagerInterface.WatchCalls()) +func (mock *AlertmanagerInterfaceMock) WatchCalls() []struct { + Opts v1b.ListOptions +} { + var calls []struct { + Opts v1b.ListOptions + } + lockAlertmanagerInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockAlertmanagerInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockAlertmanagersGetterMockAlertmanagers sync.RWMutex +) + +// Ensure, that AlertmanagersGetterMock does implement AlertmanagersGetter. +// If this is not the case, regenerate this file with moq. +var _ v1a.AlertmanagersGetter = &AlertmanagersGetterMock{} + +// AlertmanagersGetterMock is a mock implementation of AlertmanagersGetter. +// +// func TestSomethingThatUsesAlertmanagersGetter(t *testing.T) { +// +// // make and configure a mocked AlertmanagersGetter +// mockedAlertmanagersGetter := &AlertmanagersGetterMock{ +// AlertmanagersFunc: func(namespace string) v1a.AlertmanagerInterface { +// panic("mock out the Alertmanagers method") +// }, +// } +// +// // use mockedAlertmanagersGetter in code that requires AlertmanagersGetter +// // and then make assertions. +// +// } +type AlertmanagersGetterMock struct { + // AlertmanagersFunc mocks the Alertmanagers method. + AlertmanagersFunc func(namespace string) v1a.AlertmanagerInterface + + // calls tracks calls to the methods. + calls struct { + // Alertmanagers holds details about calls to the Alertmanagers method. + Alertmanagers []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// Alertmanagers calls AlertmanagersFunc. +func (mock *AlertmanagersGetterMock) Alertmanagers(namespace string) v1a.AlertmanagerInterface { + if mock.AlertmanagersFunc == nil { + panic("AlertmanagersGetterMock.AlertmanagersFunc: method is nil but AlertmanagersGetter.Alertmanagers was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockAlertmanagersGetterMockAlertmanagers.Lock() + mock.calls.Alertmanagers = append(mock.calls.Alertmanagers, callInfo) + lockAlertmanagersGetterMockAlertmanagers.Unlock() + return mock.AlertmanagersFunc(namespace) +} + +// AlertmanagersCalls gets all the calls that were made to Alertmanagers. +// Check the length with: +// len(mockedAlertmanagersGetter.AlertmanagersCalls()) +func (mock *AlertmanagersGetterMock) AlertmanagersCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockAlertmanagersGetterMockAlertmanagers.RLock() + calls = mock.calls.Alertmanagers + lockAlertmanagersGetterMockAlertmanagers.RUnlock() + return calls +} diff --git a/apis/monitoring.coreos.com/v1/fakes/zz_generated_prometheus_mock_test.go b/apis/monitoring.coreos.com/v1/fakes/zz_generated_prometheus_mock_test.go new file mode 100644 index 00000000..d15b351e --- /dev/null +++ b/apis/monitoring.coreos.com/v1/fakes/zz_generated_prometheus_mock_test.go @@ -0,0 +1,1357 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + v1 "github.com/coreos/prometheus-operator/pkg/client/monitoring/v1" + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v1a "github.com/rancher/types/apis/monitoring.coreos.com/v1" + v1b "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockPrometheusListerMockGet sync.RWMutex + lockPrometheusListerMockList sync.RWMutex +) + +// Ensure, that PrometheusListerMock does implement PrometheusLister. +// If this is not the case, regenerate this file with moq. +var _ v1a.PrometheusLister = &PrometheusListerMock{} + +// PrometheusListerMock is a mock implementation of PrometheusLister. +// +// func TestSomethingThatUsesPrometheusLister(t *testing.T) { +// +// // make and configure a mocked PrometheusLister +// mockedPrometheusLister := &PrometheusListerMock{ +// GetFunc: func(namespace string, name string) (*v1.Prometheus, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v1.Prometheus, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedPrometheusLister in code that requires PrometheusLister +// // and then make assertions. +// +// } +type PrometheusListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v1.Prometheus, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v1.Prometheus, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *PrometheusListerMock) Get(namespace string, name string) (*v1.Prometheus, error) { + if mock.GetFunc == nil { + panic("PrometheusListerMock.GetFunc: method is nil but PrometheusLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockPrometheusListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockPrometheusListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedPrometheusLister.GetCalls()) +func (mock *PrometheusListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockPrometheusListerMockGet.RLock() + calls = mock.calls.Get + lockPrometheusListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *PrometheusListerMock) List(namespace string, selector labels.Selector) ([]*v1.Prometheus, error) { + if mock.ListFunc == nil { + panic("PrometheusListerMock.ListFunc: method is nil but PrometheusLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockPrometheusListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockPrometheusListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedPrometheusLister.ListCalls()) +func (mock *PrometheusListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockPrometheusListerMockList.RLock() + calls = mock.calls.List + lockPrometheusListerMockList.RUnlock() + return calls +} + +var ( + lockPrometheusControllerMockAddClusterScopedHandler sync.RWMutex + lockPrometheusControllerMockAddHandler sync.RWMutex + lockPrometheusControllerMockEnqueue sync.RWMutex + lockPrometheusControllerMockGeneric sync.RWMutex + lockPrometheusControllerMockInformer sync.RWMutex + lockPrometheusControllerMockLister sync.RWMutex + lockPrometheusControllerMockStart sync.RWMutex + lockPrometheusControllerMockSync sync.RWMutex +) + +// Ensure, that PrometheusControllerMock does implement PrometheusController. +// If this is not the case, regenerate this file with moq. +var _ v1a.PrometheusController = &PrometheusControllerMock{} + +// PrometheusControllerMock is a mock implementation of PrometheusController. +// +// func TestSomethingThatUsesPrometheusController(t *testing.T) { +// +// // make and configure a mocked PrometheusController +// mockedPrometheusController := &PrometheusControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v1a.PrometheusHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v1a.PrometheusHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v1a.PrometheusLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedPrometheusController in code that requires PrometheusController +// // and then make assertions. +// +// } +type PrometheusControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v1a.PrometheusHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v1a.PrometheusHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v1a.PrometheusLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v1a.PrometheusHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v1a.PrometheusHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *PrometheusControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v1a.PrometheusHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("PrometheusControllerMock.AddClusterScopedHandlerFunc: method is nil but PrometheusController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.PrometheusHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockPrometheusControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockPrometheusControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedPrometheusController.AddClusterScopedHandlerCalls()) +func (mock *PrometheusControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.PrometheusHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.PrometheusHandlerFunc + } + lockPrometheusControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockPrometheusControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *PrometheusControllerMock) AddHandler(ctx context.Context, name string, handler v1a.PrometheusHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("PrometheusControllerMock.AddHandlerFunc: method is nil but PrometheusController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v1a.PrometheusHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockPrometheusControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockPrometheusControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedPrometheusController.AddHandlerCalls()) +func (mock *PrometheusControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v1a.PrometheusHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v1a.PrometheusHandlerFunc + } + lockPrometheusControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockPrometheusControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *PrometheusControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("PrometheusControllerMock.EnqueueFunc: method is nil but PrometheusController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockPrometheusControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockPrometheusControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedPrometheusController.EnqueueCalls()) +func (mock *PrometheusControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockPrometheusControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockPrometheusControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *PrometheusControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("PrometheusControllerMock.GenericFunc: method is nil but PrometheusController.Generic was just called") + } + callInfo := struct { + }{} + lockPrometheusControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockPrometheusControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedPrometheusController.GenericCalls()) +func (mock *PrometheusControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockPrometheusControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockPrometheusControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *PrometheusControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("PrometheusControllerMock.InformerFunc: method is nil but PrometheusController.Informer was just called") + } + callInfo := struct { + }{} + lockPrometheusControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockPrometheusControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedPrometheusController.InformerCalls()) +func (mock *PrometheusControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockPrometheusControllerMockInformer.RLock() + calls = mock.calls.Informer + lockPrometheusControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *PrometheusControllerMock) Lister() v1a.PrometheusLister { + if mock.ListerFunc == nil { + panic("PrometheusControllerMock.ListerFunc: method is nil but PrometheusController.Lister was just called") + } + callInfo := struct { + }{} + lockPrometheusControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockPrometheusControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedPrometheusController.ListerCalls()) +func (mock *PrometheusControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockPrometheusControllerMockLister.RLock() + calls = mock.calls.Lister + lockPrometheusControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *PrometheusControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("PrometheusControllerMock.StartFunc: method is nil but PrometheusController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockPrometheusControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockPrometheusControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedPrometheusController.StartCalls()) +func (mock *PrometheusControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockPrometheusControllerMockStart.RLock() + calls = mock.calls.Start + lockPrometheusControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *PrometheusControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("PrometheusControllerMock.SyncFunc: method is nil but PrometheusController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockPrometheusControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockPrometheusControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedPrometheusController.SyncCalls()) +func (mock *PrometheusControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockPrometheusControllerMockSync.RLock() + calls = mock.calls.Sync + lockPrometheusControllerMockSync.RUnlock() + return calls +} + +var ( + lockPrometheusInterfaceMockAddClusterScopedHandler sync.RWMutex + lockPrometheusInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockPrometheusInterfaceMockAddHandler sync.RWMutex + lockPrometheusInterfaceMockAddLifecycle sync.RWMutex + lockPrometheusInterfaceMockController sync.RWMutex + lockPrometheusInterfaceMockCreate sync.RWMutex + lockPrometheusInterfaceMockDelete sync.RWMutex + lockPrometheusInterfaceMockDeleteCollection sync.RWMutex + lockPrometheusInterfaceMockDeleteNamespaced sync.RWMutex + lockPrometheusInterfaceMockGet sync.RWMutex + lockPrometheusInterfaceMockGetNamespaced sync.RWMutex + lockPrometheusInterfaceMockList sync.RWMutex + lockPrometheusInterfaceMockObjectClient sync.RWMutex + lockPrometheusInterfaceMockUpdate sync.RWMutex + lockPrometheusInterfaceMockWatch sync.RWMutex +) + +// Ensure, that PrometheusInterfaceMock does implement PrometheusInterface. +// If this is not the case, regenerate this file with moq. +var _ v1a.PrometheusInterface = &PrometheusInterfaceMock{} + +// PrometheusInterfaceMock is a mock implementation of PrometheusInterface. +// +// func TestSomethingThatUsesPrometheusInterface(t *testing.T) { +// +// // make and configure a mocked PrometheusInterface +// mockedPrometheusInterface := &PrometheusInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v1a.PrometheusHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v1a.PrometheusLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v1a.PrometheusHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v1a.PrometheusLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v1a.PrometheusController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v1.Prometheus) (*v1.Prometheus, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1b.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1b.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1b.GetOptions) (*v1.Prometheus, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.Prometheus, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1b.ListOptions) (*v1a.PrometheusList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v1.Prometheus) (*v1.Prometheus, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1b.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedPrometheusInterface in code that requires PrometheusInterface +// // and then make assertions. +// +// } +type PrometheusInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v1a.PrometheusHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v1a.PrometheusLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v1a.PrometheusHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v1a.PrometheusLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v1a.PrometheusController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v1.Prometheus) (*v1.Prometheus, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1b.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1b.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1b.GetOptions) (*v1.Prometheus, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.Prometheus, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1b.ListOptions) (*v1a.PrometheusList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v1.Prometheus) (*v1.Prometheus, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1b.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v1a.PrometheusHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v1a.PrometheusLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v1a.PrometheusHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v1a.PrometheusLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v1.Prometheus + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1b.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1b.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1b.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1b.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1b.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1b.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1b.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v1.Prometheus + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1b.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *PrometheusInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v1a.PrometheusHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("PrometheusInterfaceMock.AddClusterScopedHandlerFunc: method is nil but PrometheusInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.PrometheusHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockPrometheusInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockPrometheusInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedPrometheusInterface.AddClusterScopedHandlerCalls()) +func (mock *PrometheusInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.PrometheusHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.PrometheusHandlerFunc + } + lockPrometheusInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockPrometheusInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *PrometheusInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v1a.PrometheusLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("PrometheusInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but PrometheusInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.PrometheusLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockPrometheusInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockPrometheusInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedPrometheusInterface.AddClusterScopedLifecycleCalls()) +func (mock *PrometheusInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.PrometheusLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.PrometheusLifecycle + } + lockPrometheusInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockPrometheusInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *PrometheusInterfaceMock) AddHandler(ctx context.Context, name string, sync v1a.PrometheusHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("PrometheusInterfaceMock.AddHandlerFunc: method is nil but PrometheusInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v1a.PrometheusHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockPrometheusInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockPrometheusInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedPrometheusInterface.AddHandlerCalls()) +func (mock *PrometheusInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v1a.PrometheusHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v1a.PrometheusHandlerFunc + } + lockPrometheusInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockPrometheusInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *PrometheusInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v1a.PrometheusLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("PrometheusInterfaceMock.AddLifecycleFunc: method is nil but PrometheusInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v1a.PrometheusLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockPrometheusInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockPrometheusInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedPrometheusInterface.AddLifecycleCalls()) +func (mock *PrometheusInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v1a.PrometheusLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v1a.PrometheusLifecycle + } + lockPrometheusInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockPrometheusInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *PrometheusInterfaceMock) Controller() v1a.PrometheusController { + if mock.ControllerFunc == nil { + panic("PrometheusInterfaceMock.ControllerFunc: method is nil but PrometheusInterface.Controller was just called") + } + callInfo := struct { + }{} + lockPrometheusInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockPrometheusInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedPrometheusInterface.ControllerCalls()) +func (mock *PrometheusInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockPrometheusInterfaceMockController.RLock() + calls = mock.calls.Controller + lockPrometheusInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *PrometheusInterfaceMock) Create(in1 *v1.Prometheus) (*v1.Prometheus, error) { + if mock.CreateFunc == nil { + panic("PrometheusInterfaceMock.CreateFunc: method is nil but PrometheusInterface.Create was just called") + } + callInfo := struct { + In1 *v1.Prometheus + }{ + In1: in1, + } + lockPrometheusInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockPrometheusInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedPrometheusInterface.CreateCalls()) +func (mock *PrometheusInterfaceMock) CreateCalls() []struct { + In1 *v1.Prometheus +} { + var calls []struct { + In1 *v1.Prometheus + } + lockPrometheusInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockPrometheusInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *PrometheusInterfaceMock) Delete(name string, options *v1b.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("PrometheusInterfaceMock.DeleteFunc: method is nil but PrometheusInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1b.DeleteOptions + }{ + Name: name, + Options: options, + } + lockPrometheusInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockPrometheusInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedPrometheusInterface.DeleteCalls()) +func (mock *PrometheusInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1b.DeleteOptions +} { + var calls []struct { + Name string + Options *v1b.DeleteOptions + } + lockPrometheusInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockPrometheusInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *PrometheusInterfaceMock) DeleteCollection(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("PrometheusInterfaceMock.DeleteCollectionFunc: method is nil but PrometheusInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockPrometheusInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockPrometheusInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedPrometheusInterface.DeleteCollectionCalls()) +func (mock *PrometheusInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions +} { + var calls []struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions + } + lockPrometheusInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockPrometheusInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *PrometheusInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1b.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("PrometheusInterfaceMock.DeleteNamespacedFunc: method is nil but PrometheusInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1b.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockPrometheusInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockPrometheusInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedPrometheusInterface.DeleteNamespacedCalls()) +func (mock *PrometheusInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1b.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1b.DeleteOptions + } + lockPrometheusInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockPrometheusInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *PrometheusInterfaceMock) Get(name string, opts v1b.GetOptions) (*v1.Prometheus, error) { + if mock.GetFunc == nil { + panic("PrometheusInterfaceMock.GetFunc: method is nil but PrometheusInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1b.GetOptions + }{ + Name: name, + Opts: opts, + } + lockPrometheusInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockPrometheusInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedPrometheusInterface.GetCalls()) +func (mock *PrometheusInterfaceMock) GetCalls() []struct { + Name string + Opts v1b.GetOptions +} { + var calls []struct { + Name string + Opts v1b.GetOptions + } + lockPrometheusInterfaceMockGet.RLock() + calls = mock.calls.Get + lockPrometheusInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *PrometheusInterfaceMock) GetNamespaced(namespace string, name string, opts v1b.GetOptions) (*v1.Prometheus, error) { + if mock.GetNamespacedFunc == nil { + panic("PrometheusInterfaceMock.GetNamespacedFunc: method is nil but PrometheusInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1b.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockPrometheusInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockPrometheusInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedPrometheusInterface.GetNamespacedCalls()) +func (mock *PrometheusInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1b.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1b.GetOptions + } + lockPrometheusInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockPrometheusInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *PrometheusInterfaceMock) List(opts v1b.ListOptions) (*v1a.PrometheusList, error) { + if mock.ListFunc == nil { + panic("PrometheusInterfaceMock.ListFunc: method is nil but PrometheusInterface.List was just called") + } + callInfo := struct { + Opts v1b.ListOptions + }{ + Opts: opts, + } + lockPrometheusInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockPrometheusInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedPrometheusInterface.ListCalls()) +func (mock *PrometheusInterfaceMock) ListCalls() []struct { + Opts v1b.ListOptions +} { + var calls []struct { + Opts v1b.ListOptions + } + lockPrometheusInterfaceMockList.RLock() + calls = mock.calls.List + lockPrometheusInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *PrometheusInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("PrometheusInterfaceMock.ObjectClientFunc: method is nil but PrometheusInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockPrometheusInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockPrometheusInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedPrometheusInterface.ObjectClientCalls()) +func (mock *PrometheusInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockPrometheusInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockPrometheusInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *PrometheusInterfaceMock) Update(in1 *v1.Prometheus) (*v1.Prometheus, error) { + if mock.UpdateFunc == nil { + panic("PrometheusInterfaceMock.UpdateFunc: method is nil but PrometheusInterface.Update was just called") + } + callInfo := struct { + In1 *v1.Prometheus + }{ + In1: in1, + } + lockPrometheusInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockPrometheusInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedPrometheusInterface.UpdateCalls()) +func (mock *PrometheusInterfaceMock) UpdateCalls() []struct { + In1 *v1.Prometheus +} { + var calls []struct { + In1 *v1.Prometheus + } + lockPrometheusInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockPrometheusInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *PrometheusInterfaceMock) Watch(opts v1b.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("PrometheusInterfaceMock.WatchFunc: method is nil but PrometheusInterface.Watch was just called") + } + callInfo := struct { + Opts v1b.ListOptions + }{ + Opts: opts, + } + lockPrometheusInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockPrometheusInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedPrometheusInterface.WatchCalls()) +func (mock *PrometheusInterfaceMock) WatchCalls() []struct { + Opts v1b.ListOptions +} { + var calls []struct { + Opts v1b.ListOptions + } + lockPrometheusInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockPrometheusInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockPrometheusesGetterMockPrometheuses sync.RWMutex +) + +// Ensure, that PrometheusesGetterMock does implement PrometheusesGetter. +// If this is not the case, regenerate this file with moq. +var _ v1a.PrometheusesGetter = &PrometheusesGetterMock{} + +// PrometheusesGetterMock is a mock implementation of PrometheusesGetter. +// +// func TestSomethingThatUsesPrometheusesGetter(t *testing.T) { +// +// // make and configure a mocked PrometheusesGetter +// mockedPrometheusesGetter := &PrometheusesGetterMock{ +// PrometheusesFunc: func(namespace string) v1a.PrometheusInterface { +// panic("mock out the Prometheuses method") +// }, +// } +// +// // use mockedPrometheusesGetter in code that requires PrometheusesGetter +// // and then make assertions. +// +// } +type PrometheusesGetterMock struct { + // PrometheusesFunc mocks the Prometheuses method. + PrometheusesFunc func(namespace string) v1a.PrometheusInterface + + // calls tracks calls to the methods. + calls struct { + // Prometheuses holds details about calls to the Prometheuses method. + Prometheuses []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// Prometheuses calls PrometheusesFunc. +func (mock *PrometheusesGetterMock) Prometheuses(namespace string) v1a.PrometheusInterface { + if mock.PrometheusesFunc == nil { + panic("PrometheusesGetterMock.PrometheusesFunc: method is nil but PrometheusesGetter.Prometheuses was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockPrometheusesGetterMockPrometheuses.Lock() + mock.calls.Prometheuses = append(mock.calls.Prometheuses, callInfo) + lockPrometheusesGetterMockPrometheuses.Unlock() + return mock.PrometheusesFunc(namespace) +} + +// PrometheusesCalls gets all the calls that were made to Prometheuses. +// Check the length with: +// len(mockedPrometheusesGetter.PrometheusesCalls()) +func (mock *PrometheusesGetterMock) PrometheusesCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockPrometheusesGetterMockPrometheuses.RLock() + calls = mock.calls.Prometheuses + lockPrometheusesGetterMockPrometheuses.RUnlock() + return calls +} diff --git a/apis/monitoring.coreos.com/v1/fakes/zz_generated_prometheus_rule_mock_test.go b/apis/monitoring.coreos.com/v1/fakes/zz_generated_prometheus_rule_mock_test.go new file mode 100644 index 00000000..90b0dd60 --- /dev/null +++ b/apis/monitoring.coreos.com/v1/fakes/zz_generated_prometheus_rule_mock_test.go @@ -0,0 +1,1357 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + v1 "github.com/coreos/prometheus-operator/pkg/client/monitoring/v1" + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v1a "github.com/rancher/types/apis/monitoring.coreos.com/v1" + v1b "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockPrometheusRuleListerMockGet sync.RWMutex + lockPrometheusRuleListerMockList sync.RWMutex +) + +// Ensure, that PrometheusRuleListerMock does implement PrometheusRuleLister. +// If this is not the case, regenerate this file with moq. +var _ v1a.PrometheusRuleLister = &PrometheusRuleListerMock{} + +// PrometheusRuleListerMock is a mock implementation of PrometheusRuleLister. +// +// func TestSomethingThatUsesPrometheusRuleLister(t *testing.T) { +// +// // make and configure a mocked PrometheusRuleLister +// mockedPrometheusRuleLister := &PrometheusRuleListerMock{ +// GetFunc: func(namespace string, name string) (*v1.PrometheusRule, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v1.PrometheusRule, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedPrometheusRuleLister in code that requires PrometheusRuleLister +// // and then make assertions. +// +// } +type PrometheusRuleListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v1.PrometheusRule, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v1.PrometheusRule, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *PrometheusRuleListerMock) Get(namespace string, name string) (*v1.PrometheusRule, error) { + if mock.GetFunc == nil { + panic("PrometheusRuleListerMock.GetFunc: method is nil but PrometheusRuleLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockPrometheusRuleListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockPrometheusRuleListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedPrometheusRuleLister.GetCalls()) +func (mock *PrometheusRuleListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockPrometheusRuleListerMockGet.RLock() + calls = mock.calls.Get + lockPrometheusRuleListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *PrometheusRuleListerMock) List(namespace string, selector labels.Selector) ([]*v1.PrometheusRule, error) { + if mock.ListFunc == nil { + panic("PrometheusRuleListerMock.ListFunc: method is nil but PrometheusRuleLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockPrometheusRuleListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockPrometheusRuleListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedPrometheusRuleLister.ListCalls()) +func (mock *PrometheusRuleListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockPrometheusRuleListerMockList.RLock() + calls = mock.calls.List + lockPrometheusRuleListerMockList.RUnlock() + return calls +} + +var ( + lockPrometheusRuleControllerMockAddClusterScopedHandler sync.RWMutex + lockPrometheusRuleControllerMockAddHandler sync.RWMutex + lockPrometheusRuleControllerMockEnqueue sync.RWMutex + lockPrometheusRuleControllerMockGeneric sync.RWMutex + lockPrometheusRuleControllerMockInformer sync.RWMutex + lockPrometheusRuleControllerMockLister sync.RWMutex + lockPrometheusRuleControllerMockStart sync.RWMutex + lockPrometheusRuleControllerMockSync sync.RWMutex +) + +// Ensure, that PrometheusRuleControllerMock does implement PrometheusRuleController. +// If this is not the case, regenerate this file with moq. +var _ v1a.PrometheusRuleController = &PrometheusRuleControllerMock{} + +// PrometheusRuleControllerMock is a mock implementation of PrometheusRuleController. +// +// func TestSomethingThatUsesPrometheusRuleController(t *testing.T) { +// +// // make and configure a mocked PrometheusRuleController +// mockedPrometheusRuleController := &PrometheusRuleControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v1a.PrometheusRuleHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v1a.PrometheusRuleHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v1a.PrometheusRuleLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedPrometheusRuleController in code that requires PrometheusRuleController +// // and then make assertions. +// +// } +type PrometheusRuleControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v1a.PrometheusRuleHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v1a.PrometheusRuleHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v1a.PrometheusRuleLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v1a.PrometheusRuleHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v1a.PrometheusRuleHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *PrometheusRuleControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v1a.PrometheusRuleHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("PrometheusRuleControllerMock.AddClusterScopedHandlerFunc: method is nil but PrometheusRuleController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.PrometheusRuleHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockPrometheusRuleControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockPrometheusRuleControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedPrometheusRuleController.AddClusterScopedHandlerCalls()) +func (mock *PrometheusRuleControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.PrometheusRuleHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.PrometheusRuleHandlerFunc + } + lockPrometheusRuleControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockPrometheusRuleControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *PrometheusRuleControllerMock) AddHandler(ctx context.Context, name string, handler v1a.PrometheusRuleHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("PrometheusRuleControllerMock.AddHandlerFunc: method is nil but PrometheusRuleController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v1a.PrometheusRuleHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockPrometheusRuleControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockPrometheusRuleControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedPrometheusRuleController.AddHandlerCalls()) +func (mock *PrometheusRuleControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v1a.PrometheusRuleHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v1a.PrometheusRuleHandlerFunc + } + lockPrometheusRuleControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockPrometheusRuleControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *PrometheusRuleControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("PrometheusRuleControllerMock.EnqueueFunc: method is nil but PrometheusRuleController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockPrometheusRuleControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockPrometheusRuleControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedPrometheusRuleController.EnqueueCalls()) +func (mock *PrometheusRuleControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockPrometheusRuleControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockPrometheusRuleControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *PrometheusRuleControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("PrometheusRuleControllerMock.GenericFunc: method is nil but PrometheusRuleController.Generic was just called") + } + callInfo := struct { + }{} + lockPrometheusRuleControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockPrometheusRuleControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedPrometheusRuleController.GenericCalls()) +func (mock *PrometheusRuleControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockPrometheusRuleControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockPrometheusRuleControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *PrometheusRuleControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("PrometheusRuleControllerMock.InformerFunc: method is nil but PrometheusRuleController.Informer was just called") + } + callInfo := struct { + }{} + lockPrometheusRuleControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockPrometheusRuleControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedPrometheusRuleController.InformerCalls()) +func (mock *PrometheusRuleControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockPrometheusRuleControllerMockInformer.RLock() + calls = mock.calls.Informer + lockPrometheusRuleControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *PrometheusRuleControllerMock) Lister() v1a.PrometheusRuleLister { + if mock.ListerFunc == nil { + panic("PrometheusRuleControllerMock.ListerFunc: method is nil but PrometheusRuleController.Lister was just called") + } + callInfo := struct { + }{} + lockPrometheusRuleControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockPrometheusRuleControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedPrometheusRuleController.ListerCalls()) +func (mock *PrometheusRuleControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockPrometheusRuleControllerMockLister.RLock() + calls = mock.calls.Lister + lockPrometheusRuleControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *PrometheusRuleControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("PrometheusRuleControllerMock.StartFunc: method is nil but PrometheusRuleController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockPrometheusRuleControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockPrometheusRuleControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedPrometheusRuleController.StartCalls()) +func (mock *PrometheusRuleControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockPrometheusRuleControllerMockStart.RLock() + calls = mock.calls.Start + lockPrometheusRuleControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *PrometheusRuleControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("PrometheusRuleControllerMock.SyncFunc: method is nil but PrometheusRuleController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockPrometheusRuleControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockPrometheusRuleControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedPrometheusRuleController.SyncCalls()) +func (mock *PrometheusRuleControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockPrometheusRuleControllerMockSync.RLock() + calls = mock.calls.Sync + lockPrometheusRuleControllerMockSync.RUnlock() + return calls +} + +var ( + lockPrometheusRuleInterfaceMockAddClusterScopedHandler sync.RWMutex + lockPrometheusRuleInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockPrometheusRuleInterfaceMockAddHandler sync.RWMutex + lockPrometheusRuleInterfaceMockAddLifecycle sync.RWMutex + lockPrometheusRuleInterfaceMockController sync.RWMutex + lockPrometheusRuleInterfaceMockCreate sync.RWMutex + lockPrometheusRuleInterfaceMockDelete sync.RWMutex + lockPrometheusRuleInterfaceMockDeleteCollection sync.RWMutex + lockPrometheusRuleInterfaceMockDeleteNamespaced sync.RWMutex + lockPrometheusRuleInterfaceMockGet sync.RWMutex + lockPrometheusRuleInterfaceMockGetNamespaced sync.RWMutex + lockPrometheusRuleInterfaceMockList sync.RWMutex + lockPrometheusRuleInterfaceMockObjectClient sync.RWMutex + lockPrometheusRuleInterfaceMockUpdate sync.RWMutex + lockPrometheusRuleInterfaceMockWatch sync.RWMutex +) + +// Ensure, that PrometheusRuleInterfaceMock does implement PrometheusRuleInterface. +// If this is not the case, regenerate this file with moq. +var _ v1a.PrometheusRuleInterface = &PrometheusRuleInterfaceMock{} + +// PrometheusRuleInterfaceMock is a mock implementation of PrometheusRuleInterface. +// +// func TestSomethingThatUsesPrometheusRuleInterface(t *testing.T) { +// +// // make and configure a mocked PrometheusRuleInterface +// mockedPrometheusRuleInterface := &PrometheusRuleInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v1a.PrometheusRuleHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v1a.PrometheusRuleLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v1a.PrometheusRuleHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v1a.PrometheusRuleLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v1a.PrometheusRuleController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v1.PrometheusRule) (*v1.PrometheusRule, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1b.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1b.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1b.GetOptions) (*v1.PrometheusRule, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.PrometheusRule, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1b.ListOptions) (*v1a.PrometheusRuleList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v1.PrometheusRule) (*v1.PrometheusRule, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1b.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedPrometheusRuleInterface in code that requires PrometheusRuleInterface +// // and then make assertions. +// +// } +type PrometheusRuleInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v1a.PrometheusRuleHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v1a.PrometheusRuleLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v1a.PrometheusRuleHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v1a.PrometheusRuleLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v1a.PrometheusRuleController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v1.PrometheusRule) (*v1.PrometheusRule, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1b.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1b.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1b.GetOptions) (*v1.PrometheusRule, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.PrometheusRule, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1b.ListOptions) (*v1a.PrometheusRuleList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v1.PrometheusRule) (*v1.PrometheusRule, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1b.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v1a.PrometheusRuleHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v1a.PrometheusRuleLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v1a.PrometheusRuleHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v1a.PrometheusRuleLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v1.PrometheusRule + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1b.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1b.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1b.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1b.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1b.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1b.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1b.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v1.PrometheusRule + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1b.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *PrometheusRuleInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v1a.PrometheusRuleHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("PrometheusRuleInterfaceMock.AddClusterScopedHandlerFunc: method is nil but PrometheusRuleInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.PrometheusRuleHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockPrometheusRuleInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockPrometheusRuleInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedPrometheusRuleInterface.AddClusterScopedHandlerCalls()) +func (mock *PrometheusRuleInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.PrometheusRuleHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.PrometheusRuleHandlerFunc + } + lockPrometheusRuleInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockPrometheusRuleInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *PrometheusRuleInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v1a.PrometheusRuleLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("PrometheusRuleInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but PrometheusRuleInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.PrometheusRuleLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockPrometheusRuleInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockPrometheusRuleInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedPrometheusRuleInterface.AddClusterScopedLifecycleCalls()) +func (mock *PrometheusRuleInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.PrometheusRuleLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.PrometheusRuleLifecycle + } + lockPrometheusRuleInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockPrometheusRuleInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *PrometheusRuleInterfaceMock) AddHandler(ctx context.Context, name string, sync v1a.PrometheusRuleHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("PrometheusRuleInterfaceMock.AddHandlerFunc: method is nil but PrometheusRuleInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v1a.PrometheusRuleHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockPrometheusRuleInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockPrometheusRuleInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedPrometheusRuleInterface.AddHandlerCalls()) +func (mock *PrometheusRuleInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v1a.PrometheusRuleHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v1a.PrometheusRuleHandlerFunc + } + lockPrometheusRuleInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockPrometheusRuleInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *PrometheusRuleInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v1a.PrometheusRuleLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("PrometheusRuleInterfaceMock.AddLifecycleFunc: method is nil but PrometheusRuleInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v1a.PrometheusRuleLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockPrometheusRuleInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockPrometheusRuleInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedPrometheusRuleInterface.AddLifecycleCalls()) +func (mock *PrometheusRuleInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v1a.PrometheusRuleLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v1a.PrometheusRuleLifecycle + } + lockPrometheusRuleInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockPrometheusRuleInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *PrometheusRuleInterfaceMock) Controller() v1a.PrometheusRuleController { + if mock.ControllerFunc == nil { + panic("PrometheusRuleInterfaceMock.ControllerFunc: method is nil but PrometheusRuleInterface.Controller was just called") + } + callInfo := struct { + }{} + lockPrometheusRuleInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockPrometheusRuleInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedPrometheusRuleInterface.ControllerCalls()) +func (mock *PrometheusRuleInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockPrometheusRuleInterfaceMockController.RLock() + calls = mock.calls.Controller + lockPrometheusRuleInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *PrometheusRuleInterfaceMock) Create(in1 *v1.PrometheusRule) (*v1.PrometheusRule, error) { + if mock.CreateFunc == nil { + panic("PrometheusRuleInterfaceMock.CreateFunc: method is nil but PrometheusRuleInterface.Create was just called") + } + callInfo := struct { + In1 *v1.PrometheusRule + }{ + In1: in1, + } + lockPrometheusRuleInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockPrometheusRuleInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedPrometheusRuleInterface.CreateCalls()) +func (mock *PrometheusRuleInterfaceMock) CreateCalls() []struct { + In1 *v1.PrometheusRule +} { + var calls []struct { + In1 *v1.PrometheusRule + } + lockPrometheusRuleInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockPrometheusRuleInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *PrometheusRuleInterfaceMock) Delete(name string, options *v1b.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("PrometheusRuleInterfaceMock.DeleteFunc: method is nil but PrometheusRuleInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1b.DeleteOptions + }{ + Name: name, + Options: options, + } + lockPrometheusRuleInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockPrometheusRuleInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedPrometheusRuleInterface.DeleteCalls()) +func (mock *PrometheusRuleInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1b.DeleteOptions +} { + var calls []struct { + Name string + Options *v1b.DeleteOptions + } + lockPrometheusRuleInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockPrometheusRuleInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *PrometheusRuleInterfaceMock) DeleteCollection(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("PrometheusRuleInterfaceMock.DeleteCollectionFunc: method is nil but PrometheusRuleInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockPrometheusRuleInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockPrometheusRuleInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedPrometheusRuleInterface.DeleteCollectionCalls()) +func (mock *PrometheusRuleInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions +} { + var calls []struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions + } + lockPrometheusRuleInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockPrometheusRuleInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *PrometheusRuleInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1b.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("PrometheusRuleInterfaceMock.DeleteNamespacedFunc: method is nil but PrometheusRuleInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1b.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockPrometheusRuleInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockPrometheusRuleInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedPrometheusRuleInterface.DeleteNamespacedCalls()) +func (mock *PrometheusRuleInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1b.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1b.DeleteOptions + } + lockPrometheusRuleInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockPrometheusRuleInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *PrometheusRuleInterfaceMock) Get(name string, opts v1b.GetOptions) (*v1.PrometheusRule, error) { + if mock.GetFunc == nil { + panic("PrometheusRuleInterfaceMock.GetFunc: method is nil but PrometheusRuleInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1b.GetOptions + }{ + Name: name, + Opts: opts, + } + lockPrometheusRuleInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockPrometheusRuleInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedPrometheusRuleInterface.GetCalls()) +func (mock *PrometheusRuleInterfaceMock) GetCalls() []struct { + Name string + Opts v1b.GetOptions +} { + var calls []struct { + Name string + Opts v1b.GetOptions + } + lockPrometheusRuleInterfaceMockGet.RLock() + calls = mock.calls.Get + lockPrometheusRuleInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *PrometheusRuleInterfaceMock) GetNamespaced(namespace string, name string, opts v1b.GetOptions) (*v1.PrometheusRule, error) { + if mock.GetNamespacedFunc == nil { + panic("PrometheusRuleInterfaceMock.GetNamespacedFunc: method is nil but PrometheusRuleInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1b.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockPrometheusRuleInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockPrometheusRuleInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedPrometheusRuleInterface.GetNamespacedCalls()) +func (mock *PrometheusRuleInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1b.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1b.GetOptions + } + lockPrometheusRuleInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockPrometheusRuleInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *PrometheusRuleInterfaceMock) List(opts v1b.ListOptions) (*v1a.PrometheusRuleList, error) { + if mock.ListFunc == nil { + panic("PrometheusRuleInterfaceMock.ListFunc: method is nil but PrometheusRuleInterface.List was just called") + } + callInfo := struct { + Opts v1b.ListOptions + }{ + Opts: opts, + } + lockPrometheusRuleInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockPrometheusRuleInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedPrometheusRuleInterface.ListCalls()) +func (mock *PrometheusRuleInterfaceMock) ListCalls() []struct { + Opts v1b.ListOptions +} { + var calls []struct { + Opts v1b.ListOptions + } + lockPrometheusRuleInterfaceMockList.RLock() + calls = mock.calls.List + lockPrometheusRuleInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *PrometheusRuleInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("PrometheusRuleInterfaceMock.ObjectClientFunc: method is nil but PrometheusRuleInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockPrometheusRuleInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockPrometheusRuleInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedPrometheusRuleInterface.ObjectClientCalls()) +func (mock *PrometheusRuleInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockPrometheusRuleInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockPrometheusRuleInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *PrometheusRuleInterfaceMock) Update(in1 *v1.PrometheusRule) (*v1.PrometheusRule, error) { + if mock.UpdateFunc == nil { + panic("PrometheusRuleInterfaceMock.UpdateFunc: method is nil but PrometheusRuleInterface.Update was just called") + } + callInfo := struct { + In1 *v1.PrometheusRule + }{ + In1: in1, + } + lockPrometheusRuleInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockPrometheusRuleInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedPrometheusRuleInterface.UpdateCalls()) +func (mock *PrometheusRuleInterfaceMock) UpdateCalls() []struct { + In1 *v1.PrometheusRule +} { + var calls []struct { + In1 *v1.PrometheusRule + } + lockPrometheusRuleInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockPrometheusRuleInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *PrometheusRuleInterfaceMock) Watch(opts v1b.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("PrometheusRuleInterfaceMock.WatchFunc: method is nil but PrometheusRuleInterface.Watch was just called") + } + callInfo := struct { + Opts v1b.ListOptions + }{ + Opts: opts, + } + lockPrometheusRuleInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockPrometheusRuleInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedPrometheusRuleInterface.WatchCalls()) +func (mock *PrometheusRuleInterfaceMock) WatchCalls() []struct { + Opts v1b.ListOptions +} { + var calls []struct { + Opts v1b.ListOptions + } + lockPrometheusRuleInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockPrometheusRuleInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockPrometheusRulesGetterMockPrometheusRules sync.RWMutex +) + +// Ensure, that PrometheusRulesGetterMock does implement PrometheusRulesGetter. +// If this is not the case, regenerate this file with moq. +var _ v1a.PrometheusRulesGetter = &PrometheusRulesGetterMock{} + +// PrometheusRulesGetterMock is a mock implementation of PrometheusRulesGetter. +// +// func TestSomethingThatUsesPrometheusRulesGetter(t *testing.T) { +// +// // make and configure a mocked PrometheusRulesGetter +// mockedPrometheusRulesGetter := &PrometheusRulesGetterMock{ +// PrometheusRulesFunc: func(namespace string) v1a.PrometheusRuleInterface { +// panic("mock out the PrometheusRules method") +// }, +// } +// +// // use mockedPrometheusRulesGetter in code that requires PrometheusRulesGetter +// // and then make assertions. +// +// } +type PrometheusRulesGetterMock struct { + // PrometheusRulesFunc mocks the PrometheusRules method. + PrometheusRulesFunc func(namespace string) v1a.PrometheusRuleInterface + + // calls tracks calls to the methods. + calls struct { + // PrometheusRules holds details about calls to the PrometheusRules method. + PrometheusRules []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// PrometheusRules calls PrometheusRulesFunc. +func (mock *PrometheusRulesGetterMock) PrometheusRules(namespace string) v1a.PrometheusRuleInterface { + if mock.PrometheusRulesFunc == nil { + panic("PrometheusRulesGetterMock.PrometheusRulesFunc: method is nil but PrometheusRulesGetter.PrometheusRules was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockPrometheusRulesGetterMockPrometheusRules.Lock() + mock.calls.PrometheusRules = append(mock.calls.PrometheusRules, callInfo) + lockPrometheusRulesGetterMockPrometheusRules.Unlock() + return mock.PrometheusRulesFunc(namespace) +} + +// PrometheusRulesCalls gets all the calls that were made to PrometheusRules. +// Check the length with: +// len(mockedPrometheusRulesGetter.PrometheusRulesCalls()) +func (mock *PrometheusRulesGetterMock) PrometheusRulesCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockPrometheusRulesGetterMockPrometheusRules.RLock() + calls = mock.calls.PrometheusRules + lockPrometheusRulesGetterMockPrometheusRules.RUnlock() + return calls +} diff --git a/apis/monitoring.coreos.com/v1/fakes/zz_generated_service_monitor_mock_test.go b/apis/monitoring.coreos.com/v1/fakes/zz_generated_service_monitor_mock_test.go new file mode 100644 index 00000000..fe2746d3 --- /dev/null +++ b/apis/monitoring.coreos.com/v1/fakes/zz_generated_service_monitor_mock_test.go @@ -0,0 +1,1357 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + v1 "github.com/coreos/prometheus-operator/pkg/client/monitoring/v1" + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v1a "github.com/rancher/types/apis/monitoring.coreos.com/v1" + v1b "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockServiceMonitorListerMockGet sync.RWMutex + lockServiceMonitorListerMockList sync.RWMutex +) + +// Ensure, that ServiceMonitorListerMock does implement ServiceMonitorLister. +// If this is not the case, regenerate this file with moq. +var _ v1a.ServiceMonitorLister = &ServiceMonitorListerMock{} + +// ServiceMonitorListerMock is a mock implementation of ServiceMonitorLister. +// +// func TestSomethingThatUsesServiceMonitorLister(t *testing.T) { +// +// // make and configure a mocked ServiceMonitorLister +// mockedServiceMonitorLister := &ServiceMonitorListerMock{ +// GetFunc: func(namespace string, name string) (*v1.ServiceMonitor, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v1.ServiceMonitor, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedServiceMonitorLister in code that requires ServiceMonitorLister +// // and then make assertions. +// +// } +type ServiceMonitorListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v1.ServiceMonitor, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v1.ServiceMonitor, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *ServiceMonitorListerMock) Get(namespace string, name string) (*v1.ServiceMonitor, error) { + if mock.GetFunc == nil { + panic("ServiceMonitorListerMock.GetFunc: method is nil but ServiceMonitorLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockServiceMonitorListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockServiceMonitorListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedServiceMonitorLister.GetCalls()) +func (mock *ServiceMonitorListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockServiceMonitorListerMockGet.RLock() + calls = mock.calls.Get + lockServiceMonitorListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ServiceMonitorListerMock) List(namespace string, selector labels.Selector) ([]*v1.ServiceMonitor, error) { + if mock.ListFunc == nil { + panic("ServiceMonitorListerMock.ListFunc: method is nil but ServiceMonitorLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockServiceMonitorListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockServiceMonitorListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedServiceMonitorLister.ListCalls()) +func (mock *ServiceMonitorListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockServiceMonitorListerMockList.RLock() + calls = mock.calls.List + lockServiceMonitorListerMockList.RUnlock() + return calls +} + +var ( + lockServiceMonitorControllerMockAddClusterScopedHandler sync.RWMutex + lockServiceMonitorControllerMockAddHandler sync.RWMutex + lockServiceMonitorControllerMockEnqueue sync.RWMutex + lockServiceMonitorControllerMockGeneric sync.RWMutex + lockServiceMonitorControllerMockInformer sync.RWMutex + lockServiceMonitorControllerMockLister sync.RWMutex + lockServiceMonitorControllerMockStart sync.RWMutex + lockServiceMonitorControllerMockSync sync.RWMutex +) + +// Ensure, that ServiceMonitorControllerMock does implement ServiceMonitorController. +// If this is not the case, regenerate this file with moq. +var _ v1a.ServiceMonitorController = &ServiceMonitorControllerMock{} + +// ServiceMonitorControllerMock is a mock implementation of ServiceMonitorController. +// +// func TestSomethingThatUsesServiceMonitorController(t *testing.T) { +// +// // make and configure a mocked ServiceMonitorController +// mockedServiceMonitorController := &ServiceMonitorControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v1a.ServiceMonitorHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v1a.ServiceMonitorHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v1a.ServiceMonitorLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedServiceMonitorController in code that requires ServiceMonitorController +// // and then make assertions. +// +// } +type ServiceMonitorControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v1a.ServiceMonitorHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v1a.ServiceMonitorHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v1a.ServiceMonitorLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v1a.ServiceMonitorHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v1a.ServiceMonitorHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ServiceMonitorControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v1a.ServiceMonitorHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ServiceMonitorControllerMock.AddClusterScopedHandlerFunc: method is nil but ServiceMonitorController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.ServiceMonitorHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockServiceMonitorControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockServiceMonitorControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedServiceMonitorController.AddClusterScopedHandlerCalls()) +func (mock *ServiceMonitorControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.ServiceMonitorHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.ServiceMonitorHandlerFunc + } + lockServiceMonitorControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockServiceMonitorControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ServiceMonitorControllerMock) AddHandler(ctx context.Context, name string, handler v1a.ServiceMonitorHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ServiceMonitorControllerMock.AddHandlerFunc: method is nil but ServiceMonitorController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v1a.ServiceMonitorHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockServiceMonitorControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockServiceMonitorControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedServiceMonitorController.AddHandlerCalls()) +func (mock *ServiceMonitorControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v1a.ServiceMonitorHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v1a.ServiceMonitorHandlerFunc + } + lockServiceMonitorControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockServiceMonitorControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *ServiceMonitorControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("ServiceMonitorControllerMock.EnqueueFunc: method is nil but ServiceMonitorController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockServiceMonitorControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockServiceMonitorControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedServiceMonitorController.EnqueueCalls()) +func (mock *ServiceMonitorControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockServiceMonitorControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockServiceMonitorControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *ServiceMonitorControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("ServiceMonitorControllerMock.GenericFunc: method is nil but ServiceMonitorController.Generic was just called") + } + callInfo := struct { + }{} + lockServiceMonitorControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockServiceMonitorControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedServiceMonitorController.GenericCalls()) +func (mock *ServiceMonitorControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockServiceMonitorControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockServiceMonitorControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *ServiceMonitorControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("ServiceMonitorControllerMock.InformerFunc: method is nil but ServiceMonitorController.Informer was just called") + } + callInfo := struct { + }{} + lockServiceMonitorControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockServiceMonitorControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedServiceMonitorController.InformerCalls()) +func (mock *ServiceMonitorControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockServiceMonitorControllerMockInformer.RLock() + calls = mock.calls.Informer + lockServiceMonitorControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *ServiceMonitorControllerMock) Lister() v1a.ServiceMonitorLister { + if mock.ListerFunc == nil { + panic("ServiceMonitorControllerMock.ListerFunc: method is nil but ServiceMonitorController.Lister was just called") + } + callInfo := struct { + }{} + lockServiceMonitorControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockServiceMonitorControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedServiceMonitorController.ListerCalls()) +func (mock *ServiceMonitorControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockServiceMonitorControllerMockLister.RLock() + calls = mock.calls.Lister + lockServiceMonitorControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *ServiceMonitorControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("ServiceMonitorControllerMock.StartFunc: method is nil but ServiceMonitorController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockServiceMonitorControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockServiceMonitorControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedServiceMonitorController.StartCalls()) +func (mock *ServiceMonitorControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockServiceMonitorControllerMockStart.RLock() + calls = mock.calls.Start + lockServiceMonitorControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *ServiceMonitorControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("ServiceMonitorControllerMock.SyncFunc: method is nil but ServiceMonitorController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockServiceMonitorControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockServiceMonitorControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedServiceMonitorController.SyncCalls()) +func (mock *ServiceMonitorControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockServiceMonitorControllerMockSync.RLock() + calls = mock.calls.Sync + lockServiceMonitorControllerMockSync.RUnlock() + return calls +} + +var ( + lockServiceMonitorInterfaceMockAddClusterScopedHandler sync.RWMutex + lockServiceMonitorInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockServiceMonitorInterfaceMockAddHandler sync.RWMutex + lockServiceMonitorInterfaceMockAddLifecycle sync.RWMutex + lockServiceMonitorInterfaceMockController sync.RWMutex + lockServiceMonitorInterfaceMockCreate sync.RWMutex + lockServiceMonitorInterfaceMockDelete sync.RWMutex + lockServiceMonitorInterfaceMockDeleteCollection sync.RWMutex + lockServiceMonitorInterfaceMockDeleteNamespaced sync.RWMutex + lockServiceMonitorInterfaceMockGet sync.RWMutex + lockServiceMonitorInterfaceMockGetNamespaced sync.RWMutex + lockServiceMonitorInterfaceMockList sync.RWMutex + lockServiceMonitorInterfaceMockObjectClient sync.RWMutex + lockServiceMonitorInterfaceMockUpdate sync.RWMutex + lockServiceMonitorInterfaceMockWatch sync.RWMutex +) + +// Ensure, that ServiceMonitorInterfaceMock does implement ServiceMonitorInterface. +// If this is not the case, regenerate this file with moq. +var _ v1a.ServiceMonitorInterface = &ServiceMonitorInterfaceMock{} + +// ServiceMonitorInterfaceMock is a mock implementation of ServiceMonitorInterface. +// +// func TestSomethingThatUsesServiceMonitorInterface(t *testing.T) { +// +// // make and configure a mocked ServiceMonitorInterface +// mockedServiceMonitorInterface := &ServiceMonitorInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v1a.ServiceMonitorHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v1a.ServiceMonitorLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v1a.ServiceMonitorHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v1a.ServiceMonitorLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v1a.ServiceMonitorController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v1.ServiceMonitor) (*v1.ServiceMonitor, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1b.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1b.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1b.GetOptions) (*v1.ServiceMonitor, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.ServiceMonitor, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1b.ListOptions) (*v1a.ServiceMonitorList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v1.ServiceMonitor) (*v1.ServiceMonitor, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1b.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedServiceMonitorInterface in code that requires ServiceMonitorInterface +// // and then make assertions. +// +// } +type ServiceMonitorInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v1a.ServiceMonitorHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v1a.ServiceMonitorLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v1a.ServiceMonitorHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v1a.ServiceMonitorLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v1a.ServiceMonitorController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v1.ServiceMonitor) (*v1.ServiceMonitor, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1b.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1b.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1b.GetOptions) (*v1.ServiceMonitor, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.ServiceMonitor, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1b.ListOptions) (*v1a.ServiceMonitorList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v1.ServiceMonitor) (*v1.ServiceMonitor, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1b.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v1a.ServiceMonitorHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v1a.ServiceMonitorLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v1a.ServiceMonitorHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v1a.ServiceMonitorLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v1.ServiceMonitor + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1b.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1b.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1b.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1b.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1b.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1b.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1b.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v1.ServiceMonitor + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1b.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ServiceMonitorInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v1a.ServiceMonitorHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ServiceMonitorInterfaceMock.AddClusterScopedHandlerFunc: method is nil but ServiceMonitorInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.ServiceMonitorHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockServiceMonitorInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockServiceMonitorInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedServiceMonitorInterface.AddClusterScopedHandlerCalls()) +func (mock *ServiceMonitorInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.ServiceMonitorHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.ServiceMonitorHandlerFunc + } + lockServiceMonitorInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockServiceMonitorInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *ServiceMonitorInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v1a.ServiceMonitorLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("ServiceMonitorInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but ServiceMonitorInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.ServiceMonitorLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockServiceMonitorInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockServiceMonitorInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedServiceMonitorInterface.AddClusterScopedLifecycleCalls()) +func (mock *ServiceMonitorInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.ServiceMonitorLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.ServiceMonitorLifecycle + } + lockServiceMonitorInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockServiceMonitorInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ServiceMonitorInterfaceMock) AddHandler(ctx context.Context, name string, sync v1a.ServiceMonitorHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ServiceMonitorInterfaceMock.AddHandlerFunc: method is nil but ServiceMonitorInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v1a.ServiceMonitorHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockServiceMonitorInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockServiceMonitorInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedServiceMonitorInterface.AddHandlerCalls()) +func (mock *ServiceMonitorInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v1a.ServiceMonitorHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v1a.ServiceMonitorHandlerFunc + } + lockServiceMonitorInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockServiceMonitorInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *ServiceMonitorInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v1a.ServiceMonitorLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("ServiceMonitorInterfaceMock.AddLifecycleFunc: method is nil but ServiceMonitorInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v1a.ServiceMonitorLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockServiceMonitorInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockServiceMonitorInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedServiceMonitorInterface.AddLifecycleCalls()) +func (mock *ServiceMonitorInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v1a.ServiceMonitorLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v1a.ServiceMonitorLifecycle + } + lockServiceMonitorInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockServiceMonitorInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *ServiceMonitorInterfaceMock) Controller() v1a.ServiceMonitorController { + if mock.ControllerFunc == nil { + panic("ServiceMonitorInterfaceMock.ControllerFunc: method is nil but ServiceMonitorInterface.Controller was just called") + } + callInfo := struct { + }{} + lockServiceMonitorInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockServiceMonitorInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedServiceMonitorInterface.ControllerCalls()) +func (mock *ServiceMonitorInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockServiceMonitorInterfaceMockController.RLock() + calls = mock.calls.Controller + lockServiceMonitorInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *ServiceMonitorInterfaceMock) Create(in1 *v1.ServiceMonitor) (*v1.ServiceMonitor, error) { + if mock.CreateFunc == nil { + panic("ServiceMonitorInterfaceMock.CreateFunc: method is nil but ServiceMonitorInterface.Create was just called") + } + callInfo := struct { + In1 *v1.ServiceMonitor + }{ + In1: in1, + } + lockServiceMonitorInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockServiceMonitorInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedServiceMonitorInterface.CreateCalls()) +func (mock *ServiceMonitorInterfaceMock) CreateCalls() []struct { + In1 *v1.ServiceMonitor +} { + var calls []struct { + In1 *v1.ServiceMonitor + } + lockServiceMonitorInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockServiceMonitorInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *ServiceMonitorInterfaceMock) Delete(name string, options *v1b.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("ServiceMonitorInterfaceMock.DeleteFunc: method is nil but ServiceMonitorInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1b.DeleteOptions + }{ + Name: name, + Options: options, + } + lockServiceMonitorInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockServiceMonitorInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedServiceMonitorInterface.DeleteCalls()) +func (mock *ServiceMonitorInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1b.DeleteOptions +} { + var calls []struct { + Name string + Options *v1b.DeleteOptions + } + lockServiceMonitorInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockServiceMonitorInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *ServiceMonitorInterfaceMock) DeleteCollection(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("ServiceMonitorInterfaceMock.DeleteCollectionFunc: method is nil but ServiceMonitorInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockServiceMonitorInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockServiceMonitorInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedServiceMonitorInterface.DeleteCollectionCalls()) +func (mock *ServiceMonitorInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions +} { + var calls []struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions + } + lockServiceMonitorInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockServiceMonitorInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *ServiceMonitorInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1b.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("ServiceMonitorInterfaceMock.DeleteNamespacedFunc: method is nil but ServiceMonitorInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1b.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockServiceMonitorInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockServiceMonitorInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedServiceMonitorInterface.DeleteNamespacedCalls()) +func (mock *ServiceMonitorInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1b.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1b.DeleteOptions + } + lockServiceMonitorInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockServiceMonitorInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *ServiceMonitorInterfaceMock) Get(name string, opts v1b.GetOptions) (*v1.ServiceMonitor, error) { + if mock.GetFunc == nil { + panic("ServiceMonitorInterfaceMock.GetFunc: method is nil but ServiceMonitorInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1b.GetOptions + }{ + Name: name, + Opts: opts, + } + lockServiceMonitorInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockServiceMonitorInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedServiceMonitorInterface.GetCalls()) +func (mock *ServiceMonitorInterfaceMock) GetCalls() []struct { + Name string + Opts v1b.GetOptions +} { + var calls []struct { + Name string + Opts v1b.GetOptions + } + lockServiceMonitorInterfaceMockGet.RLock() + calls = mock.calls.Get + lockServiceMonitorInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *ServiceMonitorInterfaceMock) GetNamespaced(namespace string, name string, opts v1b.GetOptions) (*v1.ServiceMonitor, error) { + if mock.GetNamespacedFunc == nil { + panic("ServiceMonitorInterfaceMock.GetNamespacedFunc: method is nil but ServiceMonitorInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1b.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockServiceMonitorInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockServiceMonitorInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedServiceMonitorInterface.GetNamespacedCalls()) +func (mock *ServiceMonitorInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1b.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1b.GetOptions + } + lockServiceMonitorInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockServiceMonitorInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ServiceMonitorInterfaceMock) List(opts v1b.ListOptions) (*v1a.ServiceMonitorList, error) { + if mock.ListFunc == nil { + panic("ServiceMonitorInterfaceMock.ListFunc: method is nil but ServiceMonitorInterface.List was just called") + } + callInfo := struct { + Opts v1b.ListOptions + }{ + Opts: opts, + } + lockServiceMonitorInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockServiceMonitorInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedServiceMonitorInterface.ListCalls()) +func (mock *ServiceMonitorInterfaceMock) ListCalls() []struct { + Opts v1b.ListOptions +} { + var calls []struct { + Opts v1b.ListOptions + } + lockServiceMonitorInterfaceMockList.RLock() + calls = mock.calls.List + lockServiceMonitorInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *ServiceMonitorInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("ServiceMonitorInterfaceMock.ObjectClientFunc: method is nil but ServiceMonitorInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockServiceMonitorInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockServiceMonitorInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedServiceMonitorInterface.ObjectClientCalls()) +func (mock *ServiceMonitorInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockServiceMonitorInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockServiceMonitorInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *ServiceMonitorInterfaceMock) Update(in1 *v1.ServiceMonitor) (*v1.ServiceMonitor, error) { + if mock.UpdateFunc == nil { + panic("ServiceMonitorInterfaceMock.UpdateFunc: method is nil but ServiceMonitorInterface.Update was just called") + } + callInfo := struct { + In1 *v1.ServiceMonitor + }{ + In1: in1, + } + lockServiceMonitorInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockServiceMonitorInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedServiceMonitorInterface.UpdateCalls()) +func (mock *ServiceMonitorInterfaceMock) UpdateCalls() []struct { + In1 *v1.ServiceMonitor +} { + var calls []struct { + In1 *v1.ServiceMonitor + } + lockServiceMonitorInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockServiceMonitorInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *ServiceMonitorInterfaceMock) Watch(opts v1b.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("ServiceMonitorInterfaceMock.WatchFunc: method is nil but ServiceMonitorInterface.Watch was just called") + } + callInfo := struct { + Opts v1b.ListOptions + }{ + Opts: opts, + } + lockServiceMonitorInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockServiceMonitorInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedServiceMonitorInterface.WatchCalls()) +func (mock *ServiceMonitorInterfaceMock) WatchCalls() []struct { + Opts v1b.ListOptions +} { + var calls []struct { + Opts v1b.ListOptions + } + lockServiceMonitorInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockServiceMonitorInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockServiceMonitorsGetterMockServiceMonitors sync.RWMutex +) + +// Ensure, that ServiceMonitorsGetterMock does implement ServiceMonitorsGetter. +// If this is not the case, regenerate this file with moq. +var _ v1a.ServiceMonitorsGetter = &ServiceMonitorsGetterMock{} + +// ServiceMonitorsGetterMock is a mock implementation of ServiceMonitorsGetter. +// +// func TestSomethingThatUsesServiceMonitorsGetter(t *testing.T) { +// +// // make and configure a mocked ServiceMonitorsGetter +// mockedServiceMonitorsGetter := &ServiceMonitorsGetterMock{ +// ServiceMonitorsFunc: func(namespace string) v1a.ServiceMonitorInterface { +// panic("mock out the ServiceMonitors method") +// }, +// } +// +// // use mockedServiceMonitorsGetter in code that requires ServiceMonitorsGetter +// // and then make assertions. +// +// } +type ServiceMonitorsGetterMock struct { + // ServiceMonitorsFunc mocks the ServiceMonitors method. + ServiceMonitorsFunc func(namespace string) v1a.ServiceMonitorInterface + + // calls tracks calls to the methods. + calls struct { + // ServiceMonitors holds details about calls to the ServiceMonitors method. + ServiceMonitors []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// ServiceMonitors calls ServiceMonitorsFunc. +func (mock *ServiceMonitorsGetterMock) ServiceMonitors(namespace string) v1a.ServiceMonitorInterface { + if mock.ServiceMonitorsFunc == nil { + panic("ServiceMonitorsGetterMock.ServiceMonitorsFunc: method is nil but ServiceMonitorsGetter.ServiceMonitors was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockServiceMonitorsGetterMockServiceMonitors.Lock() + mock.calls.ServiceMonitors = append(mock.calls.ServiceMonitors, callInfo) + lockServiceMonitorsGetterMockServiceMonitors.Unlock() + return mock.ServiceMonitorsFunc(namespace) +} + +// ServiceMonitorsCalls gets all the calls that were made to ServiceMonitors. +// Check the length with: +// len(mockedServiceMonitorsGetter.ServiceMonitorsCalls()) +func (mock *ServiceMonitorsGetterMock) ServiceMonitorsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockServiceMonitorsGetterMockServiceMonitors.RLock() + calls = mock.calls.ServiceMonitors + lockServiceMonitorsGetterMockServiceMonitors.RUnlock() + return calls +} diff --git a/apis/monitoring.coreos.com/v1/zz_generated_alertmanager_controller.go b/apis/monitoring.coreos.com/v1/zz_generated_alertmanager_controller.go index 95d4cbf5..c8704136 100644 --- a/apis/monitoring.coreos.com/v1/zz_generated_alertmanager_controller.go +++ b/apis/monitoring.coreos.com/v1/zz_generated_alertmanager_controller.go @@ -41,7 +41,7 @@ func NewAlertmanager(namespace, name string, obj v1.Alertmanager) *v1.Alertmanag type AlertmanagerList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.Alertmanager + Items []v1.Alertmanager `json:"items"` } type AlertmanagerHandlerFunc func(key string, obj *v1.Alertmanager) (runtime.Object, error) diff --git a/apis/monitoring.coreos.com/v1/zz_generated_prometheus_controller.go b/apis/monitoring.coreos.com/v1/zz_generated_prometheus_controller.go index 135c6704..ba4491b3 100644 --- a/apis/monitoring.coreos.com/v1/zz_generated_prometheus_controller.go +++ b/apis/monitoring.coreos.com/v1/zz_generated_prometheus_controller.go @@ -41,7 +41,7 @@ func NewPrometheus(namespace, name string, obj v1.Prometheus) *v1.Prometheus { type PrometheusList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.Prometheus + Items []v1.Prometheus `json:"items"` } type PrometheusHandlerFunc func(key string, obj *v1.Prometheus) (runtime.Object, error) diff --git a/apis/monitoring.coreos.com/v1/zz_generated_prometheus_rule_controller.go b/apis/monitoring.coreos.com/v1/zz_generated_prometheus_rule_controller.go index 99396e4a..2928a502 100644 --- a/apis/monitoring.coreos.com/v1/zz_generated_prometheus_rule_controller.go +++ b/apis/monitoring.coreos.com/v1/zz_generated_prometheus_rule_controller.go @@ -41,7 +41,7 @@ func NewPrometheusRule(namespace, name string, obj v1.PrometheusRule) *v1.Promet type PrometheusRuleList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.PrometheusRule + Items []v1.PrometheusRule `json:"items"` } type PrometheusRuleHandlerFunc func(key string, obj *v1.PrometheusRule) (runtime.Object, error) diff --git a/apis/monitoring.coreos.com/v1/zz_generated_scheme.go b/apis/monitoring.coreos.com/v1/zz_generated_scheme.go index deee40b3..618f255d 100644 --- a/apis/monitoring.coreos.com/v1/zz_generated_scheme.go +++ b/apis/monitoring.coreos.com/v1/zz_generated_scheme.go @@ -1,6 +1,7 @@ package v1 import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) @@ -38,5 +39,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &PrometheusRuleList{}, &ServiceMonitorList{}, ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil } diff --git a/apis/monitoring.coreos.com/v1/zz_generated_service_monitor_controller.go b/apis/monitoring.coreos.com/v1/zz_generated_service_monitor_controller.go index 21907026..f04777e7 100644 --- a/apis/monitoring.coreos.com/v1/zz_generated_service_monitor_controller.go +++ b/apis/monitoring.coreos.com/v1/zz_generated_service_monitor_controller.go @@ -41,7 +41,7 @@ func NewServiceMonitor(namespace, name string, obj v1.ServiceMonitor) *v1.Servic type ServiceMonitorList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.ServiceMonitor + Items []v1.ServiceMonitor `json:"items"` } type ServiceMonitorHandlerFunc func(key string, obj *v1.ServiceMonitor) (runtime.Object, error) diff --git a/apis/networking.k8s.io/v1/fakes/zz_generated_network_policy_mock_test.go b/apis/networking.k8s.io/v1/fakes/zz_generated_network_policy_mock_test.go new file mode 100644 index 00000000..0875582a --- /dev/null +++ b/apis/networking.k8s.io/v1/fakes/zz_generated_network_policy_mock_test.go @@ -0,0 +1,1357 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v1a "github.com/rancher/types/apis/networking.k8s.io/v1" + v1 "k8s.io/api/networking/v1" + v1b "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockNetworkPolicyListerMockGet sync.RWMutex + lockNetworkPolicyListerMockList sync.RWMutex +) + +// Ensure, that NetworkPolicyListerMock does implement NetworkPolicyLister. +// If this is not the case, regenerate this file with moq. +var _ v1a.NetworkPolicyLister = &NetworkPolicyListerMock{} + +// NetworkPolicyListerMock is a mock implementation of NetworkPolicyLister. +// +// func TestSomethingThatUsesNetworkPolicyLister(t *testing.T) { +// +// // make and configure a mocked NetworkPolicyLister +// mockedNetworkPolicyLister := &NetworkPolicyListerMock{ +// GetFunc: func(namespace string, name string) (*v1.NetworkPolicy, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v1.NetworkPolicy, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedNetworkPolicyLister in code that requires NetworkPolicyLister +// // and then make assertions. +// +// } +type NetworkPolicyListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v1.NetworkPolicy, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v1.NetworkPolicy, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *NetworkPolicyListerMock) Get(namespace string, name string) (*v1.NetworkPolicy, error) { + if mock.GetFunc == nil { + panic("NetworkPolicyListerMock.GetFunc: method is nil but NetworkPolicyLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockNetworkPolicyListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockNetworkPolicyListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedNetworkPolicyLister.GetCalls()) +func (mock *NetworkPolicyListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockNetworkPolicyListerMockGet.RLock() + calls = mock.calls.Get + lockNetworkPolicyListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *NetworkPolicyListerMock) List(namespace string, selector labels.Selector) ([]*v1.NetworkPolicy, error) { + if mock.ListFunc == nil { + panic("NetworkPolicyListerMock.ListFunc: method is nil but NetworkPolicyLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockNetworkPolicyListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockNetworkPolicyListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedNetworkPolicyLister.ListCalls()) +func (mock *NetworkPolicyListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockNetworkPolicyListerMockList.RLock() + calls = mock.calls.List + lockNetworkPolicyListerMockList.RUnlock() + return calls +} + +var ( + lockNetworkPolicyControllerMockAddClusterScopedHandler sync.RWMutex + lockNetworkPolicyControllerMockAddHandler sync.RWMutex + lockNetworkPolicyControllerMockEnqueue sync.RWMutex + lockNetworkPolicyControllerMockGeneric sync.RWMutex + lockNetworkPolicyControllerMockInformer sync.RWMutex + lockNetworkPolicyControllerMockLister sync.RWMutex + lockNetworkPolicyControllerMockStart sync.RWMutex + lockNetworkPolicyControllerMockSync sync.RWMutex +) + +// Ensure, that NetworkPolicyControllerMock does implement NetworkPolicyController. +// If this is not the case, regenerate this file with moq. +var _ v1a.NetworkPolicyController = &NetworkPolicyControllerMock{} + +// NetworkPolicyControllerMock is a mock implementation of NetworkPolicyController. +// +// func TestSomethingThatUsesNetworkPolicyController(t *testing.T) { +// +// // make and configure a mocked NetworkPolicyController +// mockedNetworkPolicyController := &NetworkPolicyControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v1a.NetworkPolicyHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v1a.NetworkPolicyHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v1a.NetworkPolicyLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedNetworkPolicyController in code that requires NetworkPolicyController +// // and then make assertions. +// +// } +type NetworkPolicyControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v1a.NetworkPolicyHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v1a.NetworkPolicyHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v1a.NetworkPolicyLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v1a.NetworkPolicyHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v1a.NetworkPolicyHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *NetworkPolicyControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v1a.NetworkPolicyHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("NetworkPolicyControllerMock.AddClusterScopedHandlerFunc: method is nil but NetworkPolicyController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.NetworkPolicyHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockNetworkPolicyControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockNetworkPolicyControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedNetworkPolicyController.AddClusterScopedHandlerCalls()) +func (mock *NetworkPolicyControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.NetworkPolicyHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.NetworkPolicyHandlerFunc + } + lockNetworkPolicyControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockNetworkPolicyControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *NetworkPolicyControllerMock) AddHandler(ctx context.Context, name string, handler v1a.NetworkPolicyHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("NetworkPolicyControllerMock.AddHandlerFunc: method is nil but NetworkPolicyController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v1a.NetworkPolicyHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockNetworkPolicyControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockNetworkPolicyControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedNetworkPolicyController.AddHandlerCalls()) +func (mock *NetworkPolicyControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v1a.NetworkPolicyHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v1a.NetworkPolicyHandlerFunc + } + lockNetworkPolicyControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockNetworkPolicyControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *NetworkPolicyControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("NetworkPolicyControllerMock.EnqueueFunc: method is nil but NetworkPolicyController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockNetworkPolicyControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockNetworkPolicyControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedNetworkPolicyController.EnqueueCalls()) +func (mock *NetworkPolicyControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockNetworkPolicyControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockNetworkPolicyControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *NetworkPolicyControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("NetworkPolicyControllerMock.GenericFunc: method is nil but NetworkPolicyController.Generic was just called") + } + callInfo := struct { + }{} + lockNetworkPolicyControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockNetworkPolicyControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedNetworkPolicyController.GenericCalls()) +func (mock *NetworkPolicyControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockNetworkPolicyControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockNetworkPolicyControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *NetworkPolicyControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("NetworkPolicyControllerMock.InformerFunc: method is nil but NetworkPolicyController.Informer was just called") + } + callInfo := struct { + }{} + lockNetworkPolicyControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockNetworkPolicyControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedNetworkPolicyController.InformerCalls()) +func (mock *NetworkPolicyControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockNetworkPolicyControllerMockInformer.RLock() + calls = mock.calls.Informer + lockNetworkPolicyControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *NetworkPolicyControllerMock) Lister() v1a.NetworkPolicyLister { + if mock.ListerFunc == nil { + panic("NetworkPolicyControllerMock.ListerFunc: method is nil but NetworkPolicyController.Lister was just called") + } + callInfo := struct { + }{} + lockNetworkPolicyControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockNetworkPolicyControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedNetworkPolicyController.ListerCalls()) +func (mock *NetworkPolicyControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockNetworkPolicyControllerMockLister.RLock() + calls = mock.calls.Lister + lockNetworkPolicyControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *NetworkPolicyControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("NetworkPolicyControllerMock.StartFunc: method is nil but NetworkPolicyController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockNetworkPolicyControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockNetworkPolicyControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedNetworkPolicyController.StartCalls()) +func (mock *NetworkPolicyControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockNetworkPolicyControllerMockStart.RLock() + calls = mock.calls.Start + lockNetworkPolicyControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *NetworkPolicyControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("NetworkPolicyControllerMock.SyncFunc: method is nil but NetworkPolicyController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockNetworkPolicyControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockNetworkPolicyControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedNetworkPolicyController.SyncCalls()) +func (mock *NetworkPolicyControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockNetworkPolicyControllerMockSync.RLock() + calls = mock.calls.Sync + lockNetworkPolicyControllerMockSync.RUnlock() + return calls +} + +var ( + lockNetworkPolicyInterfaceMockAddClusterScopedHandler sync.RWMutex + lockNetworkPolicyInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockNetworkPolicyInterfaceMockAddHandler sync.RWMutex + lockNetworkPolicyInterfaceMockAddLifecycle sync.RWMutex + lockNetworkPolicyInterfaceMockController sync.RWMutex + lockNetworkPolicyInterfaceMockCreate sync.RWMutex + lockNetworkPolicyInterfaceMockDelete sync.RWMutex + lockNetworkPolicyInterfaceMockDeleteCollection sync.RWMutex + lockNetworkPolicyInterfaceMockDeleteNamespaced sync.RWMutex + lockNetworkPolicyInterfaceMockGet sync.RWMutex + lockNetworkPolicyInterfaceMockGetNamespaced sync.RWMutex + lockNetworkPolicyInterfaceMockList sync.RWMutex + lockNetworkPolicyInterfaceMockObjectClient sync.RWMutex + lockNetworkPolicyInterfaceMockUpdate sync.RWMutex + lockNetworkPolicyInterfaceMockWatch sync.RWMutex +) + +// Ensure, that NetworkPolicyInterfaceMock does implement NetworkPolicyInterface. +// If this is not the case, regenerate this file with moq. +var _ v1a.NetworkPolicyInterface = &NetworkPolicyInterfaceMock{} + +// NetworkPolicyInterfaceMock is a mock implementation of NetworkPolicyInterface. +// +// func TestSomethingThatUsesNetworkPolicyInterface(t *testing.T) { +// +// // make and configure a mocked NetworkPolicyInterface +// mockedNetworkPolicyInterface := &NetworkPolicyInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v1a.NetworkPolicyHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v1a.NetworkPolicyLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v1a.NetworkPolicyHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v1a.NetworkPolicyLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v1a.NetworkPolicyController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v1.NetworkPolicy) (*v1.NetworkPolicy, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1b.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1b.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1b.GetOptions) (*v1.NetworkPolicy, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.NetworkPolicy, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1b.ListOptions) (*v1a.NetworkPolicyList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v1.NetworkPolicy) (*v1.NetworkPolicy, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1b.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedNetworkPolicyInterface in code that requires NetworkPolicyInterface +// // and then make assertions. +// +// } +type NetworkPolicyInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v1a.NetworkPolicyHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v1a.NetworkPolicyLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v1a.NetworkPolicyHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v1a.NetworkPolicyLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v1a.NetworkPolicyController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v1.NetworkPolicy) (*v1.NetworkPolicy, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1b.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1b.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1b.GetOptions) (*v1.NetworkPolicy, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.NetworkPolicy, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1b.ListOptions) (*v1a.NetworkPolicyList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v1.NetworkPolicy) (*v1.NetworkPolicy, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1b.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v1a.NetworkPolicyHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v1a.NetworkPolicyLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v1a.NetworkPolicyHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v1a.NetworkPolicyLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v1.NetworkPolicy + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1b.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1b.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1b.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1b.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1b.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1b.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1b.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v1.NetworkPolicy + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1b.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *NetworkPolicyInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v1a.NetworkPolicyHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("NetworkPolicyInterfaceMock.AddClusterScopedHandlerFunc: method is nil but NetworkPolicyInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.NetworkPolicyHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockNetworkPolicyInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockNetworkPolicyInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedNetworkPolicyInterface.AddClusterScopedHandlerCalls()) +func (mock *NetworkPolicyInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.NetworkPolicyHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.NetworkPolicyHandlerFunc + } + lockNetworkPolicyInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockNetworkPolicyInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *NetworkPolicyInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v1a.NetworkPolicyLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("NetworkPolicyInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but NetworkPolicyInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.NetworkPolicyLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockNetworkPolicyInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockNetworkPolicyInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedNetworkPolicyInterface.AddClusterScopedLifecycleCalls()) +func (mock *NetworkPolicyInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.NetworkPolicyLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.NetworkPolicyLifecycle + } + lockNetworkPolicyInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockNetworkPolicyInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *NetworkPolicyInterfaceMock) AddHandler(ctx context.Context, name string, sync v1a.NetworkPolicyHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("NetworkPolicyInterfaceMock.AddHandlerFunc: method is nil but NetworkPolicyInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v1a.NetworkPolicyHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockNetworkPolicyInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockNetworkPolicyInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedNetworkPolicyInterface.AddHandlerCalls()) +func (mock *NetworkPolicyInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v1a.NetworkPolicyHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v1a.NetworkPolicyHandlerFunc + } + lockNetworkPolicyInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockNetworkPolicyInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *NetworkPolicyInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v1a.NetworkPolicyLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("NetworkPolicyInterfaceMock.AddLifecycleFunc: method is nil but NetworkPolicyInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v1a.NetworkPolicyLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockNetworkPolicyInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockNetworkPolicyInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedNetworkPolicyInterface.AddLifecycleCalls()) +func (mock *NetworkPolicyInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v1a.NetworkPolicyLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v1a.NetworkPolicyLifecycle + } + lockNetworkPolicyInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockNetworkPolicyInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *NetworkPolicyInterfaceMock) Controller() v1a.NetworkPolicyController { + if mock.ControllerFunc == nil { + panic("NetworkPolicyInterfaceMock.ControllerFunc: method is nil but NetworkPolicyInterface.Controller was just called") + } + callInfo := struct { + }{} + lockNetworkPolicyInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockNetworkPolicyInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedNetworkPolicyInterface.ControllerCalls()) +func (mock *NetworkPolicyInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockNetworkPolicyInterfaceMockController.RLock() + calls = mock.calls.Controller + lockNetworkPolicyInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *NetworkPolicyInterfaceMock) Create(in1 *v1.NetworkPolicy) (*v1.NetworkPolicy, error) { + if mock.CreateFunc == nil { + panic("NetworkPolicyInterfaceMock.CreateFunc: method is nil but NetworkPolicyInterface.Create was just called") + } + callInfo := struct { + In1 *v1.NetworkPolicy + }{ + In1: in1, + } + lockNetworkPolicyInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockNetworkPolicyInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedNetworkPolicyInterface.CreateCalls()) +func (mock *NetworkPolicyInterfaceMock) CreateCalls() []struct { + In1 *v1.NetworkPolicy +} { + var calls []struct { + In1 *v1.NetworkPolicy + } + lockNetworkPolicyInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockNetworkPolicyInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *NetworkPolicyInterfaceMock) Delete(name string, options *v1b.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("NetworkPolicyInterfaceMock.DeleteFunc: method is nil but NetworkPolicyInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1b.DeleteOptions + }{ + Name: name, + Options: options, + } + lockNetworkPolicyInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockNetworkPolicyInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedNetworkPolicyInterface.DeleteCalls()) +func (mock *NetworkPolicyInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1b.DeleteOptions +} { + var calls []struct { + Name string + Options *v1b.DeleteOptions + } + lockNetworkPolicyInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockNetworkPolicyInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *NetworkPolicyInterfaceMock) DeleteCollection(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("NetworkPolicyInterfaceMock.DeleteCollectionFunc: method is nil but NetworkPolicyInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockNetworkPolicyInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockNetworkPolicyInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedNetworkPolicyInterface.DeleteCollectionCalls()) +func (mock *NetworkPolicyInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions +} { + var calls []struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions + } + lockNetworkPolicyInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockNetworkPolicyInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *NetworkPolicyInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1b.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("NetworkPolicyInterfaceMock.DeleteNamespacedFunc: method is nil but NetworkPolicyInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1b.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockNetworkPolicyInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockNetworkPolicyInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedNetworkPolicyInterface.DeleteNamespacedCalls()) +func (mock *NetworkPolicyInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1b.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1b.DeleteOptions + } + lockNetworkPolicyInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockNetworkPolicyInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *NetworkPolicyInterfaceMock) Get(name string, opts v1b.GetOptions) (*v1.NetworkPolicy, error) { + if mock.GetFunc == nil { + panic("NetworkPolicyInterfaceMock.GetFunc: method is nil but NetworkPolicyInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1b.GetOptions + }{ + Name: name, + Opts: opts, + } + lockNetworkPolicyInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockNetworkPolicyInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedNetworkPolicyInterface.GetCalls()) +func (mock *NetworkPolicyInterfaceMock) GetCalls() []struct { + Name string + Opts v1b.GetOptions +} { + var calls []struct { + Name string + Opts v1b.GetOptions + } + lockNetworkPolicyInterfaceMockGet.RLock() + calls = mock.calls.Get + lockNetworkPolicyInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *NetworkPolicyInterfaceMock) GetNamespaced(namespace string, name string, opts v1b.GetOptions) (*v1.NetworkPolicy, error) { + if mock.GetNamespacedFunc == nil { + panic("NetworkPolicyInterfaceMock.GetNamespacedFunc: method is nil but NetworkPolicyInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1b.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockNetworkPolicyInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockNetworkPolicyInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedNetworkPolicyInterface.GetNamespacedCalls()) +func (mock *NetworkPolicyInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1b.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1b.GetOptions + } + lockNetworkPolicyInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockNetworkPolicyInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *NetworkPolicyInterfaceMock) List(opts v1b.ListOptions) (*v1a.NetworkPolicyList, error) { + if mock.ListFunc == nil { + panic("NetworkPolicyInterfaceMock.ListFunc: method is nil but NetworkPolicyInterface.List was just called") + } + callInfo := struct { + Opts v1b.ListOptions + }{ + Opts: opts, + } + lockNetworkPolicyInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockNetworkPolicyInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedNetworkPolicyInterface.ListCalls()) +func (mock *NetworkPolicyInterfaceMock) ListCalls() []struct { + Opts v1b.ListOptions +} { + var calls []struct { + Opts v1b.ListOptions + } + lockNetworkPolicyInterfaceMockList.RLock() + calls = mock.calls.List + lockNetworkPolicyInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *NetworkPolicyInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("NetworkPolicyInterfaceMock.ObjectClientFunc: method is nil but NetworkPolicyInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockNetworkPolicyInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockNetworkPolicyInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedNetworkPolicyInterface.ObjectClientCalls()) +func (mock *NetworkPolicyInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockNetworkPolicyInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockNetworkPolicyInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *NetworkPolicyInterfaceMock) Update(in1 *v1.NetworkPolicy) (*v1.NetworkPolicy, error) { + if mock.UpdateFunc == nil { + panic("NetworkPolicyInterfaceMock.UpdateFunc: method is nil but NetworkPolicyInterface.Update was just called") + } + callInfo := struct { + In1 *v1.NetworkPolicy + }{ + In1: in1, + } + lockNetworkPolicyInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockNetworkPolicyInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedNetworkPolicyInterface.UpdateCalls()) +func (mock *NetworkPolicyInterfaceMock) UpdateCalls() []struct { + In1 *v1.NetworkPolicy +} { + var calls []struct { + In1 *v1.NetworkPolicy + } + lockNetworkPolicyInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockNetworkPolicyInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *NetworkPolicyInterfaceMock) Watch(opts v1b.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("NetworkPolicyInterfaceMock.WatchFunc: method is nil but NetworkPolicyInterface.Watch was just called") + } + callInfo := struct { + Opts v1b.ListOptions + }{ + Opts: opts, + } + lockNetworkPolicyInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockNetworkPolicyInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedNetworkPolicyInterface.WatchCalls()) +func (mock *NetworkPolicyInterfaceMock) WatchCalls() []struct { + Opts v1b.ListOptions +} { + var calls []struct { + Opts v1b.ListOptions + } + lockNetworkPolicyInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockNetworkPolicyInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockNetworkPoliciesGetterMockNetworkPolicies sync.RWMutex +) + +// Ensure, that NetworkPoliciesGetterMock does implement NetworkPoliciesGetter. +// If this is not the case, regenerate this file with moq. +var _ v1a.NetworkPoliciesGetter = &NetworkPoliciesGetterMock{} + +// NetworkPoliciesGetterMock is a mock implementation of NetworkPoliciesGetter. +// +// func TestSomethingThatUsesNetworkPoliciesGetter(t *testing.T) { +// +// // make and configure a mocked NetworkPoliciesGetter +// mockedNetworkPoliciesGetter := &NetworkPoliciesGetterMock{ +// NetworkPoliciesFunc: func(namespace string) v1a.NetworkPolicyInterface { +// panic("mock out the NetworkPolicies method") +// }, +// } +// +// // use mockedNetworkPoliciesGetter in code that requires NetworkPoliciesGetter +// // and then make assertions. +// +// } +type NetworkPoliciesGetterMock struct { + // NetworkPoliciesFunc mocks the NetworkPolicies method. + NetworkPoliciesFunc func(namespace string) v1a.NetworkPolicyInterface + + // calls tracks calls to the methods. + calls struct { + // NetworkPolicies holds details about calls to the NetworkPolicies method. + NetworkPolicies []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// NetworkPolicies calls NetworkPoliciesFunc. +func (mock *NetworkPoliciesGetterMock) NetworkPolicies(namespace string) v1a.NetworkPolicyInterface { + if mock.NetworkPoliciesFunc == nil { + panic("NetworkPoliciesGetterMock.NetworkPoliciesFunc: method is nil but NetworkPoliciesGetter.NetworkPolicies was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockNetworkPoliciesGetterMockNetworkPolicies.Lock() + mock.calls.NetworkPolicies = append(mock.calls.NetworkPolicies, callInfo) + lockNetworkPoliciesGetterMockNetworkPolicies.Unlock() + return mock.NetworkPoliciesFunc(namespace) +} + +// NetworkPoliciesCalls gets all the calls that were made to NetworkPolicies. +// Check the length with: +// len(mockedNetworkPoliciesGetter.NetworkPoliciesCalls()) +func (mock *NetworkPoliciesGetterMock) NetworkPoliciesCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockNetworkPoliciesGetterMockNetworkPolicies.RLock() + calls = mock.calls.NetworkPolicies + lockNetworkPoliciesGetterMockNetworkPolicies.RUnlock() + return calls +} diff --git a/apis/networking.k8s.io/v1/zz_generated_network_policy_controller.go b/apis/networking.k8s.io/v1/zz_generated_network_policy_controller.go index 67a2be7d..aee2ecd4 100644 --- a/apis/networking.k8s.io/v1/zz_generated_network_policy_controller.go +++ b/apis/networking.k8s.io/v1/zz_generated_network_policy_controller.go @@ -41,7 +41,7 @@ func NewNetworkPolicy(namespace, name string, obj v1.NetworkPolicy) *v1.NetworkP type NetworkPolicyList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.NetworkPolicy + Items []v1.NetworkPolicy `json:"items"` } type NetworkPolicyHandlerFunc func(key string, obj *v1.NetworkPolicy) (runtime.Object, error) diff --git a/apis/networking.k8s.io/v1/zz_generated_scheme.go b/apis/networking.k8s.io/v1/zz_generated_scheme.go index ae63aa67..108333ea 100644 --- a/apis/networking.k8s.io/v1/zz_generated_scheme.go +++ b/apis/networking.k8s.io/v1/zz_generated_scheme.go @@ -1,6 +1,7 @@ package v1 import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) @@ -35,5 +36,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &NetworkPolicyList{}, ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil } diff --git a/apis/project.cattle.io/v3/fakes/zz_generated_app_mock_test.go b/apis/project.cattle.io/v3/fakes/zz_generated_app_mock_test.go new file mode 100644 index 00000000..21b9c8fb --- /dev/null +++ b/apis/project.cattle.io/v3/fakes/zz_generated_app_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/project.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockAppListerMockGet sync.RWMutex + lockAppListerMockList sync.RWMutex +) + +// Ensure, that AppListerMock does implement AppLister. +// If this is not the case, regenerate this file with moq. +var _ v3.AppLister = &AppListerMock{} + +// AppListerMock is a mock implementation of AppLister. +// +// func TestSomethingThatUsesAppLister(t *testing.T) { +// +// // make and configure a mocked AppLister +// mockedAppLister := &AppListerMock{ +// GetFunc: func(namespace string, name string) (*v3.App, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.App, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedAppLister in code that requires AppLister +// // and then make assertions. +// +// } +type AppListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.App, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.App, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *AppListerMock) Get(namespace string, name string) (*v3.App, error) { + if mock.GetFunc == nil { + panic("AppListerMock.GetFunc: method is nil but AppLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockAppListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockAppListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedAppLister.GetCalls()) +func (mock *AppListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockAppListerMockGet.RLock() + calls = mock.calls.Get + lockAppListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *AppListerMock) List(namespace string, selector labels.Selector) ([]*v3.App, error) { + if mock.ListFunc == nil { + panic("AppListerMock.ListFunc: method is nil but AppLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockAppListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockAppListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedAppLister.ListCalls()) +func (mock *AppListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockAppListerMockList.RLock() + calls = mock.calls.List + lockAppListerMockList.RUnlock() + return calls +} + +var ( + lockAppControllerMockAddClusterScopedHandler sync.RWMutex + lockAppControllerMockAddHandler sync.RWMutex + lockAppControllerMockEnqueue sync.RWMutex + lockAppControllerMockGeneric sync.RWMutex + lockAppControllerMockInformer sync.RWMutex + lockAppControllerMockLister sync.RWMutex + lockAppControllerMockStart sync.RWMutex + lockAppControllerMockSync sync.RWMutex +) + +// Ensure, that AppControllerMock does implement AppController. +// If this is not the case, regenerate this file with moq. +var _ v3.AppController = &AppControllerMock{} + +// AppControllerMock is a mock implementation of AppController. +// +// func TestSomethingThatUsesAppController(t *testing.T) { +// +// // make and configure a mocked AppController +// mockedAppController := &AppControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.AppHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.AppHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.AppLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedAppController in code that requires AppController +// // and then make assertions. +// +// } +type AppControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.AppHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.AppHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.AppLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.AppHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.AppHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *AppControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.AppHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("AppControllerMock.AddClusterScopedHandlerFunc: method is nil but AppController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.AppHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockAppControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockAppControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedAppController.AddClusterScopedHandlerCalls()) +func (mock *AppControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.AppHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.AppHandlerFunc + } + lockAppControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockAppControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *AppControllerMock) AddHandler(ctx context.Context, name string, handler v3.AppHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("AppControllerMock.AddHandlerFunc: method is nil but AppController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.AppHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockAppControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockAppControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedAppController.AddHandlerCalls()) +func (mock *AppControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.AppHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.AppHandlerFunc + } + lockAppControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockAppControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *AppControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("AppControllerMock.EnqueueFunc: method is nil but AppController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockAppControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockAppControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedAppController.EnqueueCalls()) +func (mock *AppControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockAppControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockAppControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *AppControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("AppControllerMock.GenericFunc: method is nil but AppController.Generic was just called") + } + callInfo := struct { + }{} + lockAppControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockAppControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedAppController.GenericCalls()) +func (mock *AppControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockAppControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockAppControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *AppControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("AppControllerMock.InformerFunc: method is nil but AppController.Informer was just called") + } + callInfo := struct { + }{} + lockAppControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockAppControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedAppController.InformerCalls()) +func (mock *AppControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockAppControllerMockInformer.RLock() + calls = mock.calls.Informer + lockAppControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *AppControllerMock) Lister() v3.AppLister { + if mock.ListerFunc == nil { + panic("AppControllerMock.ListerFunc: method is nil but AppController.Lister was just called") + } + callInfo := struct { + }{} + lockAppControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockAppControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedAppController.ListerCalls()) +func (mock *AppControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockAppControllerMockLister.RLock() + calls = mock.calls.Lister + lockAppControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *AppControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("AppControllerMock.StartFunc: method is nil but AppController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockAppControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockAppControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedAppController.StartCalls()) +func (mock *AppControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockAppControllerMockStart.RLock() + calls = mock.calls.Start + lockAppControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *AppControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("AppControllerMock.SyncFunc: method is nil but AppController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockAppControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockAppControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedAppController.SyncCalls()) +func (mock *AppControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockAppControllerMockSync.RLock() + calls = mock.calls.Sync + lockAppControllerMockSync.RUnlock() + return calls +} + +var ( + lockAppInterfaceMockAddClusterScopedHandler sync.RWMutex + lockAppInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockAppInterfaceMockAddHandler sync.RWMutex + lockAppInterfaceMockAddLifecycle sync.RWMutex + lockAppInterfaceMockController sync.RWMutex + lockAppInterfaceMockCreate sync.RWMutex + lockAppInterfaceMockDelete sync.RWMutex + lockAppInterfaceMockDeleteCollection sync.RWMutex + lockAppInterfaceMockDeleteNamespaced sync.RWMutex + lockAppInterfaceMockGet sync.RWMutex + lockAppInterfaceMockGetNamespaced sync.RWMutex + lockAppInterfaceMockList sync.RWMutex + lockAppInterfaceMockObjectClient sync.RWMutex + lockAppInterfaceMockUpdate sync.RWMutex + lockAppInterfaceMockWatch sync.RWMutex +) + +// Ensure, that AppInterfaceMock does implement AppInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.AppInterface = &AppInterfaceMock{} + +// AppInterfaceMock is a mock implementation of AppInterface. +// +// func TestSomethingThatUsesAppInterface(t *testing.T) { +// +// // make and configure a mocked AppInterface +// mockedAppInterface := &AppInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.AppHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.AppLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.AppHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.AppLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.AppController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.App) (*v3.App, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.App, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.App, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.AppList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.App) (*v3.App, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedAppInterface in code that requires AppInterface +// // and then make assertions. +// +// } +type AppInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.AppHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.AppLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.AppHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.AppLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.AppController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.App) (*v3.App, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.App, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.App, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.AppList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.App) (*v3.App, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.AppHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.AppLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.AppHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.AppLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.App + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.App + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *AppInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.AppHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("AppInterfaceMock.AddClusterScopedHandlerFunc: method is nil but AppInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.AppHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockAppInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockAppInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedAppInterface.AddClusterScopedHandlerCalls()) +func (mock *AppInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.AppHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.AppHandlerFunc + } + lockAppInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockAppInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *AppInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.AppLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("AppInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but AppInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.AppLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockAppInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockAppInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedAppInterface.AddClusterScopedLifecycleCalls()) +func (mock *AppInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.AppLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.AppLifecycle + } + lockAppInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockAppInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *AppInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.AppHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("AppInterfaceMock.AddHandlerFunc: method is nil but AppInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.AppHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockAppInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockAppInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedAppInterface.AddHandlerCalls()) +func (mock *AppInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.AppHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.AppHandlerFunc + } + lockAppInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockAppInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *AppInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.AppLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("AppInterfaceMock.AddLifecycleFunc: method is nil but AppInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.AppLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockAppInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockAppInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedAppInterface.AddLifecycleCalls()) +func (mock *AppInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.AppLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.AppLifecycle + } + lockAppInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockAppInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *AppInterfaceMock) Controller() v3.AppController { + if mock.ControllerFunc == nil { + panic("AppInterfaceMock.ControllerFunc: method is nil but AppInterface.Controller was just called") + } + callInfo := struct { + }{} + lockAppInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockAppInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedAppInterface.ControllerCalls()) +func (mock *AppInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockAppInterfaceMockController.RLock() + calls = mock.calls.Controller + lockAppInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *AppInterfaceMock) Create(in1 *v3.App) (*v3.App, error) { + if mock.CreateFunc == nil { + panic("AppInterfaceMock.CreateFunc: method is nil but AppInterface.Create was just called") + } + callInfo := struct { + In1 *v3.App + }{ + In1: in1, + } + lockAppInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockAppInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedAppInterface.CreateCalls()) +func (mock *AppInterfaceMock) CreateCalls() []struct { + In1 *v3.App +} { + var calls []struct { + In1 *v3.App + } + lockAppInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockAppInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *AppInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("AppInterfaceMock.DeleteFunc: method is nil but AppInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockAppInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockAppInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedAppInterface.DeleteCalls()) +func (mock *AppInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockAppInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockAppInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *AppInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("AppInterfaceMock.DeleteCollectionFunc: method is nil but AppInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockAppInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockAppInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedAppInterface.DeleteCollectionCalls()) +func (mock *AppInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockAppInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockAppInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *AppInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("AppInterfaceMock.DeleteNamespacedFunc: method is nil but AppInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockAppInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockAppInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedAppInterface.DeleteNamespacedCalls()) +func (mock *AppInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockAppInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockAppInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *AppInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.App, error) { + if mock.GetFunc == nil { + panic("AppInterfaceMock.GetFunc: method is nil but AppInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockAppInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockAppInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedAppInterface.GetCalls()) +func (mock *AppInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockAppInterfaceMockGet.RLock() + calls = mock.calls.Get + lockAppInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *AppInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.App, error) { + if mock.GetNamespacedFunc == nil { + panic("AppInterfaceMock.GetNamespacedFunc: method is nil but AppInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockAppInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockAppInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedAppInterface.GetNamespacedCalls()) +func (mock *AppInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockAppInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockAppInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *AppInterfaceMock) List(opts v1.ListOptions) (*v3.AppList, error) { + if mock.ListFunc == nil { + panic("AppInterfaceMock.ListFunc: method is nil but AppInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockAppInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockAppInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedAppInterface.ListCalls()) +func (mock *AppInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockAppInterfaceMockList.RLock() + calls = mock.calls.List + lockAppInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *AppInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("AppInterfaceMock.ObjectClientFunc: method is nil but AppInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockAppInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockAppInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedAppInterface.ObjectClientCalls()) +func (mock *AppInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockAppInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockAppInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *AppInterfaceMock) Update(in1 *v3.App) (*v3.App, error) { + if mock.UpdateFunc == nil { + panic("AppInterfaceMock.UpdateFunc: method is nil but AppInterface.Update was just called") + } + callInfo := struct { + In1 *v3.App + }{ + In1: in1, + } + lockAppInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockAppInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedAppInterface.UpdateCalls()) +func (mock *AppInterfaceMock) UpdateCalls() []struct { + In1 *v3.App +} { + var calls []struct { + In1 *v3.App + } + lockAppInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockAppInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *AppInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("AppInterfaceMock.WatchFunc: method is nil but AppInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockAppInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockAppInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedAppInterface.WatchCalls()) +func (mock *AppInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockAppInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockAppInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockAppsGetterMockApps sync.RWMutex +) + +// Ensure, that AppsGetterMock does implement AppsGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.AppsGetter = &AppsGetterMock{} + +// AppsGetterMock is a mock implementation of AppsGetter. +// +// func TestSomethingThatUsesAppsGetter(t *testing.T) { +// +// // make and configure a mocked AppsGetter +// mockedAppsGetter := &AppsGetterMock{ +// AppsFunc: func(namespace string) v3.AppInterface { +// panic("mock out the Apps method") +// }, +// } +// +// // use mockedAppsGetter in code that requires AppsGetter +// // and then make assertions. +// +// } +type AppsGetterMock struct { + // AppsFunc mocks the Apps method. + AppsFunc func(namespace string) v3.AppInterface + + // calls tracks calls to the methods. + calls struct { + // Apps holds details about calls to the Apps method. + Apps []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// Apps calls AppsFunc. +func (mock *AppsGetterMock) Apps(namespace string) v3.AppInterface { + if mock.AppsFunc == nil { + panic("AppsGetterMock.AppsFunc: method is nil but AppsGetter.Apps was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockAppsGetterMockApps.Lock() + mock.calls.Apps = append(mock.calls.Apps, callInfo) + lockAppsGetterMockApps.Unlock() + return mock.AppsFunc(namespace) +} + +// AppsCalls gets all the calls that were made to Apps. +// Check the length with: +// len(mockedAppsGetter.AppsCalls()) +func (mock *AppsGetterMock) AppsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockAppsGetterMockApps.RLock() + calls = mock.calls.Apps + lockAppsGetterMockApps.RUnlock() + return calls +} diff --git a/apis/project.cattle.io/v3/fakes/zz_generated_app_revision_mock_test.go b/apis/project.cattle.io/v3/fakes/zz_generated_app_revision_mock_test.go new file mode 100644 index 00000000..1b8d8153 --- /dev/null +++ b/apis/project.cattle.io/v3/fakes/zz_generated_app_revision_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/project.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockAppRevisionListerMockGet sync.RWMutex + lockAppRevisionListerMockList sync.RWMutex +) + +// Ensure, that AppRevisionListerMock does implement AppRevisionLister. +// If this is not the case, regenerate this file with moq. +var _ v3.AppRevisionLister = &AppRevisionListerMock{} + +// AppRevisionListerMock is a mock implementation of AppRevisionLister. +// +// func TestSomethingThatUsesAppRevisionLister(t *testing.T) { +// +// // make and configure a mocked AppRevisionLister +// mockedAppRevisionLister := &AppRevisionListerMock{ +// GetFunc: func(namespace string, name string) (*v3.AppRevision, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.AppRevision, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedAppRevisionLister in code that requires AppRevisionLister +// // and then make assertions. +// +// } +type AppRevisionListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.AppRevision, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.AppRevision, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *AppRevisionListerMock) Get(namespace string, name string) (*v3.AppRevision, error) { + if mock.GetFunc == nil { + panic("AppRevisionListerMock.GetFunc: method is nil but AppRevisionLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockAppRevisionListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockAppRevisionListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedAppRevisionLister.GetCalls()) +func (mock *AppRevisionListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockAppRevisionListerMockGet.RLock() + calls = mock.calls.Get + lockAppRevisionListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *AppRevisionListerMock) List(namespace string, selector labels.Selector) ([]*v3.AppRevision, error) { + if mock.ListFunc == nil { + panic("AppRevisionListerMock.ListFunc: method is nil but AppRevisionLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockAppRevisionListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockAppRevisionListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedAppRevisionLister.ListCalls()) +func (mock *AppRevisionListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockAppRevisionListerMockList.RLock() + calls = mock.calls.List + lockAppRevisionListerMockList.RUnlock() + return calls +} + +var ( + lockAppRevisionControllerMockAddClusterScopedHandler sync.RWMutex + lockAppRevisionControllerMockAddHandler sync.RWMutex + lockAppRevisionControllerMockEnqueue sync.RWMutex + lockAppRevisionControllerMockGeneric sync.RWMutex + lockAppRevisionControllerMockInformer sync.RWMutex + lockAppRevisionControllerMockLister sync.RWMutex + lockAppRevisionControllerMockStart sync.RWMutex + lockAppRevisionControllerMockSync sync.RWMutex +) + +// Ensure, that AppRevisionControllerMock does implement AppRevisionController. +// If this is not the case, regenerate this file with moq. +var _ v3.AppRevisionController = &AppRevisionControllerMock{} + +// AppRevisionControllerMock is a mock implementation of AppRevisionController. +// +// func TestSomethingThatUsesAppRevisionController(t *testing.T) { +// +// // make and configure a mocked AppRevisionController +// mockedAppRevisionController := &AppRevisionControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.AppRevisionHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.AppRevisionHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.AppRevisionLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedAppRevisionController in code that requires AppRevisionController +// // and then make assertions. +// +// } +type AppRevisionControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.AppRevisionHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.AppRevisionHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.AppRevisionLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.AppRevisionHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.AppRevisionHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *AppRevisionControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.AppRevisionHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("AppRevisionControllerMock.AddClusterScopedHandlerFunc: method is nil but AppRevisionController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.AppRevisionHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockAppRevisionControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockAppRevisionControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedAppRevisionController.AddClusterScopedHandlerCalls()) +func (mock *AppRevisionControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.AppRevisionHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.AppRevisionHandlerFunc + } + lockAppRevisionControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockAppRevisionControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *AppRevisionControllerMock) AddHandler(ctx context.Context, name string, handler v3.AppRevisionHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("AppRevisionControllerMock.AddHandlerFunc: method is nil but AppRevisionController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.AppRevisionHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockAppRevisionControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockAppRevisionControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedAppRevisionController.AddHandlerCalls()) +func (mock *AppRevisionControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.AppRevisionHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.AppRevisionHandlerFunc + } + lockAppRevisionControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockAppRevisionControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *AppRevisionControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("AppRevisionControllerMock.EnqueueFunc: method is nil but AppRevisionController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockAppRevisionControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockAppRevisionControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedAppRevisionController.EnqueueCalls()) +func (mock *AppRevisionControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockAppRevisionControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockAppRevisionControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *AppRevisionControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("AppRevisionControllerMock.GenericFunc: method is nil but AppRevisionController.Generic was just called") + } + callInfo := struct { + }{} + lockAppRevisionControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockAppRevisionControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedAppRevisionController.GenericCalls()) +func (mock *AppRevisionControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockAppRevisionControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockAppRevisionControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *AppRevisionControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("AppRevisionControllerMock.InformerFunc: method is nil but AppRevisionController.Informer was just called") + } + callInfo := struct { + }{} + lockAppRevisionControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockAppRevisionControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedAppRevisionController.InformerCalls()) +func (mock *AppRevisionControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockAppRevisionControllerMockInformer.RLock() + calls = mock.calls.Informer + lockAppRevisionControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *AppRevisionControllerMock) Lister() v3.AppRevisionLister { + if mock.ListerFunc == nil { + panic("AppRevisionControllerMock.ListerFunc: method is nil but AppRevisionController.Lister was just called") + } + callInfo := struct { + }{} + lockAppRevisionControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockAppRevisionControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedAppRevisionController.ListerCalls()) +func (mock *AppRevisionControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockAppRevisionControllerMockLister.RLock() + calls = mock.calls.Lister + lockAppRevisionControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *AppRevisionControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("AppRevisionControllerMock.StartFunc: method is nil but AppRevisionController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockAppRevisionControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockAppRevisionControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedAppRevisionController.StartCalls()) +func (mock *AppRevisionControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockAppRevisionControllerMockStart.RLock() + calls = mock.calls.Start + lockAppRevisionControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *AppRevisionControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("AppRevisionControllerMock.SyncFunc: method is nil but AppRevisionController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockAppRevisionControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockAppRevisionControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedAppRevisionController.SyncCalls()) +func (mock *AppRevisionControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockAppRevisionControllerMockSync.RLock() + calls = mock.calls.Sync + lockAppRevisionControllerMockSync.RUnlock() + return calls +} + +var ( + lockAppRevisionInterfaceMockAddClusterScopedHandler sync.RWMutex + lockAppRevisionInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockAppRevisionInterfaceMockAddHandler sync.RWMutex + lockAppRevisionInterfaceMockAddLifecycle sync.RWMutex + lockAppRevisionInterfaceMockController sync.RWMutex + lockAppRevisionInterfaceMockCreate sync.RWMutex + lockAppRevisionInterfaceMockDelete sync.RWMutex + lockAppRevisionInterfaceMockDeleteCollection sync.RWMutex + lockAppRevisionInterfaceMockDeleteNamespaced sync.RWMutex + lockAppRevisionInterfaceMockGet sync.RWMutex + lockAppRevisionInterfaceMockGetNamespaced sync.RWMutex + lockAppRevisionInterfaceMockList sync.RWMutex + lockAppRevisionInterfaceMockObjectClient sync.RWMutex + lockAppRevisionInterfaceMockUpdate sync.RWMutex + lockAppRevisionInterfaceMockWatch sync.RWMutex +) + +// Ensure, that AppRevisionInterfaceMock does implement AppRevisionInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.AppRevisionInterface = &AppRevisionInterfaceMock{} + +// AppRevisionInterfaceMock is a mock implementation of AppRevisionInterface. +// +// func TestSomethingThatUsesAppRevisionInterface(t *testing.T) { +// +// // make and configure a mocked AppRevisionInterface +// mockedAppRevisionInterface := &AppRevisionInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.AppRevisionHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.AppRevisionLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.AppRevisionHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.AppRevisionLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.AppRevisionController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.AppRevision) (*v3.AppRevision, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.AppRevision, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.AppRevision, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.AppRevisionList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.AppRevision) (*v3.AppRevision, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedAppRevisionInterface in code that requires AppRevisionInterface +// // and then make assertions. +// +// } +type AppRevisionInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.AppRevisionHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.AppRevisionLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.AppRevisionHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.AppRevisionLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.AppRevisionController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.AppRevision) (*v3.AppRevision, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.AppRevision, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.AppRevision, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.AppRevisionList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.AppRevision) (*v3.AppRevision, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.AppRevisionHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.AppRevisionLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.AppRevisionHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.AppRevisionLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.AppRevision + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.AppRevision + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *AppRevisionInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.AppRevisionHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("AppRevisionInterfaceMock.AddClusterScopedHandlerFunc: method is nil but AppRevisionInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.AppRevisionHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockAppRevisionInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockAppRevisionInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedAppRevisionInterface.AddClusterScopedHandlerCalls()) +func (mock *AppRevisionInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.AppRevisionHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.AppRevisionHandlerFunc + } + lockAppRevisionInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockAppRevisionInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *AppRevisionInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.AppRevisionLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("AppRevisionInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but AppRevisionInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.AppRevisionLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockAppRevisionInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockAppRevisionInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedAppRevisionInterface.AddClusterScopedLifecycleCalls()) +func (mock *AppRevisionInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.AppRevisionLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.AppRevisionLifecycle + } + lockAppRevisionInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockAppRevisionInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *AppRevisionInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.AppRevisionHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("AppRevisionInterfaceMock.AddHandlerFunc: method is nil but AppRevisionInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.AppRevisionHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockAppRevisionInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockAppRevisionInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedAppRevisionInterface.AddHandlerCalls()) +func (mock *AppRevisionInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.AppRevisionHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.AppRevisionHandlerFunc + } + lockAppRevisionInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockAppRevisionInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *AppRevisionInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.AppRevisionLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("AppRevisionInterfaceMock.AddLifecycleFunc: method is nil but AppRevisionInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.AppRevisionLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockAppRevisionInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockAppRevisionInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedAppRevisionInterface.AddLifecycleCalls()) +func (mock *AppRevisionInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.AppRevisionLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.AppRevisionLifecycle + } + lockAppRevisionInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockAppRevisionInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *AppRevisionInterfaceMock) Controller() v3.AppRevisionController { + if mock.ControllerFunc == nil { + panic("AppRevisionInterfaceMock.ControllerFunc: method is nil but AppRevisionInterface.Controller was just called") + } + callInfo := struct { + }{} + lockAppRevisionInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockAppRevisionInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedAppRevisionInterface.ControllerCalls()) +func (mock *AppRevisionInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockAppRevisionInterfaceMockController.RLock() + calls = mock.calls.Controller + lockAppRevisionInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *AppRevisionInterfaceMock) Create(in1 *v3.AppRevision) (*v3.AppRevision, error) { + if mock.CreateFunc == nil { + panic("AppRevisionInterfaceMock.CreateFunc: method is nil but AppRevisionInterface.Create was just called") + } + callInfo := struct { + In1 *v3.AppRevision + }{ + In1: in1, + } + lockAppRevisionInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockAppRevisionInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedAppRevisionInterface.CreateCalls()) +func (mock *AppRevisionInterfaceMock) CreateCalls() []struct { + In1 *v3.AppRevision +} { + var calls []struct { + In1 *v3.AppRevision + } + lockAppRevisionInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockAppRevisionInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *AppRevisionInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("AppRevisionInterfaceMock.DeleteFunc: method is nil but AppRevisionInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockAppRevisionInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockAppRevisionInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedAppRevisionInterface.DeleteCalls()) +func (mock *AppRevisionInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockAppRevisionInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockAppRevisionInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *AppRevisionInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("AppRevisionInterfaceMock.DeleteCollectionFunc: method is nil but AppRevisionInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockAppRevisionInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockAppRevisionInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedAppRevisionInterface.DeleteCollectionCalls()) +func (mock *AppRevisionInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockAppRevisionInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockAppRevisionInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *AppRevisionInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("AppRevisionInterfaceMock.DeleteNamespacedFunc: method is nil but AppRevisionInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockAppRevisionInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockAppRevisionInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedAppRevisionInterface.DeleteNamespacedCalls()) +func (mock *AppRevisionInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockAppRevisionInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockAppRevisionInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *AppRevisionInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.AppRevision, error) { + if mock.GetFunc == nil { + panic("AppRevisionInterfaceMock.GetFunc: method is nil but AppRevisionInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockAppRevisionInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockAppRevisionInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedAppRevisionInterface.GetCalls()) +func (mock *AppRevisionInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockAppRevisionInterfaceMockGet.RLock() + calls = mock.calls.Get + lockAppRevisionInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *AppRevisionInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.AppRevision, error) { + if mock.GetNamespacedFunc == nil { + panic("AppRevisionInterfaceMock.GetNamespacedFunc: method is nil but AppRevisionInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockAppRevisionInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockAppRevisionInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedAppRevisionInterface.GetNamespacedCalls()) +func (mock *AppRevisionInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockAppRevisionInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockAppRevisionInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *AppRevisionInterfaceMock) List(opts v1.ListOptions) (*v3.AppRevisionList, error) { + if mock.ListFunc == nil { + panic("AppRevisionInterfaceMock.ListFunc: method is nil but AppRevisionInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockAppRevisionInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockAppRevisionInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedAppRevisionInterface.ListCalls()) +func (mock *AppRevisionInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockAppRevisionInterfaceMockList.RLock() + calls = mock.calls.List + lockAppRevisionInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *AppRevisionInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("AppRevisionInterfaceMock.ObjectClientFunc: method is nil but AppRevisionInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockAppRevisionInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockAppRevisionInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedAppRevisionInterface.ObjectClientCalls()) +func (mock *AppRevisionInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockAppRevisionInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockAppRevisionInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *AppRevisionInterfaceMock) Update(in1 *v3.AppRevision) (*v3.AppRevision, error) { + if mock.UpdateFunc == nil { + panic("AppRevisionInterfaceMock.UpdateFunc: method is nil but AppRevisionInterface.Update was just called") + } + callInfo := struct { + In1 *v3.AppRevision + }{ + In1: in1, + } + lockAppRevisionInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockAppRevisionInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedAppRevisionInterface.UpdateCalls()) +func (mock *AppRevisionInterfaceMock) UpdateCalls() []struct { + In1 *v3.AppRevision +} { + var calls []struct { + In1 *v3.AppRevision + } + lockAppRevisionInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockAppRevisionInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *AppRevisionInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("AppRevisionInterfaceMock.WatchFunc: method is nil but AppRevisionInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockAppRevisionInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockAppRevisionInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedAppRevisionInterface.WatchCalls()) +func (mock *AppRevisionInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockAppRevisionInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockAppRevisionInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockAppRevisionsGetterMockAppRevisions sync.RWMutex +) + +// Ensure, that AppRevisionsGetterMock does implement AppRevisionsGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.AppRevisionsGetter = &AppRevisionsGetterMock{} + +// AppRevisionsGetterMock is a mock implementation of AppRevisionsGetter. +// +// func TestSomethingThatUsesAppRevisionsGetter(t *testing.T) { +// +// // make and configure a mocked AppRevisionsGetter +// mockedAppRevisionsGetter := &AppRevisionsGetterMock{ +// AppRevisionsFunc: func(namespace string) v3.AppRevisionInterface { +// panic("mock out the AppRevisions method") +// }, +// } +// +// // use mockedAppRevisionsGetter in code that requires AppRevisionsGetter +// // and then make assertions. +// +// } +type AppRevisionsGetterMock struct { + // AppRevisionsFunc mocks the AppRevisions method. + AppRevisionsFunc func(namespace string) v3.AppRevisionInterface + + // calls tracks calls to the methods. + calls struct { + // AppRevisions holds details about calls to the AppRevisions method. + AppRevisions []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// AppRevisions calls AppRevisionsFunc. +func (mock *AppRevisionsGetterMock) AppRevisions(namespace string) v3.AppRevisionInterface { + if mock.AppRevisionsFunc == nil { + panic("AppRevisionsGetterMock.AppRevisionsFunc: method is nil but AppRevisionsGetter.AppRevisions was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockAppRevisionsGetterMockAppRevisions.Lock() + mock.calls.AppRevisions = append(mock.calls.AppRevisions, callInfo) + lockAppRevisionsGetterMockAppRevisions.Unlock() + return mock.AppRevisionsFunc(namespace) +} + +// AppRevisionsCalls gets all the calls that were made to AppRevisions. +// Check the length with: +// len(mockedAppRevisionsGetter.AppRevisionsCalls()) +func (mock *AppRevisionsGetterMock) AppRevisionsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockAppRevisionsGetterMockAppRevisions.RLock() + calls = mock.calls.AppRevisions + lockAppRevisionsGetterMockAppRevisions.RUnlock() + return calls +} diff --git a/apis/project.cattle.io/v3/fakes/zz_generated_basic_auth_mock_test.go b/apis/project.cattle.io/v3/fakes/zz_generated_basic_auth_mock_test.go new file mode 100644 index 00000000..200db55d --- /dev/null +++ b/apis/project.cattle.io/v3/fakes/zz_generated_basic_auth_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/project.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockBasicAuthListerMockGet sync.RWMutex + lockBasicAuthListerMockList sync.RWMutex +) + +// Ensure, that BasicAuthListerMock does implement BasicAuthLister. +// If this is not the case, regenerate this file with moq. +var _ v3.BasicAuthLister = &BasicAuthListerMock{} + +// BasicAuthListerMock is a mock implementation of BasicAuthLister. +// +// func TestSomethingThatUsesBasicAuthLister(t *testing.T) { +// +// // make and configure a mocked BasicAuthLister +// mockedBasicAuthLister := &BasicAuthListerMock{ +// GetFunc: func(namespace string, name string) (*v3.BasicAuth, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.BasicAuth, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedBasicAuthLister in code that requires BasicAuthLister +// // and then make assertions. +// +// } +type BasicAuthListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.BasicAuth, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.BasicAuth, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *BasicAuthListerMock) Get(namespace string, name string) (*v3.BasicAuth, error) { + if mock.GetFunc == nil { + panic("BasicAuthListerMock.GetFunc: method is nil but BasicAuthLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockBasicAuthListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockBasicAuthListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedBasicAuthLister.GetCalls()) +func (mock *BasicAuthListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockBasicAuthListerMockGet.RLock() + calls = mock.calls.Get + lockBasicAuthListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *BasicAuthListerMock) List(namespace string, selector labels.Selector) ([]*v3.BasicAuth, error) { + if mock.ListFunc == nil { + panic("BasicAuthListerMock.ListFunc: method is nil but BasicAuthLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockBasicAuthListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockBasicAuthListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedBasicAuthLister.ListCalls()) +func (mock *BasicAuthListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockBasicAuthListerMockList.RLock() + calls = mock.calls.List + lockBasicAuthListerMockList.RUnlock() + return calls +} + +var ( + lockBasicAuthControllerMockAddClusterScopedHandler sync.RWMutex + lockBasicAuthControllerMockAddHandler sync.RWMutex + lockBasicAuthControllerMockEnqueue sync.RWMutex + lockBasicAuthControllerMockGeneric sync.RWMutex + lockBasicAuthControllerMockInformer sync.RWMutex + lockBasicAuthControllerMockLister sync.RWMutex + lockBasicAuthControllerMockStart sync.RWMutex + lockBasicAuthControllerMockSync sync.RWMutex +) + +// Ensure, that BasicAuthControllerMock does implement BasicAuthController. +// If this is not the case, regenerate this file with moq. +var _ v3.BasicAuthController = &BasicAuthControllerMock{} + +// BasicAuthControllerMock is a mock implementation of BasicAuthController. +// +// func TestSomethingThatUsesBasicAuthController(t *testing.T) { +// +// // make and configure a mocked BasicAuthController +// mockedBasicAuthController := &BasicAuthControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.BasicAuthHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.BasicAuthHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.BasicAuthLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedBasicAuthController in code that requires BasicAuthController +// // and then make assertions. +// +// } +type BasicAuthControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.BasicAuthHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.BasicAuthHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.BasicAuthLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.BasicAuthHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.BasicAuthHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *BasicAuthControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.BasicAuthHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("BasicAuthControllerMock.AddClusterScopedHandlerFunc: method is nil but BasicAuthController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.BasicAuthHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockBasicAuthControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockBasicAuthControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedBasicAuthController.AddClusterScopedHandlerCalls()) +func (mock *BasicAuthControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.BasicAuthHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.BasicAuthHandlerFunc + } + lockBasicAuthControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockBasicAuthControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *BasicAuthControllerMock) AddHandler(ctx context.Context, name string, handler v3.BasicAuthHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("BasicAuthControllerMock.AddHandlerFunc: method is nil but BasicAuthController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.BasicAuthHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockBasicAuthControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockBasicAuthControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedBasicAuthController.AddHandlerCalls()) +func (mock *BasicAuthControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.BasicAuthHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.BasicAuthHandlerFunc + } + lockBasicAuthControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockBasicAuthControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *BasicAuthControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("BasicAuthControllerMock.EnqueueFunc: method is nil but BasicAuthController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockBasicAuthControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockBasicAuthControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedBasicAuthController.EnqueueCalls()) +func (mock *BasicAuthControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockBasicAuthControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockBasicAuthControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *BasicAuthControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("BasicAuthControllerMock.GenericFunc: method is nil but BasicAuthController.Generic was just called") + } + callInfo := struct { + }{} + lockBasicAuthControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockBasicAuthControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedBasicAuthController.GenericCalls()) +func (mock *BasicAuthControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockBasicAuthControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockBasicAuthControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *BasicAuthControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("BasicAuthControllerMock.InformerFunc: method is nil but BasicAuthController.Informer was just called") + } + callInfo := struct { + }{} + lockBasicAuthControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockBasicAuthControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedBasicAuthController.InformerCalls()) +func (mock *BasicAuthControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockBasicAuthControllerMockInformer.RLock() + calls = mock.calls.Informer + lockBasicAuthControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *BasicAuthControllerMock) Lister() v3.BasicAuthLister { + if mock.ListerFunc == nil { + panic("BasicAuthControllerMock.ListerFunc: method is nil but BasicAuthController.Lister was just called") + } + callInfo := struct { + }{} + lockBasicAuthControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockBasicAuthControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedBasicAuthController.ListerCalls()) +func (mock *BasicAuthControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockBasicAuthControllerMockLister.RLock() + calls = mock.calls.Lister + lockBasicAuthControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *BasicAuthControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("BasicAuthControllerMock.StartFunc: method is nil but BasicAuthController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockBasicAuthControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockBasicAuthControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedBasicAuthController.StartCalls()) +func (mock *BasicAuthControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockBasicAuthControllerMockStart.RLock() + calls = mock.calls.Start + lockBasicAuthControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *BasicAuthControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("BasicAuthControllerMock.SyncFunc: method is nil but BasicAuthController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockBasicAuthControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockBasicAuthControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedBasicAuthController.SyncCalls()) +func (mock *BasicAuthControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockBasicAuthControllerMockSync.RLock() + calls = mock.calls.Sync + lockBasicAuthControllerMockSync.RUnlock() + return calls +} + +var ( + lockBasicAuthInterfaceMockAddClusterScopedHandler sync.RWMutex + lockBasicAuthInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockBasicAuthInterfaceMockAddHandler sync.RWMutex + lockBasicAuthInterfaceMockAddLifecycle sync.RWMutex + lockBasicAuthInterfaceMockController sync.RWMutex + lockBasicAuthInterfaceMockCreate sync.RWMutex + lockBasicAuthInterfaceMockDelete sync.RWMutex + lockBasicAuthInterfaceMockDeleteCollection sync.RWMutex + lockBasicAuthInterfaceMockDeleteNamespaced sync.RWMutex + lockBasicAuthInterfaceMockGet sync.RWMutex + lockBasicAuthInterfaceMockGetNamespaced sync.RWMutex + lockBasicAuthInterfaceMockList sync.RWMutex + lockBasicAuthInterfaceMockObjectClient sync.RWMutex + lockBasicAuthInterfaceMockUpdate sync.RWMutex + lockBasicAuthInterfaceMockWatch sync.RWMutex +) + +// Ensure, that BasicAuthInterfaceMock does implement BasicAuthInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.BasicAuthInterface = &BasicAuthInterfaceMock{} + +// BasicAuthInterfaceMock is a mock implementation of BasicAuthInterface. +// +// func TestSomethingThatUsesBasicAuthInterface(t *testing.T) { +// +// // make and configure a mocked BasicAuthInterface +// mockedBasicAuthInterface := &BasicAuthInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.BasicAuthHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.BasicAuthLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.BasicAuthHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.BasicAuthLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.BasicAuthController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.BasicAuth) (*v3.BasicAuth, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.BasicAuth, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.BasicAuth, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.BasicAuthList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.BasicAuth) (*v3.BasicAuth, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedBasicAuthInterface in code that requires BasicAuthInterface +// // and then make assertions. +// +// } +type BasicAuthInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.BasicAuthHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.BasicAuthLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.BasicAuthHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.BasicAuthLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.BasicAuthController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.BasicAuth) (*v3.BasicAuth, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.BasicAuth, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.BasicAuth, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.BasicAuthList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.BasicAuth) (*v3.BasicAuth, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.BasicAuthHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.BasicAuthLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.BasicAuthHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.BasicAuthLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.BasicAuth + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.BasicAuth + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *BasicAuthInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.BasicAuthHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("BasicAuthInterfaceMock.AddClusterScopedHandlerFunc: method is nil but BasicAuthInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.BasicAuthHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockBasicAuthInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockBasicAuthInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedBasicAuthInterface.AddClusterScopedHandlerCalls()) +func (mock *BasicAuthInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.BasicAuthHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.BasicAuthHandlerFunc + } + lockBasicAuthInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockBasicAuthInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *BasicAuthInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.BasicAuthLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("BasicAuthInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but BasicAuthInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.BasicAuthLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockBasicAuthInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockBasicAuthInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedBasicAuthInterface.AddClusterScopedLifecycleCalls()) +func (mock *BasicAuthInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.BasicAuthLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.BasicAuthLifecycle + } + lockBasicAuthInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockBasicAuthInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *BasicAuthInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.BasicAuthHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("BasicAuthInterfaceMock.AddHandlerFunc: method is nil but BasicAuthInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.BasicAuthHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockBasicAuthInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockBasicAuthInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedBasicAuthInterface.AddHandlerCalls()) +func (mock *BasicAuthInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.BasicAuthHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.BasicAuthHandlerFunc + } + lockBasicAuthInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockBasicAuthInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *BasicAuthInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.BasicAuthLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("BasicAuthInterfaceMock.AddLifecycleFunc: method is nil but BasicAuthInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.BasicAuthLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockBasicAuthInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockBasicAuthInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedBasicAuthInterface.AddLifecycleCalls()) +func (mock *BasicAuthInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.BasicAuthLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.BasicAuthLifecycle + } + lockBasicAuthInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockBasicAuthInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *BasicAuthInterfaceMock) Controller() v3.BasicAuthController { + if mock.ControllerFunc == nil { + panic("BasicAuthInterfaceMock.ControllerFunc: method is nil but BasicAuthInterface.Controller was just called") + } + callInfo := struct { + }{} + lockBasicAuthInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockBasicAuthInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedBasicAuthInterface.ControllerCalls()) +func (mock *BasicAuthInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockBasicAuthInterfaceMockController.RLock() + calls = mock.calls.Controller + lockBasicAuthInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *BasicAuthInterfaceMock) Create(in1 *v3.BasicAuth) (*v3.BasicAuth, error) { + if mock.CreateFunc == nil { + panic("BasicAuthInterfaceMock.CreateFunc: method is nil but BasicAuthInterface.Create was just called") + } + callInfo := struct { + In1 *v3.BasicAuth + }{ + In1: in1, + } + lockBasicAuthInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockBasicAuthInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedBasicAuthInterface.CreateCalls()) +func (mock *BasicAuthInterfaceMock) CreateCalls() []struct { + In1 *v3.BasicAuth +} { + var calls []struct { + In1 *v3.BasicAuth + } + lockBasicAuthInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockBasicAuthInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *BasicAuthInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("BasicAuthInterfaceMock.DeleteFunc: method is nil but BasicAuthInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockBasicAuthInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockBasicAuthInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedBasicAuthInterface.DeleteCalls()) +func (mock *BasicAuthInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockBasicAuthInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockBasicAuthInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *BasicAuthInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("BasicAuthInterfaceMock.DeleteCollectionFunc: method is nil but BasicAuthInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockBasicAuthInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockBasicAuthInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedBasicAuthInterface.DeleteCollectionCalls()) +func (mock *BasicAuthInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockBasicAuthInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockBasicAuthInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *BasicAuthInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("BasicAuthInterfaceMock.DeleteNamespacedFunc: method is nil but BasicAuthInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockBasicAuthInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockBasicAuthInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedBasicAuthInterface.DeleteNamespacedCalls()) +func (mock *BasicAuthInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockBasicAuthInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockBasicAuthInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *BasicAuthInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.BasicAuth, error) { + if mock.GetFunc == nil { + panic("BasicAuthInterfaceMock.GetFunc: method is nil but BasicAuthInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockBasicAuthInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockBasicAuthInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedBasicAuthInterface.GetCalls()) +func (mock *BasicAuthInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockBasicAuthInterfaceMockGet.RLock() + calls = mock.calls.Get + lockBasicAuthInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *BasicAuthInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.BasicAuth, error) { + if mock.GetNamespacedFunc == nil { + panic("BasicAuthInterfaceMock.GetNamespacedFunc: method is nil but BasicAuthInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockBasicAuthInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockBasicAuthInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedBasicAuthInterface.GetNamespacedCalls()) +func (mock *BasicAuthInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockBasicAuthInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockBasicAuthInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *BasicAuthInterfaceMock) List(opts v1.ListOptions) (*v3.BasicAuthList, error) { + if mock.ListFunc == nil { + panic("BasicAuthInterfaceMock.ListFunc: method is nil but BasicAuthInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockBasicAuthInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockBasicAuthInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedBasicAuthInterface.ListCalls()) +func (mock *BasicAuthInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockBasicAuthInterfaceMockList.RLock() + calls = mock.calls.List + lockBasicAuthInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *BasicAuthInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("BasicAuthInterfaceMock.ObjectClientFunc: method is nil but BasicAuthInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockBasicAuthInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockBasicAuthInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedBasicAuthInterface.ObjectClientCalls()) +func (mock *BasicAuthInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockBasicAuthInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockBasicAuthInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *BasicAuthInterfaceMock) Update(in1 *v3.BasicAuth) (*v3.BasicAuth, error) { + if mock.UpdateFunc == nil { + panic("BasicAuthInterfaceMock.UpdateFunc: method is nil but BasicAuthInterface.Update was just called") + } + callInfo := struct { + In1 *v3.BasicAuth + }{ + In1: in1, + } + lockBasicAuthInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockBasicAuthInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedBasicAuthInterface.UpdateCalls()) +func (mock *BasicAuthInterfaceMock) UpdateCalls() []struct { + In1 *v3.BasicAuth +} { + var calls []struct { + In1 *v3.BasicAuth + } + lockBasicAuthInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockBasicAuthInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *BasicAuthInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("BasicAuthInterfaceMock.WatchFunc: method is nil but BasicAuthInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockBasicAuthInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockBasicAuthInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedBasicAuthInterface.WatchCalls()) +func (mock *BasicAuthInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockBasicAuthInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockBasicAuthInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockBasicAuthsGetterMockBasicAuths sync.RWMutex +) + +// Ensure, that BasicAuthsGetterMock does implement BasicAuthsGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.BasicAuthsGetter = &BasicAuthsGetterMock{} + +// BasicAuthsGetterMock is a mock implementation of BasicAuthsGetter. +// +// func TestSomethingThatUsesBasicAuthsGetter(t *testing.T) { +// +// // make and configure a mocked BasicAuthsGetter +// mockedBasicAuthsGetter := &BasicAuthsGetterMock{ +// BasicAuthsFunc: func(namespace string) v3.BasicAuthInterface { +// panic("mock out the BasicAuths method") +// }, +// } +// +// // use mockedBasicAuthsGetter in code that requires BasicAuthsGetter +// // and then make assertions. +// +// } +type BasicAuthsGetterMock struct { + // BasicAuthsFunc mocks the BasicAuths method. + BasicAuthsFunc func(namespace string) v3.BasicAuthInterface + + // calls tracks calls to the methods. + calls struct { + // BasicAuths holds details about calls to the BasicAuths method. + BasicAuths []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// BasicAuths calls BasicAuthsFunc. +func (mock *BasicAuthsGetterMock) BasicAuths(namespace string) v3.BasicAuthInterface { + if mock.BasicAuthsFunc == nil { + panic("BasicAuthsGetterMock.BasicAuthsFunc: method is nil but BasicAuthsGetter.BasicAuths was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockBasicAuthsGetterMockBasicAuths.Lock() + mock.calls.BasicAuths = append(mock.calls.BasicAuths, callInfo) + lockBasicAuthsGetterMockBasicAuths.Unlock() + return mock.BasicAuthsFunc(namespace) +} + +// BasicAuthsCalls gets all the calls that were made to BasicAuths. +// Check the length with: +// len(mockedBasicAuthsGetter.BasicAuthsCalls()) +func (mock *BasicAuthsGetterMock) BasicAuthsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockBasicAuthsGetterMockBasicAuths.RLock() + calls = mock.calls.BasicAuths + lockBasicAuthsGetterMockBasicAuths.RUnlock() + return calls +} diff --git a/apis/project.cattle.io/v3/fakes/zz_generated_certificate_mock_test.go b/apis/project.cattle.io/v3/fakes/zz_generated_certificate_mock_test.go new file mode 100644 index 00000000..82cdf7f1 --- /dev/null +++ b/apis/project.cattle.io/v3/fakes/zz_generated_certificate_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/project.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockCertificateListerMockGet sync.RWMutex + lockCertificateListerMockList sync.RWMutex +) + +// Ensure, that CertificateListerMock does implement CertificateLister. +// If this is not the case, regenerate this file with moq. +var _ v3.CertificateLister = &CertificateListerMock{} + +// CertificateListerMock is a mock implementation of CertificateLister. +// +// func TestSomethingThatUsesCertificateLister(t *testing.T) { +// +// // make and configure a mocked CertificateLister +// mockedCertificateLister := &CertificateListerMock{ +// GetFunc: func(namespace string, name string) (*v3.Certificate, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.Certificate, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedCertificateLister in code that requires CertificateLister +// // and then make assertions. +// +// } +type CertificateListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.Certificate, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.Certificate, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *CertificateListerMock) Get(namespace string, name string) (*v3.Certificate, error) { + if mock.GetFunc == nil { + panic("CertificateListerMock.GetFunc: method is nil but CertificateLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockCertificateListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockCertificateListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedCertificateLister.GetCalls()) +func (mock *CertificateListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockCertificateListerMockGet.RLock() + calls = mock.calls.Get + lockCertificateListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *CertificateListerMock) List(namespace string, selector labels.Selector) ([]*v3.Certificate, error) { + if mock.ListFunc == nil { + panic("CertificateListerMock.ListFunc: method is nil but CertificateLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockCertificateListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockCertificateListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedCertificateLister.ListCalls()) +func (mock *CertificateListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockCertificateListerMockList.RLock() + calls = mock.calls.List + lockCertificateListerMockList.RUnlock() + return calls +} + +var ( + lockCertificateControllerMockAddClusterScopedHandler sync.RWMutex + lockCertificateControllerMockAddHandler sync.RWMutex + lockCertificateControllerMockEnqueue sync.RWMutex + lockCertificateControllerMockGeneric sync.RWMutex + lockCertificateControllerMockInformer sync.RWMutex + lockCertificateControllerMockLister sync.RWMutex + lockCertificateControllerMockStart sync.RWMutex + lockCertificateControllerMockSync sync.RWMutex +) + +// Ensure, that CertificateControllerMock does implement CertificateController. +// If this is not the case, regenerate this file with moq. +var _ v3.CertificateController = &CertificateControllerMock{} + +// CertificateControllerMock is a mock implementation of CertificateController. +// +// func TestSomethingThatUsesCertificateController(t *testing.T) { +// +// // make and configure a mocked CertificateController +// mockedCertificateController := &CertificateControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.CertificateHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.CertificateHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.CertificateLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedCertificateController in code that requires CertificateController +// // and then make assertions. +// +// } +type CertificateControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.CertificateHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.CertificateHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.CertificateLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.CertificateHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.CertificateHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *CertificateControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.CertificateHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("CertificateControllerMock.AddClusterScopedHandlerFunc: method is nil but CertificateController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.CertificateHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockCertificateControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockCertificateControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedCertificateController.AddClusterScopedHandlerCalls()) +func (mock *CertificateControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.CertificateHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.CertificateHandlerFunc + } + lockCertificateControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockCertificateControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *CertificateControllerMock) AddHandler(ctx context.Context, name string, handler v3.CertificateHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("CertificateControllerMock.AddHandlerFunc: method is nil but CertificateController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.CertificateHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockCertificateControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockCertificateControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedCertificateController.AddHandlerCalls()) +func (mock *CertificateControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.CertificateHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.CertificateHandlerFunc + } + lockCertificateControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockCertificateControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *CertificateControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("CertificateControllerMock.EnqueueFunc: method is nil but CertificateController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockCertificateControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockCertificateControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedCertificateController.EnqueueCalls()) +func (mock *CertificateControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockCertificateControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockCertificateControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *CertificateControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("CertificateControllerMock.GenericFunc: method is nil but CertificateController.Generic was just called") + } + callInfo := struct { + }{} + lockCertificateControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockCertificateControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedCertificateController.GenericCalls()) +func (mock *CertificateControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockCertificateControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockCertificateControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *CertificateControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("CertificateControllerMock.InformerFunc: method is nil but CertificateController.Informer was just called") + } + callInfo := struct { + }{} + lockCertificateControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockCertificateControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedCertificateController.InformerCalls()) +func (mock *CertificateControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockCertificateControllerMockInformer.RLock() + calls = mock.calls.Informer + lockCertificateControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *CertificateControllerMock) Lister() v3.CertificateLister { + if mock.ListerFunc == nil { + panic("CertificateControllerMock.ListerFunc: method is nil but CertificateController.Lister was just called") + } + callInfo := struct { + }{} + lockCertificateControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockCertificateControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedCertificateController.ListerCalls()) +func (mock *CertificateControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockCertificateControllerMockLister.RLock() + calls = mock.calls.Lister + lockCertificateControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *CertificateControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("CertificateControllerMock.StartFunc: method is nil but CertificateController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockCertificateControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockCertificateControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedCertificateController.StartCalls()) +func (mock *CertificateControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockCertificateControllerMockStart.RLock() + calls = mock.calls.Start + lockCertificateControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *CertificateControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("CertificateControllerMock.SyncFunc: method is nil but CertificateController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockCertificateControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockCertificateControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedCertificateController.SyncCalls()) +func (mock *CertificateControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockCertificateControllerMockSync.RLock() + calls = mock.calls.Sync + lockCertificateControllerMockSync.RUnlock() + return calls +} + +var ( + lockCertificateInterfaceMockAddClusterScopedHandler sync.RWMutex + lockCertificateInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockCertificateInterfaceMockAddHandler sync.RWMutex + lockCertificateInterfaceMockAddLifecycle sync.RWMutex + lockCertificateInterfaceMockController sync.RWMutex + lockCertificateInterfaceMockCreate sync.RWMutex + lockCertificateInterfaceMockDelete sync.RWMutex + lockCertificateInterfaceMockDeleteCollection sync.RWMutex + lockCertificateInterfaceMockDeleteNamespaced sync.RWMutex + lockCertificateInterfaceMockGet sync.RWMutex + lockCertificateInterfaceMockGetNamespaced sync.RWMutex + lockCertificateInterfaceMockList sync.RWMutex + lockCertificateInterfaceMockObjectClient sync.RWMutex + lockCertificateInterfaceMockUpdate sync.RWMutex + lockCertificateInterfaceMockWatch sync.RWMutex +) + +// Ensure, that CertificateInterfaceMock does implement CertificateInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.CertificateInterface = &CertificateInterfaceMock{} + +// CertificateInterfaceMock is a mock implementation of CertificateInterface. +// +// func TestSomethingThatUsesCertificateInterface(t *testing.T) { +// +// // make and configure a mocked CertificateInterface +// mockedCertificateInterface := &CertificateInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.CertificateHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.CertificateLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.CertificateHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.CertificateLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.CertificateController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.Certificate) (*v3.Certificate, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.Certificate, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.Certificate, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.CertificateList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.Certificate) (*v3.Certificate, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedCertificateInterface in code that requires CertificateInterface +// // and then make assertions. +// +// } +type CertificateInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.CertificateHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.CertificateLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.CertificateHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.CertificateLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.CertificateController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.Certificate) (*v3.Certificate, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.Certificate, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.Certificate, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.CertificateList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.Certificate) (*v3.Certificate, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.CertificateHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.CertificateLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.CertificateHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.CertificateLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.Certificate + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.Certificate + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *CertificateInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.CertificateHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("CertificateInterfaceMock.AddClusterScopedHandlerFunc: method is nil but CertificateInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.CertificateHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockCertificateInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockCertificateInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedCertificateInterface.AddClusterScopedHandlerCalls()) +func (mock *CertificateInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.CertificateHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.CertificateHandlerFunc + } + lockCertificateInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockCertificateInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *CertificateInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.CertificateLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("CertificateInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but CertificateInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.CertificateLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockCertificateInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockCertificateInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedCertificateInterface.AddClusterScopedLifecycleCalls()) +func (mock *CertificateInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.CertificateLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.CertificateLifecycle + } + lockCertificateInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockCertificateInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *CertificateInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.CertificateHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("CertificateInterfaceMock.AddHandlerFunc: method is nil but CertificateInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.CertificateHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockCertificateInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockCertificateInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedCertificateInterface.AddHandlerCalls()) +func (mock *CertificateInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.CertificateHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.CertificateHandlerFunc + } + lockCertificateInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockCertificateInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *CertificateInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.CertificateLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("CertificateInterfaceMock.AddLifecycleFunc: method is nil but CertificateInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.CertificateLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockCertificateInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockCertificateInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedCertificateInterface.AddLifecycleCalls()) +func (mock *CertificateInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.CertificateLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.CertificateLifecycle + } + lockCertificateInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockCertificateInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *CertificateInterfaceMock) Controller() v3.CertificateController { + if mock.ControllerFunc == nil { + panic("CertificateInterfaceMock.ControllerFunc: method is nil but CertificateInterface.Controller was just called") + } + callInfo := struct { + }{} + lockCertificateInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockCertificateInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedCertificateInterface.ControllerCalls()) +func (mock *CertificateInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockCertificateInterfaceMockController.RLock() + calls = mock.calls.Controller + lockCertificateInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *CertificateInterfaceMock) Create(in1 *v3.Certificate) (*v3.Certificate, error) { + if mock.CreateFunc == nil { + panic("CertificateInterfaceMock.CreateFunc: method is nil but CertificateInterface.Create was just called") + } + callInfo := struct { + In1 *v3.Certificate + }{ + In1: in1, + } + lockCertificateInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockCertificateInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedCertificateInterface.CreateCalls()) +func (mock *CertificateInterfaceMock) CreateCalls() []struct { + In1 *v3.Certificate +} { + var calls []struct { + In1 *v3.Certificate + } + lockCertificateInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockCertificateInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *CertificateInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("CertificateInterfaceMock.DeleteFunc: method is nil but CertificateInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockCertificateInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockCertificateInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedCertificateInterface.DeleteCalls()) +func (mock *CertificateInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockCertificateInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockCertificateInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *CertificateInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("CertificateInterfaceMock.DeleteCollectionFunc: method is nil but CertificateInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockCertificateInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockCertificateInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedCertificateInterface.DeleteCollectionCalls()) +func (mock *CertificateInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockCertificateInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockCertificateInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *CertificateInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("CertificateInterfaceMock.DeleteNamespacedFunc: method is nil but CertificateInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockCertificateInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockCertificateInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedCertificateInterface.DeleteNamespacedCalls()) +func (mock *CertificateInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockCertificateInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockCertificateInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *CertificateInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.Certificate, error) { + if mock.GetFunc == nil { + panic("CertificateInterfaceMock.GetFunc: method is nil but CertificateInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockCertificateInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockCertificateInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedCertificateInterface.GetCalls()) +func (mock *CertificateInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockCertificateInterfaceMockGet.RLock() + calls = mock.calls.Get + lockCertificateInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *CertificateInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.Certificate, error) { + if mock.GetNamespacedFunc == nil { + panic("CertificateInterfaceMock.GetNamespacedFunc: method is nil but CertificateInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockCertificateInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockCertificateInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedCertificateInterface.GetNamespacedCalls()) +func (mock *CertificateInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockCertificateInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockCertificateInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *CertificateInterfaceMock) List(opts v1.ListOptions) (*v3.CertificateList, error) { + if mock.ListFunc == nil { + panic("CertificateInterfaceMock.ListFunc: method is nil but CertificateInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockCertificateInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockCertificateInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedCertificateInterface.ListCalls()) +func (mock *CertificateInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockCertificateInterfaceMockList.RLock() + calls = mock.calls.List + lockCertificateInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *CertificateInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("CertificateInterfaceMock.ObjectClientFunc: method is nil but CertificateInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockCertificateInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockCertificateInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedCertificateInterface.ObjectClientCalls()) +func (mock *CertificateInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockCertificateInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockCertificateInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *CertificateInterfaceMock) Update(in1 *v3.Certificate) (*v3.Certificate, error) { + if mock.UpdateFunc == nil { + panic("CertificateInterfaceMock.UpdateFunc: method is nil but CertificateInterface.Update was just called") + } + callInfo := struct { + In1 *v3.Certificate + }{ + In1: in1, + } + lockCertificateInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockCertificateInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedCertificateInterface.UpdateCalls()) +func (mock *CertificateInterfaceMock) UpdateCalls() []struct { + In1 *v3.Certificate +} { + var calls []struct { + In1 *v3.Certificate + } + lockCertificateInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockCertificateInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *CertificateInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("CertificateInterfaceMock.WatchFunc: method is nil but CertificateInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockCertificateInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockCertificateInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedCertificateInterface.WatchCalls()) +func (mock *CertificateInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockCertificateInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockCertificateInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockCertificatesGetterMockCertificates sync.RWMutex +) + +// Ensure, that CertificatesGetterMock does implement CertificatesGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.CertificatesGetter = &CertificatesGetterMock{} + +// CertificatesGetterMock is a mock implementation of CertificatesGetter. +// +// func TestSomethingThatUsesCertificatesGetter(t *testing.T) { +// +// // make and configure a mocked CertificatesGetter +// mockedCertificatesGetter := &CertificatesGetterMock{ +// CertificatesFunc: func(namespace string) v3.CertificateInterface { +// panic("mock out the Certificates method") +// }, +// } +// +// // use mockedCertificatesGetter in code that requires CertificatesGetter +// // and then make assertions. +// +// } +type CertificatesGetterMock struct { + // CertificatesFunc mocks the Certificates method. + CertificatesFunc func(namespace string) v3.CertificateInterface + + // calls tracks calls to the methods. + calls struct { + // Certificates holds details about calls to the Certificates method. + Certificates []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// Certificates calls CertificatesFunc. +func (mock *CertificatesGetterMock) Certificates(namespace string) v3.CertificateInterface { + if mock.CertificatesFunc == nil { + panic("CertificatesGetterMock.CertificatesFunc: method is nil but CertificatesGetter.Certificates was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockCertificatesGetterMockCertificates.Lock() + mock.calls.Certificates = append(mock.calls.Certificates, callInfo) + lockCertificatesGetterMockCertificates.Unlock() + return mock.CertificatesFunc(namespace) +} + +// CertificatesCalls gets all the calls that were made to Certificates. +// Check the length with: +// len(mockedCertificatesGetter.CertificatesCalls()) +func (mock *CertificatesGetterMock) CertificatesCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockCertificatesGetterMockCertificates.RLock() + calls = mock.calls.Certificates + lockCertificatesGetterMockCertificates.RUnlock() + return calls +} diff --git a/apis/project.cattle.io/v3/fakes/zz_generated_docker_credential_mock_test.go b/apis/project.cattle.io/v3/fakes/zz_generated_docker_credential_mock_test.go new file mode 100644 index 00000000..2e6addf0 --- /dev/null +++ b/apis/project.cattle.io/v3/fakes/zz_generated_docker_credential_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/project.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockDockerCredentialListerMockGet sync.RWMutex + lockDockerCredentialListerMockList sync.RWMutex +) + +// Ensure, that DockerCredentialListerMock does implement DockerCredentialLister. +// If this is not the case, regenerate this file with moq. +var _ v3.DockerCredentialLister = &DockerCredentialListerMock{} + +// DockerCredentialListerMock is a mock implementation of DockerCredentialLister. +// +// func TestSomethingThatUsesDockerCredentialLister(t *testing.T) { +// +// // make and configure a mocked DockerCredentialLister +// mockedDockerCredentialLister := &DockerCredentialListerMock{ +// GetFunc: func(namespace string, name string) (*v3.DockerCredential, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.DockerCredential, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedDockerCredentialLister in code that requires DockerCredentialLister +// // and then make assertions. +// +// } +type DockerCredentialListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.DockerCredential, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.DockerCredential, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *DockerCredentialListerMock) Get(namespace string, name string) (*v3.DockerCredential, error) { + if mock.GetFunc == nil { + panic("DockerCredentialListerMock.GetFunc: method is nil but DockerCredentialLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockDockerCredentialListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockDockerCredentialListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedDockerCredentialLister.GetCalls()) +func (mock *DockerCredentialListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockDockerCredentialListerMockGet.RLock() + calls = mock.calls.Get + lockDockerCredentialListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *DockerCredentialListerMock) List(namespace string, selector labels.Selector) ([]*v3.DockerCredential, error) { + if mock.ListFunc == nil { + panic("DockerCredentialListerMock.ListFunc: method is nil but DockerCredentialLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockDockerCredentialListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockDockerCredentialListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedDockerCredentialLister.ListCalls()) +func (mock *DockerCredentialListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockDockerCredentialListerMockList.RLock() + calls = mock.calls.List + lockDockerCredentialListerMockList.RUnlock() + return calls +} + +var ( + lockDockerCredentialControllerMockAddClusterScopedHandler sync.RWMutex + lockDockerCredentialControllerMockAddHandler sync.RWMutex + lockDockerCredentialControllerMockEnqueue sync.RWMutex + lockDockerCredentialControllerMockGeneric sync.RWMutex + lockDockerCredentialControllerMockInformer sync.RWMutex + lockDockerCredentialControllerMockLister sync.RWMutex + lockDockerCredentialControllerMockStart sync.RWMutex + lockDockerCredentialControllerMockSync sync.RWMutex +) + +// Ensure, that DockerCredentialControllerMock does implement DockerCredentialController. +// If this is not the case, regenerate this file with moq. +var _ v3.DockerCredentialController = &DockerCredentialControllerMock{} + +// DockerCredentialControllerMock is a mock implementation of DockerCredentialController. +// +// func TestSomethingThatUsesDockerCredentialController(t *testing.T) { +// +// // make and configure a mocked DockerCredentialController +// mockedDockerCredentialController := &DockerCredentialControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.DockerCredentialHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.DockerCredentialHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.DockerCredentialLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedDockerCredentialController in code that requires DockerCredentialController +// // and then make assertions. +// +// } +type DockerCredentialControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.DockerCredentialHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.DockerCredentialHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.DockerCredentialLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.DockerCredentialHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.DockerCredentialHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *DockerCredentialControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.DockerCredentialHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("DockerCredentialControllerMock.AddClusterScopedHandlerFunc: method is nil but DockerCredentialController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.DockerCredentialHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockDockerCredentialControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockDockerCredentialControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedDockerCredentialController.AddClusterScopedHandlerCalls()) +func (mock *DockerCredentialControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.DockerCredentialHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.DockerCredentialHandlerFunc + } + lockDockerCredentialControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockDockerCredentialControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *DockerCredentialControllerMock) AddHandler(ctx context.Context, name string, handler v3.DockerCredentialHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("DockerCredentialControllerMock.AddHandlerFunc: method is nil but DockerCredentialController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.DockerCredentialHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockDockerCredentialControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockDockerCredentialControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedDockerCredentialController.AddHandlerCalls()) +func (mock *DockerCredentialControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.DockerCredentialHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.DockerCredentialHandlerFunc + } + lockDockerCredentialControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockDockerCredentialControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *DockerCredentialControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("DockerCredentialControllerMock.EnqueueFunc: method is nil but DockerCredentialController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockDockerCredentialControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockDockerCredentialControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedDockerCredentialController.EnqueueCalls()) +func (mock *DockerCredentialControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockDockerCredentialControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockDockerCredentialControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *DockerCredentialControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("DockerCredentialControllerMock.GenericFunc: method is nil but DockerCredentialController.Generic was just called") + } + callInfo := struct { + }{} + lockDockerCredentialControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockDockerCredentialControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedDockerCredentialController.GenericCalls()) +func (mock *DockerCredentialControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockDockerCredentialControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockDockerCredentialControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *DockerCredentialControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("DockerCredentialControllerMock.InformerFunc: method is nil but DockerCredentialController.Informer was just called") + } + callInfo := struct { + }{} + lockDockerCredentialControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockDockerCredentialControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedDockerCredentialController.InformerCalls()) +func (mock *DockerCredentialControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockDockerCredentialControllerMockInformer.RLock() + calls = mock.calls.Informer + lockDockerCredentialControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *DockerCredentialControllerMock) Lister() v3.DockerCredentialLister { + if mock.ListerFunc == nil { + panic("DockerCredentialControllerMock.ListerFunc: method is nil but DockerCredentialController.Lister was just called") + } + callInfo := struct { + }{} + lockDockerCredentialControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockDockerCredentialControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedDockerCredentialController.ListerCalls()) +func (mock *DockerCredentialControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockDockerCredentialControllerMockLister.RLock() + calls = mock.calls.Lister + lockDockerCredentialControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *DockerCredentialControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("DockerCredentialControllerMock.StartFunc: method is nil but DockerCredentialController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockDockerCredentialControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockDockerCredentialControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedDockerCredentialController.StartCalls()) +func (mock *DockerCredentialControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockDockerCredentialControllerMockStart.RLock() + calls = mock.calls.Start + lockDockerCredentialControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *DockerCredentialControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("DockerCredentialControllerMock.SyncFunc: method is nil but DockerCredentialController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockDockerCredentialControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockDockerCredentialControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedDockerCredentialController.SyncCalls()) +func (mock *DockerCredentialControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockDockerCredentialControllerMockSync.RLock() + calls = mock.calls.Sync + lockDockerCredentialControllerMockSync.RUnlock() + return calls +} + +var ( + lockDockerCredentialInterfaceMockAddClusterScopedHandler sync.RWMutex + lockDockerCredentialInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockDockerCredentialInterfaceMockAddHandler sync.RWMutex + lockDockerCredentialInterfaceMockAddLifecycle sync.RWMutex + lockDockerCredentialInterfaceMockController sync.RWMutex + lockDockerCredentialInterfaceMockCreate sync.RWMutex + lockDockerCredentialInterfaceMockDelete sync.RWMutex + lockDockerCredentialInterfaceMockDeleteCollection sync.RWMutex + lockDockerCredentialInterfaceMockDeleteNamespaced sync.RWMutex + lockDockerCredentialInterfaceMockGet sync.RWMutex + lockDockerCredentialInterfaceMockGetNamespaced sync.RWMutex + lockDockerCredentialInterfaceMockList sync.RWMutex + lockDockerCredentialInterfaceMockObjectClient sync.RWMutex + lockDockerCredentialInterfaceMockUpdate sync.RWMutex + lockDockerCredentialInterfaceMockWatch sync.RWMutex +) + +// Ensure, that DockerCredentialInterfaceMock does implement DockerCredentialInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.DockerCredentialInterface = &DockerCredentialInterfaceMock{} + +// DockerCredentialInterfaceMock is a mock implementation of DockerCredentialInterface. +// +// func TestSomethingThatUsesDockerCredentialInterface(t *testing.T) { +// +// // make and configure a mocked DockerCredentialInterface +// mockedDockerCredentialInterface := &DockerCredentialInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.DockerCredentialHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.DockerCredentialLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.DockerCredentialHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.DockerCredentialLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.DockerCredentialController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.DockerCredential) (*v3.DockerCredential, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.DockerCredential, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.DockerCredential, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.DockerCredentialList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.DockerCredential) (*v3.DockerCredential, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedDockerCredentialInterface in code that requires DockerCredentialInterface +// // and then make assertions. +// +// } +type DockerCredentialInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.DockerCredentialHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.DockerCredentialLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.DockerCredentialHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.DockerCredentialLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.DockerCredentialController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.DockerCredential) (*v3.DockerCredential, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.DockerCredential, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.DockerCredential, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.DockerCredentialList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.DockerCredential) (*v3.DockerCredential, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.DockerCredentialHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.DockerCredentialLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.DockerCredentialHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.DockerCredentialLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.DockerCredential + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.DockerCredential + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *DockerCredentialInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.DockerCredentialHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("DockerCredentialInterfaceMock.AddClusterScopedHandlerFunc: method is nil but DockerCredentialInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.DockerCredentialHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockDockerCredentialInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockDockerCredentialInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedDockerCredentialInterface.AddClusterScopedHandlerCalls()) +func (mock *DockerCredentialInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.DockerCredentialHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.DockerCredentialHandlerFunc + } + lockDockerCredentialInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockDockerCredentialInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *DockerCredentialInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.DockerCredentialLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("DockerCredentialInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but DockerCredentialInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.DockerCredentialLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockDockerCredentialInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockDockerCredentialInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedDockerCredentialInterface.AddClusterScopedLifecycleCalls()) +func (mock *DockerCredentialInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.DockerCredentialLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.DockerCredentialLifecycle + } + lockDockerCredentialInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockDockerCredentialInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *DockerCredentialInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.DockerCredentialHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("DockerCredentialInterfaceMock.AddHandlerFunc: method is nil but DockerCredentialInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.DockerCredentialHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockDockerCredentialInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockDockerCredentialInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedDockerCredentialInterface.AddHandlerCalls()) +func (mock *DockerCredentialInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.DockerCredentialHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.DockerCredentialHandlerFunc + } + lockDockerCredentialInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockDockerCredentialInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *DockerCredentialInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.DockerCredentialLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("DockerCredentialInterfaceMock.AddLifecycleFunc: method is nil but DockerCredentialInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.DockerCredentialLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockDockerCredentialInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockDockerCredentialInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedDockerCredentialInterface.AddLifecycleCalls()) +func (mock *DockerCredentialInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.DockerCredentialLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.DockerCredentialLifecycle + } + lockDockerCredentialInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockDockerCredentialInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *DockerCredentialInterfaceMock) Controller() v3.DockerCredentialController { + if mock.ControllerFunc == nil { + panic("DockerCredentialInterfaceMock.ControllerFunc: method is nil but DockerCredentialInterface.Controller was just called") + } + callInfo := struct { + }{} + lockDockerCredentialInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockDockerCredentialInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedDockerCredentialInterface.ControllerCalls()) +func (mock *DockerCredentialInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockDockerCredentialInterfaceMockController.RLock() + calls = mock.calls.Controller + lockDockerCredentialInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *DockerCredentialInterfaceMock) Create(in1 *v3.DockerCredential) (*v3.DockerCredential, error) { + if mock.CreateFunc == nil { + panic("DockerCredentialInterfaceMock.CreateFunc: method is nil but DockerCredentialInterface.Create was just called") + } + callInfo := struct { + In1 *v3.DockerCredential + }{ + In1: in1, + } + lockDockerCredentialInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockDockerCredentialInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedDockerCredentialInterface.CreateCalls()) +func (mock *DockerCredentialInterfaceMock) CreateCalls() []struct { + In1 *v3.DockerCredential +} { + var calls []struct { + In1 *v3.DockerCredential + } + lockDockerCredentialInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockDockerCredentialInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *DockerCredentialInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("DockerCredentialInterfaceMock.DeleteFunc: method is nil but DockerCredentialInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockDockerCredentialInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockDockerCredentialInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedDockerCredentialInterface.DeleteCalls()) +func (mock *DockerCredentialInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockDockerCredentialInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockDockerCredentialInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *DockerCredentialInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("DockerCredentialInterfaceMock.DeleteCollectionFunc: method is nil but DockerCredentialInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockDockerCredentialInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockDockerCredentialInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedDockerCredentialInterface.DeleteCollectionCalls()) +func (mock *DockerCredentialInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockDockerCredentialInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockDockerCredentialInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *DockerCredentialInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("DockerCredentialInterfaceMock.DeleteNamespacedFunc: method is nil but DockerCredentialInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockDockerCredentialInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockDockerCredentialInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedDockerCredentialInterface.DeleteNamespacedCalls()) +func (mock *DockerCredentialInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockDockerCredentialInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockDockerCredentialInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *DockerCredentialInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.DockerCredential, error) { + if mock.GetFunc == nil { + panic("DockerCredentialInterfaceMock.GetFunc: method is nil but DockerCredentialInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockDockerCredentialInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockDockerCredentialInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedDockerCredentialInterface.GetCalls()) +func (mock *DockerCredentialInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockDockerCredentialInterfaceMockGet.RLock() + calls = mock.calls.Get + lockDockerCredentialInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *DockerCredentialInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.DockerCredential, error) { + if mock.GetNamespacedFunc == nil { + panic("DockerCredentialInterfaceMock.GetNamespacedFunc: method is nil but DockerCredentialInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockDockerCredentialInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockDockerCredentialInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedDockerCredentialInterface.GetNamespacedCalls()) +func (mock *DockerCredentialInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockDockerCredentialInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockDockerCredentialInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *DockerCredentialInterfaceMock) List(opts v1.ListOptions) (*v3.DockerCredentialList, error) { + if mock.ListFunc == nil { + panic("DockerCredentialInterfaceMock.ListFunc: method is nil but DockerCredentialInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockDockerCredentialInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockDockerCredentialInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedDockerCredentialInterface.ListCalls()) +func (mock *DockerCredentialInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockDockerCredentialInterfaceMockList.RLock() + calls = mock.calls.List + lockDockerCredentialInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *DockerCredentialInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("DockerCredentialInterfaceMock.ObjectClientFunc: method is nil but DockerCredentialInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockDockerCredentialInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockDockerCredentialInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedDockerCredentialInterface.ObjectClientCalls()) +func (mock *DockerCredentialInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockDockerCredentialInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockDockerCredentialInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *DockerCredentialInterfaceMock) Update(in1 *v3.DockerCredential) (*v3.DockerCredential, error) { + if mock.UpdateFunc == nil { + panic("DockerCredentialInterfaceMock.UpdateFunc: method is nil but DockerCredentialInterface.Update was just called") + } + callInfo := struct { + In1 *v3.DockerCredential + }{ + In1: in1, + } + lockDockerCredentialInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockDockerCredentialInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedDockerCredentialInterface.UpdateCalls()) +func (mock *DockerCredentialInterfaceMock) UpdateCalls() []struct { + In1 *v3.DockerCredential +} { + var calls []struct { + In1 *v3.DockerCredential + } + lockDockerCredentialInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockDockerCredentialInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *DockerCredentialInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("DockerCredentialInterfaceMock.WatchFunc: method is nil but DockerCredentialInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockDockerCredentialInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockDockerCredentialInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedDockerCredentialInterface.WatchCalls()) +func (mock *DockerCredentialInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockDockerCredentialInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockDockerCredentialInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockDockerCredentialsGetterMockDockerCredentials sync.RWMutex +) + +// Ensure, that DockerCredentialsGetterMock does implement DockerCredentialsGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.DockerCredentialsGetter = &DockerCredentialsGetterMock{} + +// DockerCredentialsGetterMock is a mock implementation of DockerCredentialsGetter. +// +// func TestSomethingThatUsesDockerCredentialsGetter(t *testing.T) { +// +// // make and configure a mocked DockerCredentialsGetter +// mockedDockerCredentialsGetter := &DockerCredentialsGetterMock{ +// DockerCredentialsFunc: func(namespace string) v3.DockerCredentialInterface { +// panic("mock out the DockerCredentials method") +// }, +// } +// +// // use mockedDockerCredentialsGetter in code that requires DockerCredentialsGetter +// // and then make assertions. +// +// } +type DockerCredentialsGetterMock struct { + // DockerCredentialsFunc mocks the DockerCredentials method. + DockerCredentialsFunc func(namespace string) v3.DockerCredentialInterface + + // calls tracks calls to the methods. + calls struct { + // DockerCredentials holds details about calls to the DockerCredentials method. + DockerCredentials []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// DockerCredentials calls DockerCredentialsFunc. +func (mock *DockerCredentialsGetterMock) DockerCredentials(namespace string) v3.DockerCredentialInterface { + if mock.DockerCredentialsFunc == nil { + panic("DockerCredentialsGetterMock.DockerCredentialsFunc: method is nil but DockerCredentialsGetter.DockerCredentials was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockDockerCredentialsGetterMockDockerCredentials.Lock() + mock.calls.DockerCredentials = append(mock.calls.DockerCredentials, callInfo) + lockDockerCredentialsGetterMockDockerCredentials.Unlock() + return mock.DockerCredentialsFunc(namespace) +} + +// DockerCredentialsCalls gets all the calls that were made to DockerCredentials. +// Check the length with: +// len(mockedDockerCredentialsGetter.DockerCredentialsCalls()) +func (mock *DockerCredentialsGetterMock) DockerCredentialsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockDockerCredentialsGetterMockDockerCredentials.RLock() + calls = mock.calls.DockerCredentials + lockDockerCredentialsGetterMockDockerCredentials.RUnlock() + return calls +} diff --git a/apis/project.cattle.io/v3/fakes/zz_generated_namespaced_basic_auth_mock_test.go b/apis/project.cattle.io/v3/fakes/zz_generated_namespaced_basic_auth_mock_test.go new file mode 100644 index 00000000..e468aaed --- /dev/null +++ b/apis/project.cattle.io/v3/fakes/zz_generated_namespaced_basic_auth_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/project.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockNamespacedBasicAuthListerMockGet sync.RWMutex + lockNamespacedBasicAuthListerMockList sync.RWMutex +) + +// Ensure, that NamespacedBasicAuthListerMock does implement NamespacedBasicAuthLister. +// If this is not the case, regenerate this file with moq. +var _ v3.NamespacedBasicAuthLister = &NamespacedBasicAuthListerMock{} + +// NamespacedBasicAuthListerMock is a mock implementation of NamespacedBasicAuthLister. +// +// func TestSomethingThatUsesNamespacedBasicAuthLister(t *testing.T) { +// +// // make and configure a mocked NamespacedBasicAuthLister +// mockedNamespacedBasicAuthLister := &NamespacedBasicAuthListerMock{ +// GetFunc: func(namespace string, name string) (*v3.NamespacedBasicAuth, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.NamespacedBasicAuth, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedNamespacedBasicAuthLister in code that requires NamespacedBasicAuthLister +// // and then make assertions. +// +// } +type NamespacedBasicAuthListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.NamespacedBasicAuth, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.NamespacedBasicAuth, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *NamespacedBasicAuthListerMock) Get(namespace string, name string) (*v3.NamespacedBasicAuth, error) { + if mock.GetFunc == nil { + panic("NamespacedBasicAuthListerMock.GetFunc: method is nil but NamespacedBasicAuthLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockNamespacedBasicAuthListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockNamespacedBasicAuthListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedNamespacedBasicAuthLister.GetCalls()) +func (mock *NamespacedBasicAuthListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockNamespacedBasicAuthListerMockGet.RLock() + calls = mock.calls.Get + lockNamespacedBasicAuthListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *NamespacedBasicAuthListerMock) List(namespace string, selector labels.Selector) ([]*v3.NamespacedBasicAuth, error) { + if mock.ListFunc == nil { + panic("NamespacedBasicAuthListerMock.ListFunc: method is nil but NamespacedBasicAuthLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockNamespacedBasicAuthListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockNamespacedBasicAuthListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedNamespacedBasicAuthLister.ListCalls()) +func (mock *NamespacedBasicAuthListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockNamespacedBasicAuthListerMockList.RLock() + calls = mock.calls.List + lockNamespacedBasicAuthListerMockList.RUnlock() + return calls +} + +var ( + lockNamespacedBasicAuthControllerMockAddClusterScopedHandler sync.RWMutex + lockNamespacedBasicAuthControllerMockAddHandler sync.RWMutex + lockNamespacedBasicAuthControllerMockEnqueue sync.RWMutex + lockNamespacedBasicAuthControllerMockGeneric sync.RWMutex + lockNamespacedBasicAuthControllerMockInformer sync.RWMutex + lockNamespacedBasicAuthControllerMockLister sync.RWMutex + lockNamespacedBasicAuthControllerMockStart sync.RWMutex + lockNamespacedBasicAuthControllerMockSync sync.RWMutex +) + +// Ensure, that NamespacedBasicAuthControllerMock does implement NamespacedBasicAuthController. +// If this is not the case, regenerate this file with moq. +var _ v3.NamespacedBasicAuthController = &NamespacedBasicAuthControllerMock{} + +// NamespacedBasicAuthControllerMock is a mock implementation of NamespacedBasicAuthController. +// +// func TestSomethingThatUsesNamespacedBasicAuthController(t *testing.T) { +// +// // make and configure a mocked NamespacedBasicAuthController +// mockedNamespacedBasicAuthController := &NamespacedBasicAuthControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.NamespacedBasicAuthHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.NamespacedBasicAuthHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.NamespacedBasicAuthLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedNamespacedBasicAuthController in code that requires NamespacedBasicAuthController +// // and then make assertions. +// +// } +type NamespacedBasicAuthControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.NamespacedBasicAuthHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.NamespacedBasicAuthHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.NamespacedBasicAuthLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.NamespacedBasicAuthHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.NamespacedBasicAuthHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *NamespacedBasicAuthControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.NamespacedBasicAuthHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("NamespacedBasicAuthControllerMock.AddClusterScopedHandlerFunc: method is nil but NamespacedBasicAuthController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.NamespacedBasicAuthHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockNamespacedBasicAuthControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockNamespacedBasicAuthControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedNamespacedBasicAuthController.AddClusterScopedHandlerCalls()) +func (mock *NamespacedBasicAuthControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.NamespacedBasicAuthHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.NamespacedBasicAuthHandlerFunc + } + lockNamespacedBasicAuthControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockNamespacedBasicAuthControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *NamespacedBasicAuthControllerMock) AddHandler(ctx context.Context, name string, handler v3.NamespacedBasicAuthHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("NamespacedBasicAuthControllerMock.AddHandlerFunc: method is nil but NamespacedBasicAuthController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.NamespacedBasicAuthHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockNamespacedBasicAuthControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockNamespacedBasicAuthControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedNamespacedBasicAuthController.AddHandlerCalls()) +func (mock *NamespacedBasicAuthControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.NamespacedBasicAuthHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.NamespacedBasicAuthHandlerFunc + } + lockNamespacedBasicAuthControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockNamespacedBasicAuthControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *NamespacedBasicAuthControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("NamespacedBasicAuthControllerMock.EnqueueFunc: method is nil but NamespacedBasicAuthController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockNamespacedBasicAuthControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockNamespacedBasicAuthControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedNamespacedBasicAuthController.EnqueueCalls()) +func (mock *NamespacedBasicAuthControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockNamespacedBasicAuthControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockNamespacedBasicAuthControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *NamespacedBasicAuthControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("NamespacedBasicAuthControllerMock.GenericFunc: method is nil but NamespacedBasicAuthController.Generic was just called") + } + callInfo := struct { + }{} + lockNamespacedBasicAuthControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockNamespacedBasicAuthControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedNamespacedBasicAuthController.GenericCalls()) +func (mock *NamespacedBasicAuthControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockNamespacedBasicAuthControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockNamespacedBasicAuthControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *NamespacedBasicAuthControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("NamespacedBasicAuthControllerMock.InformerFunc: method is nil but NamespacedBasicAuthController.Informer was just called") + } + callInfo := struct { + }{} + lockNamespacedBasicAuthControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockNamespacedBasicAuthControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedNamespacedBasicAuthController.InformerCalls()) +func (mock *NamespacedBasicAuthControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockNamespacedBasicAuthControllerMockInformer.RLock() + calls = mock.calls.Informer + lockNamespacedBasicAuthControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *NamespacedBasicAuthControllerMock) Lister() v3.NamespacedBasicAuthLister { + if mock.ListerFunc == nil { + panic("NamespacedBasicAuthControllerMock.ListerFunc: method is nil but NamespacedBasicAuthController.Lister was just called") + } + callInfo := struct { + }{} + lockNamespacedBasicAuthControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockNamespacedBasicAuthControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedNamespacedBasicAuthController.ListerCalls()) +func (mock *NamespacedBasicAuthControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockNamespacedBasicAuthControllerMockLister.RLock() + calls = mock.calls.Lister + lockNamespacedBasicAuthControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *NamespacedBasicAuthControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("NamespacedBasicAuthControllerMock.StartFunc: method is nil but NamespacedBasicAuthController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockNamespacedBasicAuthControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockNamespacedBasicAuthControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedNamespacedBasicAuthController.StartCalls()) +func (mock *NamespacedBasicAuthControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockNamespacedBasicAuthControllerMockStart.RLock() + calls = mock.calls.Start + lockNamespacedBasicAuthControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *NamespacedBasicAuthControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("NamespacedBasicAuthControllerMock.SyncFunc: method is nil but NamespacedBasicAuthController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockNamespacedBasicAuthControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockNamespacedBasicAuthControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedNamespacedBasicAuthController.SyncCalls()) +func (mock *NamespacedBasicAuthControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockNamespacedBasicAuthControllerMockSync.RLock() + calls = mock.calls.Sync + lockNamespacedBasicAuthControllerMockSync.RUnlock() + return calls +} + +var ( + lockNamespacedBasicAuthInterfaceMockAddClusterScopedHandler sync.RWMutex + lockNamespacedBasicAuthInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockNamespacedBasicAuthInterfaceMockAddHandler sync.RWMutex + lockNamespacedBasicAuthInterfaceMockAddLifecycle sync.RWMutex + lockNamespacedBasicAuthInterfaceMockController sync.RWMutex + lockNamespacedBasicAuthInterfaceMockCreate sync.RWMutex + lockNamespacedBasicAuthInterfaceMockDelete sync.RWMutex + lockNamespacedBasicAuthInterfaceMockDeleteCollection sync.RWMutex + lockNamespacedBasicAuthInterfaceMockDeleteNamespaced sync.RWMutex + lockNamespacedBasicAuthInterfaceMockGet sync.RWMutex + lockNamespacedBasicAuthInterfaceMockGetNamespaced sync.RWMutex + lockNamespacedBasicAuthInterfaceMockList sync.RWMutex + lockNamespacedBasicAuthInterfaceMockObjectClient sync.RWMutex + lockNamespacedBasicAuthInterfaceMockUpdate sync.RWMutex + lockNamespacedBasicAuthInterfaceMockWatch sync.RWMutex +) + +// Ensure, that NamespacedBasicAuthInterfaceMock does implement NamespacedBasicAuthInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.NamespacedBasicAuthInterface = &NamespacedBasicAuthInterfaceMock{} + +// NamespacedBasicAuthInterfaceMock is a mock implementation of NamespacedBasicAuthInterface. +// +// func TestSomethingThatUsesNamespacedBasicAuthInterface(t *testing.T) { +// +// // make and configure a mocked NamespacedBasicAuthInterface +// mockedNamespacedBasicAuthInterface := &NamespacedBasicAuthInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.NamespacedBasicAuthHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.NamespacedBasicAuthLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.NamespacedBasicAuthHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.NamespacedBasicAuthLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.NamespacedBasicAuthController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.NamespacedBasicAuth) (*v3.NamespacedBasicAuth, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.NamespacedBasicAuth, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.NamespacedBasicAuth, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.NamespacedBasicAuthList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.NamespacedBasicAuth) (*v3.NamespacedBasicAuth, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedNamespacedBasicAuthInterface in code that requires NamespacedBasicAuthInterface +// // and then make assertions. +// +// } +type NamespacedBasicAuthInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.NamespacedBasicAuthHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.NamespacedBasicAuthLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.NamespacedBasicAuthHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.NamespacedBasicAuthLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.NamespacedBasicAuthController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.NamespacedBasicAuth) (*v3.NamespacedBasicAuth, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.NamespacedBasicAuth, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.NamespacedBasicAuth, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.NamespacedBasicAuthList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.NamespacedBasicAuth) (*v3.NamespacedBasicAuth, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.NamespacedBasicAuthHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.NamespacedBasicAuthLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.NamespacedBasicAuthHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.NamespacedBasicAuthLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.NamespacedBasicAuth + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.NamespacedBasicAuth + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *NamespacedBasicAuthInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.NamespacedBasicAuthHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("NamespacedBasicAuthInterfaceMock.AddClusterScopedHandlerFunc: method is nil but NamespacedBasicAuthInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.NamespacedBasicAuthHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockNamespacedBasicAuthInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockNamespacedBasicAuthInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedNamespacedBasicAuthInterface.AddClusterScopedHandlerCalls()) +func (mock *NamespacedBasicAuthInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.NamespacedBasicAuthHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.NamespacedBasicAuthHandlerFunc + } + lockNamespacedBasicAuthInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockNamespacedBasicAuthInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *NamespacedBasicAuthInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.NamespacedBasicAuthLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("NamespacedBasicAuthInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but NamespacedBasicAuthInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.NamespacedBasicAuthLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockNamespacedBasicAuthInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockNamespacedBasicAuthInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedNamespacedBasicAuthInterface.AddClusterScopedLifecycleCalls()) +func (mock *NamespacedBasicAuthInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.NamespacedBasicAuthLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.NamespacedBasicAuthLifecycle + } + lockNamespacedBasicAuthInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockNamespacedBasicAuthInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *NamespacedBasicAuthInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.NamespacedBasicAuthHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("NamespacedBasicAuthInterfaceMock.AddHandlerFunc: method is nil but NamespacedBasicAuthInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.NamespacedBasicAuthHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockNamespacedBasicAuthInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockNamespacedBasicAuthInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedNamespacedBasicAuthInterface.AddHandlerCalls()) +func (mock *NamespacedBasicAuthInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.NamespacedBasicAuthHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.NamespacedBasicAuthHandlerFunc + } + lockNamespacedBasicAuthInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockNamespacedBasicAuthInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *NamespacedBasicAuthInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.NamespacedBasicAuthLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("NamespacedBasicAuthInterfaceMock.AddLifecycleFunc: method is nil but NamespacedBasicAuthInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.NamespacedBasicAuthLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockNamespacedBasicAuthInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockNamespacedBasicAuthInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedNamespacedBasicAuthInterface.AddLifecycleCalls()) +func (mock *NamespacedBasicAuthInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.NamespacedBasicAuthLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.NamespacedBasicAuthLifecycle + } + lockNamespacedBasicAuthInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockNamespacedBasicAuthInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *NamespacedBasicAuthInterfaceMock) Controller() v3.NamespacedBasicAuthController { + if mock.ControllerFunc == nil { + panic("NamespacedBasicAuthInterfaceMock.ControllerFunc: method is nil but NamespacedBasicAuthInterface.Controller was just called") + } + callInfo := struct { + }{} + lockNamespacedBasicAuthInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockNamespacedBasicAuthInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedNamespacedBasicAuthInterface.ControllerCalls()) +func (mock *NamespacedBasicAuthInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockNamespacedBasicAuthInterfaceMockController.RLock() + calls = mock.calls.Controller + lockNamespacedBasicAuthInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *NamespacedBasicAuthInterfaceMock) Create(in1 *v3.NamespacedBasicAuth) (*v3.NamespacedBasicAuth, error) { + if mock.CreateFunc == nil { + panic("NamespacedBasicAuthInterfaceMock.CreateFunc: method is nil but NamespacedBasicAuthInterface.Create was just called") + } + callInfo := struct { + In1 *v3.NamespacedBasicAuth + }{ + In1: in1, + } + lockNamespacedBasicAuthInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockNamespacedBasicAuthInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedNamespacedBasicAuthInterface.CreateCalls()) +func (mock *NamespacedBasicAuthInterfaceMock) CreateCalls() []struct { + In1 *v3.NamespacedBasicAuth +} { + var calls []struct { + In1 *v3.NamespacedBasicAuth + } + lockNamespacedBasicAuthInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockNamespacedBasicAuthInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *NamespacedBasicAuthInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("NamespacedBasicAuthInterfaceMock.DeleteFunc: method is nil but NamespacedBasicAuthInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockNamespacedBasicAuthInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockNamespacedBasicAuthInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedNamespacedBasicAuthInterface.DeleteCalls()) +func (mock *NamespacedBasicAuthInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockNamespacedBasicAuthInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockNamespacedBasicAuthInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *NamespacedBasicAuthInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("NamespacedBasicAuthInterfaceMock.DeleteCollectionFunc: method is nil but NamespacedBasicAuthInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockNamespacedBasicAuthInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockNamespacedBasicAuthInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedNamespacedBasicAuthInterface.DeleteCollectionCalls()) +func (mock *NamespacedBasicAuthInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockNamespacedBasicAuthInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockNamespacedBasicAuthInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *NamespacedBasicAuthInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("NamespacedBasicAuthInterfaceMock.DeleteNamespacedFunc: method is nil but NamespacedBasicAuthInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockNamespacedBasicAuthInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockNamespacedBasicAuthInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedNamespacedBasicAuthInterface.DeleteNamespacedCalls()) +func (mock *NamespacedBasicAuthInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockNamespacedBasicAuthInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockNamespacedBasicAuthInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *NamespacedBasicAuthInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.NamespacedBasicAuth, error) { + if mock.GetFunc == nil { + panic("NamespacedBasicAuthInterfaceMock.GetFunc: method is nil but NamespacedBasicAuthInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockNamespacedBasicAuthInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockNamespacedBasicAuthInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedNamespacedBasicAuthInterface.GetCalls()) +func (mock *NamespacedBasicAuthInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockNamespacedBasicAuthInterfaceMockGet.RLock() + calls = mock.calls.Get + lockNamespacedBasicAuthInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *NamespacedBasicAuthInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.NamespacedBasicAuth, error) { + if mock.GetNamespacedFunc == nil { + panic("NamespacedBasicAuthInterfaceMock.GetNamespacedFunc: method is nil but NamespacedBasicAuthInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockNamespacedBasicAuthInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockNamespacedBasicAuthInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedNamespacedBasicAuthInterface.GetNamespacedCalls()) +func (mock *NamespacedBasicAuthInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockNamespacedBasicAuthInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockNamespacedBasicAuthInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *NamespacedBasicAuthInterfaceMock) List(opts v1.ListOptions) (*v3.NamespacedBasicAuthList, error) { + if mock.ListFunc == nil { + panic("NamespacedBasicAuthInterfaceMock.ListFunc: method is nil but NamespacedBasicAuthInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockNamespacedBasicAuthInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockNamespacedBasicAuthInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedNamespacedBasicAuthInterface.ListCalls()) +func (mock *NamespacedBasicAuthInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockNamespacedBasicAuthInterfaceMockList.RLock() + calls = mock.calls.List + lockNamespacedBasicAuthInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *NamespacedBasicAuthInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("NamespacedBasicAuthInterfaceMock.ObjectClientFunc: method is nil but NamespacedBasicAuthInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockNamespacedBasicAuthInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockNamespacedBasicAuthInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedNamespacedBasicAuthInterface.ObjectClientCalls()) +func (mock *NamespacedBasicAuthInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockNamespacedBasicAuthInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockNamespacedBasicAuthInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *NamespacedBasicAuthInterfaceMock) Update(in1 *v3.NamespacedBasicAuth) (*v3.NamespacedBasicAuth, error) { + if mock.UpdateFunc == nil { + panic("NamespacedBasicAuthInterfaceMock.UpdateFunc: method is nil but NamespacedBasicAuthInterface.Update was just called") + } + callInfo := struct { + In1 *v3.NamespacedBasicAuth + }{ + In1: in1, + } + lockNamespacedBasicAuthInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockNamespacedBasicAuthInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedNamespacedBasicAuthInterface.UpdateCalls()) +func (mock *NamespacedBasicAuthInterfaceMock) UpdateCalls() []struct { + In1 *v3.NamespacedBasicAuth +} { + var calls []struct { + In1 *v3.NamespacedBasicAuth + } + lockNamespacedBasicAuthInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockNamespacedBasicAuthInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *NamespacedBasicAuthInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("NamespacedBasicAuthInterfaceMock.WatchFunc: method is nil but NamespacedBasicAuthInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockNamespacedBasicAuthInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockNamespacedBasicAuthInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedNamespacedBasicAuthInterface.WatchCalls()) +func (mock *NamespacedBasicAuthInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockNamespacedBasicAuthInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockNamespacedBasicAuthInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockNamespacedBasicAuthsGetterMockNamespacedBasicAuths sync.RWMutex +) + +// Ensure, that NamespacedBasicAuthsGetterMock does implement NamespacedBasicAuthsGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.NamespacedBasicAuthsGetter = &NamespacedBasicAuthsGetterMock{} + +// NamespacedBasicAuthsGetterMock is a mock implementation of NamespacedBasicAuthsGetter. +// +// func TestSomethingThatUsesNamespacedBasicAuthsGetter(t *testing.T) { +// +// // make and configure a mocked NamespacedBasicAuthsGetter +// mockedNamespacedBasicAuthsGetter := &NamespacedBasicAuthsGetterMock{ +// NamespacedBasicAuthsFunc: func(namespace string) v3.NamespacedBasicAuthInterface { +// panic("mock out the NamespacedBasicAuths method") +// }, +// } +// +// // use mockedNamespacedBasicAuthsGetter in code that requires NamespacedBasicAuthsGetter +// // and then make assertions. +// +// } +type NamespacedBasicAuthsGetterMock struct { + // NamespacedBasicAuthsFunc mocks the NamespacedBasicAuths method. + NamespacedBasicAuthsFunc func(namespace string) v3.NamespacedBasicAuthInterface + + // calls tracks calls to the methods. + calls struct { + // NamespacedBasicAuths holds details about calls to the NamespacedBasicAuths method. + NamespacedBasicAuths []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// NamespacedBasicAuths calls NamespacedBasicAuthsFunc. +func (mock *NamespacedBasicAuthsGetterMock) NamespacedBasicAuths(namespace string) v3.NamespacedBasicAuthInterface { + if mock.NamespacedBasicAuthsFunc == nil { + panic("NamespacedBasicAuthsGetterMock.NamespacedBasicAuthsFunc: method is nil but NamespacedBasicAuthsGetter.NamespacedBasicAuths was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockNamespacedBasicAuthsGetterMockNamespacedBasicAuths.Lock() + mock.calls.NamespacedBasicAuths = append(mock.calls.NamespacedBasicAuths, callInfo) + lockNamespacedBasicAuthsGetterMockNamespacedBasicAuths.Unlock() + return mock.NamespacedBasicAuthsFunc(namespace) +} + +// NamespacedBasicAuthsCalls gets all the calls that were made to NamespacedBasicAuths. +// Check the length with: +// len(mockedNamespacedBasicAuthsGetter.NamespacedBasicAuthsCalls()) +func (mock *NamespacedBasicAuthsGetterMock) NamespacedBasicAuthsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockNamespacedBasicAuthsGetterMockNamespacedBasicAuths.RLock() + calls = mock.calls.NamespacedBasicAuths + lockNamespacedBasicAuthsGetterMockNamespacedBasicAuths.RUnlock() + return calls +} diff --git a/apis/project.cattle.io/v3/fakes/zz_generated_namespaced_certificate_mock_test.go b/apis/project.cattle.io/v3/fakes/zz_generated_namespaced_certificate_mock_test.go new file mode 100644 index 00000000..2c9ec54b --- /dev/null +++ b/apis/project.cattle.io/v3/fakes/zz_generated_namespaced_certificate_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/project.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockNamespacedCertificateListerMockGet sync.RWMutex + lockNamespacedCertificateListerMockList sync.RWMutex +) + +// Ensure, that NamespacedCertificateListerMock does implement NamespacedCertificateLister. +// If this is not the case, regenerate this file with moq. +var _ v3.NamespacedCertificateLister = &NamespacedCertificateListerMock{} + +// NamespacedCertificateListerMock is a mock implementation of NamespacedCertificateLister. +// +// func TestSomethingThatUsesNamespacedCertificateLister(t *testing.T) { +// +// // make and configure a mocked NamespacedCertificateLister +// mockedNamespacedCertificateLister := &NamespacedCertificateListerMock{ +// GetFunc: func(namespace string, name string) (*v3.NamespacedCertificate, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.NamespacedCertificate, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedNamespacedCertificateLister in code that requires NamespacedCertificateLister +// // and then make assertions. +// +// } +type NamespacedCertificateListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.NamespacedCertificate, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.NamespacedCertificate, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *NamespacedCertificateListerMock) Get(namespace string, name string) (*v3.NamespacedCertificate, error) { + if mock.GetFunc == nil { + panic("NamespacedCertificateListerMock.GetFunc: method is nil but NamespacedCertificateLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockNamespacedCertificateListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockNamespacedCertificateListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedNamespacedCertificateLister.GetCalls()) +func (mock *NamespacedCertificateListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockNamespacedCertificateListerMockGet.RLock() + calls = mock.calls.Get + lockNamespacedCertificateListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *NamespacedCertificateListerMock) List(namespace string, selector labels.Selector) ([]*v3.NamespacedCertificate, error) { + if mock.ListFunc == nil { + panic("NamespacedCertificateListerMock.ListFunc: method is nil but NamespacedCertificateLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockNamespacedCertificateListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockNamespacedCertificateListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedNamespacedCertificateLister.ListCalls()) +func (mock *NamespacedCertificateListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockNamespacedCertificateListerMockList.RLock() + calls = mock.calls.List + lockNamespacedCertificateListerMockList.RUnlock() + return calls +} + +var ( + lockNamespacedCertificateControllerMockAddClusterScopedHandler sync.RWMutex + lockNamespacedCertificateControllerMockAddHandler sync.RWMutex + lockNamespacedCertificateControllerMockEnqueue sync.RWMutex + lockNamespacedCertificateControllerMockGeneric sync.RWMutex + lockNamespacedCertificateControllerMockInformer sync.RWMutex + lockNamespacedCertificateControllerMockLister sync.RWMutex + lockNamespacedCertificateControllerMockStart sync.RWMutex + lockNamespacedCertificateControllerMockSync sync.RWMutex +) + +// Ensure, that NamespacedCertificateControllerMock does implement NamespacedCertificateController. +// If this is not the case, regenerate this file with moq. +var _ v3.NamespacedCertificateController = &NamespacedCertificateControllerMock{} + +// NamespacedCertificateControllerMock is a mock implementation of NamespacedCertificateController. +// +// func TestSomethingThatUsesNamespacedCertificateController(t *testing.T) { +// +// // make and configure a mocked NamespacedCertificateController +// mockedNamespacedCertificateController := &NamespacedCertificateControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.NamespacedCertificateHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.NamespacedCertificateHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.NamespacedCertificateLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedNamespacedCertificateController in code that requires NamespacedCertificateController +// // and then make assertions. +// +// } +type NamespacedCertificateControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.NamespacedCertificateHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.NamespacedCertificateHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.NamespacedCertificateLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.NamespacedCertificateHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.NamespacedCertificateHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *NamespacedCertificateControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.NamespacedCertificateHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("NamespacedCertificateControllerMock.AddClusterScopedHandlerFunc: method is nil but NamespacedCertificateController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.NamespacedCertificateHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockNamespacedCertificateControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockNamespacedCertificateControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedNamespacedCertificateController.AddClusterScopedHandlerCalls()) +func (mock *NamespacedCertificateControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.NamespacedCertificateHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.NamespacedCertificateHandlerFunc + } + lockNamespacedCertificateControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockNamespacedCertificateControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *NamespacedCertificateControllerMock) AddHandler(ctx context.Context, name string, handler v3.NamespacedCertificateHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("NamespacedCertificateControllerMock.AddHandlerFunc: method is nil but NamespacedCertificateController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.NamespacedCertificateHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockNamespacedCertificateControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockNamespacedCertificateControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedNamespacedCertificateController.AddHandlerCalls()) +func (mock *NamespacedCertificateControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.NamespacedCertificateHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.NamespacedCertificateHandlerFunc + } + lockNamespacedCertificateControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockNamespacedCertificateControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *NamespacedCertificateControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("NamespacedCertificateControllerMock.EnqueueFunc: method is nil but NamespacedCertificateController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockNamespacedCertificateControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockNamespacedCertificateControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedNamespacedCertificateController.EnqueueCalls()) +func (mock *NamespacedCertificateControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockNamespacedCertificateControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockNamespacedCertificateControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *NamespacedCertificateControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("NamespacedCertificateControllerMock.GenericFunc: method is nil but NamespacedCertificateController.Generic was just called") + } + callInfo := struct { + }{} + lockNamespacedCertificateControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockNamespacedCertificateControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedNamespacedCertificateController.GenericCalls()) +func (mock *NamespacedCertificateControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockNamespacedCertificateControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockNamespacedCertificateControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *NamespacedCertificateControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("NamespacedCertificateControllerMock.InformerFunc: method is nil but NamespacedCertificateController.Informer was just called") + } + callInfo := struct { + }{} + lockNamespacedCertificateControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockNamespacedCertificateControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedNamespacedCertificateController.InformerCalls()) +func (mock *NamespacedCertificateControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockNamespacedCertificateControllerMockInformer.RLock() + calls = mock.calls.Informer + lockNamespacedCertificateControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *NamespacedCertificateControllerMock) Lister() v3.NamespacedCertificateLister { + if mock.ListerFunc == nil { + panic("NamespacedCertificateControllerMock.ListerFunc: method is nil but NamespacedCertificateController.Lister was just called") + } + callInfo := struct { + }{} + lockNamespacedCertificateControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockNamespacedCertificateControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedNamespacedCertificateController.ListerCalls()) +func (mock *NamespacedCertificateControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockNamespacedCertificateControllerMockLister.RLock() + calls = mock.calls.Lister + lockNamespacedCertificateControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *NamespacedCertificateControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("NamespacedCertificateControllerMock.StartFunc: method is nil but NamespacedCertificateController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockNamespacedCertificateControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockNamespacedCertificateControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedNamespacedCertificateController.StartCalls()) +func (mock *NamespacedCertificateControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockNamespacedCertificateControllerMockStart.RLock() + calls = mock.calls.Start + lockNamespacedCertificateControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *NamespacedCertificateControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("NamespacedCertificateControllerMock.SyncFunc: method is nil but NamespacedCertificateController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockNamespacedCertificateControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockNamespacedCertificateControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedNamespacedCertificateController.SyncCalls()) +func (mock *NamespacedCertificateControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockNamespacedCertificateControllerMockSync.RLock() + calls = mock.calls.Sync + lockNamespacedCertificateControllerMockSync.RUnlock() + return calls +} + +var ( + lockNamespacedCertificateInterfaceMockAddClusterScopedHandler sync.RWMutex + lockNamespacedCertificateInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockNamespacedCertificateInterfaceMockAddHandler sync.RWMutex + lockNamespacedCertificateInterfaceMockAddLifecycle sync.RWMutex + lockNamespacedCertificateInterfaceMockController sync.RWMutex + lockNamespacedCertificateInterfaceMockCreate sync.RWMutex + lockNamespacedCertificateInterfaceMockDelete sync.RWMutex + lockNamespacedCertificateInterfaceMockDeleteCollection sync.RWMutex + lockNamespacedCertificateInterfaceMockDeleteNamespaced sync.RWMutex + lockNamespacedCertificateInterfaceMockGet sync.RWMutex + lockNamespacedCertificateInterfaceMockGetNamespaced sync.RWMutex + lockNamespacedCertificateInterfaceMockList sync.RWMutex + lockNamespacedCertificateInterfaceMockObjectClient sync.RWMutex + lockNamespacedCertificateInterfaceMockUpdate sync.RWMutex + lockNamespacedCertificateInterfaceMockWatch sync.RWMutex +) + +// Ensure, that NamespacedCertificateInterfaceMock does implement NamespacedCertificateInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.NamespacedCertificateInterface = &NamespacedCertificateInterfaceMock{} + +// NamespacedCertificateInterfaceMock is a mock implementation of NamespacedCertificateInterface. +// +// func TestSomethingThatUsesNamespacedCertificateInterface(t *testing.T) { +// +// // make and configure a mocked NamespacedCertificateInterface +// mockedNamespacedCertificateInterface := &NamespacedCertificateInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.NamespacedCertificateHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.NamespacedCertificateLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.NamespacedCertificateHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.NamespacedCertificateLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.NamespacedCertificateController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.NamespacedCertificate) (*v3.NamespacedCertificate, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.NamespacedCertificate, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.NamespacedCertificate, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.NamespacedCertificateList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.NamespacedCertificate) (*v3.NamespacedCertificate, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedNamespacedCertificateInterface in code that requires NamespacedCertificateInterface +// // and then make assertions. +// +// } +type NamespacedCertificateInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.NamespacedCertificateHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.NamespacedCertificateLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.NamespacedCertificateHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.NamespacedCertificateLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.NamespacedCertificateController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.NamespacedCertificate) (*v3.NamespacedCertificate, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.NamespacedCertificate, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.NamespacedCertificate, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.NamespacedCertificateList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.NamespacedCertificate) (*v3.NamespacedCertificate, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.NamespacedCertificateHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.NamespacedCertificateLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.NamespacedCertificateHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.NamespacedCertificateLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.NamespacedCertificate + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.NamespacedCertificate + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *NamespacedCertificateInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.NamespacedCertificateHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("NamespacedCertificateInterfaceMock.AddClusterScopedHandlerFunc: method is nil but NamespacedCertificateInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.NamespacedCertificateHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockNamespacedCertificateInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockNamespacedCertificateInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedNamespacedCertificateInterface.AddClusterScopedHandlerCalls()) +func (mock *NamespacedCertificateInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.NamespacedCertificateHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.NamespacedCertificateHandlerFunc + } + lockNamespacedCertificateInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockNamespacedCertificateInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *NamespacedCertificateInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.NamespacedCertificateLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("NamespacedCertificateInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but NamespacedCertificateInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.NamespacedCertificateLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockNamespacedCertificateInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockNamespacedCertificateInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedNamespacedCertificateInterface.AddClusterScopedLifecycleCalls()) +func (mock *NamespacedCertificateInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.NamespacedCertificateLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.NamespacedCertificateLifecycle + } + lockNamespacedCertificateInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockNamespacedCertificateInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *NamespacedCertificateInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.NamespacedCertificateHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("NamespacedCertificateInterfaceMock.AddHandlerFunc: method is nil but NamespacedCertificateInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.NamespacedCertificateHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockNamespacedCertificateInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockNamespacedCertificateInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedNamespacedCertificateInterface.AddHandlerCalls()) +func (mock *NamespacedCertificateInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.NamespacedCertificateHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.NamespacedCertificateHandlerFunc + } + lockNamespacedCertificateInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockNamespacedCertificateInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *NamespacedCertificateInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.NamespacedCertificateLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("NamespacedCertificateInterfaceMock.AddLifecycleFunc: method is nil but NamespacedCertificateInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.NamespacedCertificateLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockNamespacedCertificateInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockNamespacedCertificateInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedNamespacedCertificateInterface.AddLifecycleCalls()) +func (mock *NamespacedCertificateInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.NamespacedCertificateLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.NamespacedCertificateLifecycle + } + lockNamespacedCertificateInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockNamespacedCertificateInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *NamespacedCertificateInterfaceMock) Controller() v3.NamespacedCertificateController { + if mock.ControllerFunc == nil { + panic("NamespacedCertificateInterfaceMock.ControllerFunc: method is nil but NamespacedCertificateInterface.Controller was just called") + } + callInfo := struct { + }{} + lockNamespacedCertificateInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockNamespacedCertificateInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedNamespacedCertificateInterface.ControllerCalls()) +func (mock *NamespacedCertificateInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockNamespacedCertificateInterfaceMockController.RLock() + calls = mock.calls.Controller + lockNamespacedCertificateInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *NamespacedCertificateInterfaceMock) Create(in1 *v3.NamespacedCertificate) (*v3.NamespacedCertificate, error) { + if mock.CreateFunc == nil { + panic("NamespacedCertificateInterfaceMock.CreateFunc: method is nil but NamespacedCertificateInterface.Create was just called") + } + callInfo := struct { + In1 *v3.NamespacedCertificate + }{ + In1: in1, + } + lockNamespacedCertificateInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockNamespacedCertificateInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedNamespacedCertificateInterface.CreateCalls()) +func (mock *NamespacedCertificateInterfaceMock) CreateCalls() []struct { + In1 *v3.NamespacedCertificate +} { + var calls []struct { + In1 *v3.NamespacedCertificate + } + lockNamespacedCertificateInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockNamespacedCertificateInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *NamespacedCertificateInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("NamespacedCertificateInterfaceMock.DeleteFunc: method is nil but NamespacedCertificateInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockNamespacedCertificateInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockNamespacedCertificateInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedNamespacedCertificateInterface.DeleteCalls()) +func (mock *NamespacedCertificateInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockNamespacedCertificateInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockNamespacedCertificateInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *NamespacedCertificateInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("NamespacedCertificateInterfaceMock.DeleteCollectionFunc: method is nil but NamespacedCertificateInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockNamespacedCertificateInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockNamespacedCertificateInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedNamespacedCertificateInterface.DeleteCollectionCalls()) +func (mock *NamespacedCertificateInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockNamespacedCertificateInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockNamespacedCertificateInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *NamespacedCertificateInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("NamespacedCertificateInterfaceMock.DeleteNamespacedFunc: method is nil but NamespacedCertificateInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockNamespacedCertificateInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockNamespacedCertificateInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedNamespacedCertificateInterface.DeleteNamespacedCalls()) +func (mock *NamespacedCertificateInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockNamespacedCertificateInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockNamespacedCertificateInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *NamespacedCertificateInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.NamespacedCertificate, error) { + if mock.GetFunc == nil { + panic("NamespacedCertificateInterfaceMock.GetFunc: method is nil but NamespacedCertificateInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockNamespacedCertificateInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockNamespacedCertificateInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedNamespacedCertificateInterface.GetCalls()) +func (mock *NamespacedCertificateInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockNamespacedCertificateInterfaceMockGet.RLock() + calls = mock.calls.Get + lockNamespacedCertificateInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *NamespacedCertificateInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.NamespacedCertificate, error) { + if mock.GetNamespacedFunc == nil { + panic("NamespacedCertificateInterfaceMock.GetNamespacedFunc: method is nil but NamespacedCertificateInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockNamespacedCertificateInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockNamespacedCertificateInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedNamespacedCertificateInterface.GetNamespacedCalls()) +func (mock *NamespacedCertificateInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockNamespacedCertificateInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockNamespacedCertificateInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *NamespacedCertificateInterfaceMock) List(opts v1.ListOptions) (*v3.NamespacedCertificateList, error) { + if mock.ListFunc == nil { + panic("NamespacedCertificateInterfaceMock.ListFunc: method is nil but NamespacedCertificateInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockNamespacedCertificateInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockNamespacedCertificateInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedNamespacedCertificateInterface.ListCalls()) +func (mock *NamespacedCertificateInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockNamespacedCertificateInterfaceMockList.RLock() + calls = mock.calls.List + lockNamespacedCertificateInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *NamespacedCertificateInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("NamespacedCertificateInterfaceMock.ObjectClientFunc: method is nil but NamespacedCertificateInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockNamespacedCertificateInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockNamespacedCertificateInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedNamespacedCertificateInterface.ObjectClientCalls()) +func (mock *NamespacedCertificateInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockNamespacedCertificateInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockNamespacedCertificateInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *NamespacedCertificateInterfaceMock) Update(in1 *v3.NamespacedCertificate) (*v3.NamespacedCertificate, error) { + if mock.UpdateFunc == nil { + panic("NamespacedCertificateInterfaceMock.UpdateFunc: method is nil but NamespacedCertificateInterface.Update was just called") + } + callInfo := struct { + In1 *v3.NamespacedCertificate + }{ + In1: in1, + } + lockNamespacedCertificateInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockNamespacedCertificateInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedNamespacedCertificateInterface.UpdateCalls()) +func (mock *NamespacedCertificateInterfaceMock) UpdateCalls() []struct { + In1 *v3.NamespacedCertificate +} { + var calls []struct { + In1 *v3.NamespacedCertificate + } + lockNamespacedCertificateInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockNamespacedCertificateInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *NamespacedCertificateInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("NamespacedCertificateInterfaceMock.WatchFunc: method is nil but NamespacedCertificateInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockNamespacedCertificateInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockNamespacedCertificateInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedNamespacedCertificateInterface.WatchCalls()) +func (mock *NamespacedCertificateInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockNamespacedCertificateInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockNamespacedCertificateInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockNamespacedCertificatesGetterMockNamespacedCertificates sync.RWMutex +) + +// Ensure, that NamespacedCertificatesGetterMock does implement NamespacedCertificatesGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.NamespacedCertificatesGetter = &NamespacedCertificatesGetterMock{} + +// NamespacedCertificatesGetterMock is a mock implementation of NamespacedCertificatesGetter. +// +// func TestSomethingThatUsesNamespacedCertificatesGetter(t *testing.T) { +// +// // make and configure a mocked NamespacedCertificatesGetter +// mockedNamespacedCertificatesGetter := &NamespacedCertificatesGetterMock{ +// NamespacedCertificatesFunc: func(namespace string) v3.NamespacedCertificateInterface { +// panic("mock out the NamespacedCertificates method") +// }, +// } +// +// // use mockedNamespacedCertificatesGetter in code that requires NamespacedCertificatesGetter +// // and then make assertions. +// +// } +type NamespacedCertificatesGetterMock struct { + // NamespacedCertificatesFunc mocks the NamespacedCertificates method. + NamespacedCertificatesFunc func(namespace string) v3.NamespacedCertificateInterface + + // calls tracks calls to the methods. + calls struct { + // NamespacedCertificates holds details about calls to the NamespacedCertificates method. + NamespacedCertificates []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// NamespacedCertificates calls NamespacedCertificatesFunc. +func (mock *NamespacedCertificatesGetterMock) NamespacedCertificates(namespace string) v3.NamespacedCertificateInterface { + if mock.NamespacedCertificatesFunc == nil { + panic("NamespacedCertificatesGetterMock.NamespacedCertificatesFunc: method is nil but NamespacedCertificatesGetter.NamespacedCertificates was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockNamespacedCertificatesGetterMockNamespacedCertificates.Lock() + mock.calls.NamespacedCertificates = append(mock.calls.NamespacedCertificates, callInfo) + lockNamespacedCertificatesGetterMockNamespacedCertificates.Unlock() + return mock.NamespacedCertificatesFunc(namespace) +} + +// NamespacedCertificatesCalls gets all the calls that were made to NamespacedCertificates. +// Check the length with: +// len(mockedNamespacedCertificatesGetter.NamespacedCertificatesCalls()) +func (mock *NamespacedCertificatesGetterMock) NamespacedCertificatesCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockNamespacedCertificatesGetterMockNamespacedCertificates.RLock() + calls = mock.calls.NamespacedCertificates + lockNamespacedCertificatesGetterMockNamespacedCertificates.RUnlock() + return calls +} diff --git a/apis/project.cattle.io/v3/fakes/zz_generated_namespaced_docker_credential_mock_test.go b/apis/project.cattle.io/v3/fakes/zz_generated_namespaced_docker_credential_mock_test.go new file mode 100644 index 00000000..271f83b4 --- /dev/null +++ b/apis/project.cattle.io/v3/fakes/zz_generated_namespaced_docker_credential_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/project.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockNamespacedDockerCredentialListerMockGet sync.RWMutex + lockNamespacedDockerCredentialListerMockList sync.RWMutex +) + +// Ensure, that NamespacedDockerCredentialListerMock does implement NamespacedDockerCredentialLister. +// If this is not the case, regenerate this file with moq. +var _ v3.NamespacedDockerCredentialLister = &NamespacedDockerCredentialListerMock{} + +// NamespacedDockerCredentialListerMock is a mock implementation of NamespacedDockerCredentialLister. +// +// func TestSomethingThatUsesNamespacedDockerCredentialLister(t *testing.T) { +// +// // make and configure a mocked NamespacedDockerCredentialLister +// mockedNamespacedDockerCredentialLister := &NamespacedDockerCredentialListerMock{ +// GetFunc: func(namespace string, name string) (*v3.NamespacedDockerCredential, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.NamespacedDockerCredential, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedNamespacedDockerCredentialLister in code that requires NamespacedDockerCredentialLister +// // and then make assertions. +// +// } +type NamespacedDockerCredentialListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.NamespacedDockerCredential, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.NamespacedDockerCredential, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *NamespacedDockerCredentialListerMock) Get(namespace string, name string) (*v3.NamespacedDockerCredential, error) { + if mock.GetFunc == nil { + panic("NamespacedDockerCredentialListerMock.GetFunc: method is nil but NamespacedDockerCredentialLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockNamespacedDockerCredentialListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockNamespacedDockerCredentialListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedNamespacedDockerCredentialLister.GetCalls()) +func (mock *NamespacedDockerCredentialListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockNamespacedDockerCredentialListerMockGet.RLock() + calls = mock.calls.Get + lockNamespacedDockerCredentialListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *NamespacedDockerCredentialListerMock) List(namespace string, selector labels.Selector) ([]*v3.NamespacedDockerCredential, error) { + if mock.ListFunc == nil { + panic("NamespacedDockerCredentialListerMock.ListFunc: method is nil but NamespacedDockerCredentialLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockNamespacedDockerCredentialListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockNamespacedDockerCredentialListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedNamespacedDockerCredentialLister.ListCalls()) +func (mock *NamespacedDockerCredentialListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockNamespacedDockerCredentialListerMockList.RLock() + calls = mock.calls.List + lockNamespacedDockerCredentialListerMockList.RUnlock() + return calls +} + +var ( + lockNamespacedDockerCredentialControllerMockAddClusterScopedHandler sync.RWMutex + lockNamespacedDockerCredentialControllerMockAddHandler sync.RWMutex + lockNamespacedDockerCredentialControllerMockEnqueue sync.RWMutex + lockNamespacedDockerCredentialControllerMockGeneric sync.RWMutex + lockNamespacedDockerCredentialControllerMockInformer sync.RWMutex + lockNamespacedDockerCredentialControllerMockLister sync.RWMutex + lockNamespacedDockerCredentialControllerMockStart sync.RWMutex + lockNamespacedDockerCredentialControllerMockSync sync.RWMutex +) + +// Ensure, that NamespacedDockerCredentialControllerMock does implement NamespacedDockerCredentialController. +// If this is not the case, regenerate this file with moq. +var _ v3.NamespacedDockerCredentialController = &NamespacedDockerCredentialControllerMock{} + +// NamespacedDockerCredentialControllerMock is a mock implementation of NamespacedDockerCredentialController. +// +// func TestSomethingThatUsesNamespacedDockerCredentialController(t *testing.T) { +// +// // make and configure a mocked NamespacedDockerCredentialController +// mockedNamespacedDockerCredentialController := &NamespacedDockerCredentialControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.NamespacedDockerCredentialHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.NamespacedDockerCredentialHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.NamespacedDockerCredentialLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedNamespacedDockerCredentialController in code that requires NamespacedDockerCredentialController +// // and then make assertions. +// +// } +type NamespacedDockerCredentialControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.NamespacedDockerCredentialHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.NamespacedDockerCredentialHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.NamespacedDockerCredentialLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.NamespacedDockerCredentialHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.NamespacedDockerCredentialHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *NamespacedDockerCredentialControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.NamespacedDockerCredentialHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("NamespacedDockerCredentialControllerMock.AddClusterScopedHandlerFunc: method is nil but NamespacedDockerCredentialController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.NamespacedDockerCredentialHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockNamespacedDockerCredentialControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockNamespacedDockerCredentialControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedNamespacedDockerCredentialController.AddClusterScopedHandlerCalls()) +func (mock *NamespacedDockerCredentialControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.NamespacedDockerCredentialHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.NamespacedDockerCredentialHandlerFunc + } + lockNamespacedDockerCredentialControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockNamespacedDockerCredentialControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *NamespacedDockerCredentialControllerMock) AddHandler(ctx context.Context, name string, handler v3.NamespacedDockerCredentialHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("NamespacedDockerCredentialControllerMock.AddHandlerFunc: method is nil but NamespacedDockerCredentialController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.NamespacedDockerCredentialHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockNamespacedDockerCredentialControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockNamespacedDockerCredentialControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedNamespacedDockerCredentialController.AddHandlerCalls()) +func (mock *NamespacedDockerCredentialControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.NamespacedDockerCredentialHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.NamespacedDockerCredentialHandlerFunc + } + lockNamespacedDockerCredentialControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockNamespacedDockerCredentialControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *NamespacedDockerCredentialControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("NamespacedDockerCredentialControllerMock.EnqueueFunc: method is nil but NamespacedDockerCredentialController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockNamespacedDockerCredentialControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockNamespacedDockerCredentialControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedNamespacedDockerCredentialController.EnqueueCalls()) +func (mock *NamespacedDockerCredentialControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockNamespacedDockerCredentialControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockNamespacedDockerCredentialControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *NamespacedDockerCredentialControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("NamespacedDockerCredentialControllerMock.GenericFunc: method is nil but NamespacedDockerCredentialController.Generic was just called") + } + callInfo := struct { + }{} + lockNamespacedDockerCredentialControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockNamespacedDockerCredentialControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedNamespacedDockerCredentialController.GenericCalls()) +func (mock *NamespacedDockerCredentialControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockNamespacedDockerCredentialControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockNamespacedDockerCredentialControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *NamespacedDockerCredentialControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("NamespacedDockerCredentialControllerMock.InformerFunc: method is nil but NamespacedDockerCredentialController.Informer was just called") + } + callInfo := struct { + }{} + lockNamespacedDockerCredentialControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockNamespacedDockerCredentialControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedNamespacedDockerCredentialController.InformerCalls()) +func (mock *NamespacedDockerCredentialControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockNamespacedDockerCredentialControllerMockInformer.RLock() + calls = mock.calls.Informer + lockNamespacedDockerCredentialControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *NamespacedDockerCredentialControllerMock) Lister() v3.NamespacedDockerCredentialLister { + if mock.ListerFunc == nil { + panic("NamespacedDockerCredentialControllerMock.ListerFunc: method is nil but NamespacedDockerCredentialController.Lister was just called") + } + callInfo := struct { + }{} + lockNamespacedDockerCredentialControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockNamespacedDockerCredentialControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedNamespacedDockerCredentialController.ListerCalls()) +func (mock *NamespacedDockerCredentialControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockNamespacedDockerCredentialControllerMockLister.RLock() + calls = mock.calls.Lister + lockNamespacedDockerCredentialControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *NamespacedDockerCredentialControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("NamespacedDockerCredentialControllerMock.StartFunc: method is nil but NamespacedDockerCredentialController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockNamespacedDockerCredentialControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockNamespacedDockerCredentialControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedNamespacedDockerCredentialController.StartCalls()) +func (mock *NamespacedDockerCredentialControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockNamespacedDockerCredentialControllerMockStart.RLock() + calls = mock.calls.Start + lockNamespacedDockerCredentialControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *NamespacedDockerCredentialControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("NamespacedDockerCredentialControllerMock.SyncFunc: method is nil but NamespacedDockerCredentialController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockNamespacedDockerCredentialControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockNamespacedDockerCredentialControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedNamespacedDockerCredentialController.SyncCalls()) +func (mock *NamespacedDockerCredentialControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockNamespacedDockerCredentialControllerMockSync.RLock() + calls = mock.calls.Sync + lockNamespacedDockerCredentialControllerMockSync.RUnlock() + return calls +} + +var ( + lockNamespacedDockerCredentialInterfaceMockAddClusterScopedHandler sync.RWMutex + lockNamespacedDockerCredentialInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockNamespacedDockerCredentialInterfaceMockAddHandler sync.RWMutex + lockNamespacedDockerCredentialInterfaceMockAddLifecycle sync.RWMutex + lockNamespacedDockerCredentialInterfaceMockController sync.RWMutex + lockNamespacedDockerCredentialInterfaceMockCreate sync.RWMutex + lockNamespacedDockerCredentialInterfaceMockDelete sync.RWMutex + lockNamespacedDockerCredentialInterfaceMockDeleteCollection sync.RWMutex + lockNamespacedDockerCredentialInterfaceMockDeleteNamespaced sync.RWMutex + lockNamespacedDockerCredentialInterfaceMockGet sync.RWMutex + lockNamespacedDockerCredentialInterfaceMockGetNamespaced sync.RWMutex + lockNamespacedDockerCredentialInterfaceMockList sync.RWMutex + lockNamespacedDockerCredentialInterfaceMockObjectClient sync.RWMutex + lockNamespacedDockerCredentialInterfaceMockUpdate sync.RWMutex + lockNamespacedDockerCredentialInterfaceMockWatch sync.RWMutex +) + +// Ensure, that NamespacedDockerCredentialInterfaceMock does implement NamespacedDockerCredentialInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.NamespacedDockerCredentialInterface = &NamespacedDockerCredentialInterfaceMock{} + +// NamespacedDockerCredentialInterfaceMock is a mock implementation of NamespacedDockerCredentialInterface. +// +// func TestSomethingThatUsesNamespacedDockerCredentialInterface(t *testing.T) { +// +// // make and configure a mocked NamespacedDockerCredentialInterface +// mockedNamespacedDockerCredentialInterface := &NamespacedDockerCredentialInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.NamespacedDockerCredentialHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.NamespacedDockerCredentialLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.NamespacedDockerCredentialHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.NamespacedDockerCredentialLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.NamespacedDockerCredentialController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.NamespacedDockerCredential) (*v3.NamespacedDockerCredential, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.NamespacedDockerCredential, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.NamespacedDockerCredential, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.NamespacedDockerCredentialList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.NamespacedDockerCredential) (*v3.NamespacedDockerCredential, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedNamespacedDockerCredentialInterface in code that requires NamespacedDockerCredentialInterface +// // and then make assertions. +// +// } +type NamespacedDockerCredentialInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.NamespacedDockerCredentialHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.NamespacedDockerCredentialLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.NamespacedDockerCredentialHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.NamespacedDockerCredentialLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.NamespacedDockerCredentialController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.NamespacedDockerCredential) (*v3.NamespacedDockerCredential, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.NamespacedDockerCredential, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.NamespacedDockerCredential, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.NamespacedDockerCredentialList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.NamespacedDockerCredential) (*v3.NamespacedDockerCredential, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.NamespacedDockerCredentialHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.NamespacedDockerCredentialLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.NamespacedDockerCredentialHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.NamespacedDockerCredentialLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.NamespacedDockerCredential + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.NamespacedDockerCredential + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *NamespacedDockerCredentialInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.NamespacedDockerCredentialHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("NamespacedDockerCredentialInterfaceMock.AddClusterScopedHandlerFunc: method is nil but NamespacedDockerCredentialInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.NamespacedDockerCredentialHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockNamespacedDockerCredentialInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockNamespacedDockerCredentialInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedNamespacedDockerCredentialInterface.AddClusterScopedHandlerCalls()) +func (mock *NamespacedDockerCredentialInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.NamespacedDockerCredentialHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.NamespacedDockerCredentialHandlerFunc + } + lockNamespacedDockerCredentialInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockNamespacedDockerCredentialInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *NamespacedDockerCredentialInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.NamespacedDockerCredentialLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("NamespacedDockerCredentialInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but NamespacedDockerCredentialInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.NamespacedDockerCredentialLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockNamespacedDockerCredentialInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockNamespacedDockerCredentialInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedNamespacedDockerCredentialInterface.AddClusterScopedLifecycleCalls()) +func (mock *NamespacedDockerCredentialInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.NamespacedDockerCredentialLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.NamespacedDockerCredentialLifecycle + } + lockNamespacedDockerCredentialInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockNamespacedDockerCredentialInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *NamespacedDockerCredentialInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.NamespacedDockerCredentialHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("NamespacedDockerCredentialInterfaceMock.AddHandlerFunc: method is nil but NamespacedDockerCredentialInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.NamespacedDockerCredentialHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockNamespacedDockerCredentialInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockNamespacedDockerCredentialInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedNamespacedDockerCredentialInterface.AddHandlerCalls()) +func (mock *NamespacedDockerCredentialInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.NamespacedDockerCredentialHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.NamespacedDockerCredentialHandlerFunc + } + lockNamespacedDockerCredentialInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockNamespacedDockerCredentialInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *NamespacedDockerCredentialInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.NamespacedDockerCredentialLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("NamespacedDockerCredentialInterfaceMock.AddLifecycleFunc: method is nil but NamespacedDockerCredentialInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.NamespacedDockerCredentialLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockNamespacedDockerCredentialInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockNamespacedDockerCredentialInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedNamespacedDockerCredentialInterface.AddLifecycleCalls()) +func (mock *NamespacedDockerCredentialInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.NamespacedDockerCredentialLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.NamespacedDockerCredentialLifecycle + } + lockNamespacedDockerCredentialInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockNamespacedDockerCredentialInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *NamespacedDockerCredentialInterfaceMock) Controller() v3.NamespacedDockerCredentialController { + if mock.ControllerFunc == nil { + panic("NamespacedDockerCredentialInterfaceMock.ControllerFunc: method is nil but NamespacedDockerCredentialInterface.Controller was just called") + } + callInfo := struct { + }{} + lockNamespacedDockerCredentialInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockNamespacedDockerCredentialInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedNamespacedDockerCredentialInterface.ControllerCalls()) +func (mock *NamespacedDockerCredentialInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockNamespacedDockerCredentialInterfaceMockController.RLock() + calls = mock.calls.Controller + lockNamespacedDockerCredentialInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *NamespacedDockerCredentialInterfaceMock) Create(in1 *v3.NamespacedDockerCredential) (*v3.NamespacedDockerCredential, error) { + if mock.CreateFunc == nil { + panic("NamespacedDockerCredentialInterfaceMock.CreateFunc: method is nil but NamespacedDockerCredentialInterface.Create was just called") + } + callInfo := struct { + In1 *v3.NamespacedDockerCredential + }{ + In1: in1, + } + lockNamespacedDockerCredentialInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockNamespacedDockerCredentialInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedNamespacedDockerCredentialInterface.CreateCalls()) +func (mock *NamespacedDockerCredentialInterfaceMock) CreateCalls() []struct { + In1 *v3.NamespacedDockerCredential +} { + var calls []struct { + In1 *v3.NamespacedDockerCredential + } + lockNamespacedDockerCredentialInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockNamespacedDockerCredentialInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *NamespacedDockerCredentialInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("NamespacedDockerCredentialInterfaceMock.DeleteFunc: method is nil but NamespacedDockerCredentialInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockNamespacedDockerCredentialInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockNamespacedDockerCredentialInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedNamespacedDockerCredentialInterface.DeleteCalls()) +func (mock *NamespacedDockerCredentialInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockNamespacedDockerCredentialInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockNamespacedDockerCredentialInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *NamespacedDockerCredentialInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("NamespacedDockerCredentialInterfaceMock.DeleteCollectionFunc: method is nil but NamespacedDockerCredentialInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockNamespacedDockerCredentialInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockNamespacedDockerCredentialInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedNamespacedDockerCredentialInterface.DeleteCollectionCalls()) +func (mock *NamespacedDockerCredentialInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockNamespacedDockerCredentialInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockNamespacedDockerCredentialInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *NamespacedDockerCredentialInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("NamespacedDockerCredentialInterfaceMock.DeleteNamespacedFunc: method is nil but NamespacedDockerCredentialInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockNamespacedDockerCredentialInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockNamespacedDockerCredentialInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedNamespacedDockerCredentialInterface.DeleteNamespacedCalls()) +func (mock *NamespacedDockerCredentialInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockNamespacedDockerCredentialInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockNamespacedDockerCredentialInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *NamespacedDockerCredentialInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.NamespacedDockerCredential, error) { + if mock.GetFunc == nil { + panic("NamespacedDockerCredentialInterfaceMock.GetFunc: method is nil but NamespacedDockerCredentialInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockNamespacedDockerCredentialInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockNamespacedDockerCredentialInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedNamespacedDockerCredentialInterface.GetCalls()) +func (mock *NamespacedDockerCredentialInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockNamespacedDockerCredentialInterfaceMockGet.RLock() + calls = mock.calls.Get + lockNamespacedDockerCredentialInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *NamespacedDockerCredentialInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.NamespacedDockerCredential, error) { + if mock.GetNamespacedFunc == nil { + panic("NamespacedDockerCredentialInterfaceMock.GetNamespacedFunc: method is nil but NamespacedDockerCredentialInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockNamespacedDockerCredentialInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockNamespacedDockerCredentialInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedNamespacedDockerCredentialInterface.GetNamespacedCalls()) +func (mock *NamespacedDockerCredentialInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockNamespacedDockerCredentialInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockNamespacedDockerCredentialInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *NamespacedDockerCredentialInterfaceMock) List(opts v1.ListOptions) (*v3.NamespacedDockerCredentialList, error) { + if mock.ListFunc == nil { + panic("NamespacedDockerCredentialInterfaceMock.ListFunc: method is nil but NamespacedDockerCredentialInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockNamespacedDockerCredentialInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockNamespacedDockerCredentialInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedNamespacedDockerCredentialInterface.ListCalls()) +func (mock *NamespacedDockerCredentialInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockNamespacedDockerCredentialInterfaceMockList.RLock() + calls = mock.calls.List + lockNamespacedDockerCredentialInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *NamespacedDockerCredentialInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("NamespacedDockerCredentialInterfaceMock.ObjectClientFunc: method is nil but NamespacedDockerCredentialInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockNamespacedDockerCredentialInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockNamespacedDockerCredentialInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedNamespacedDockerCredentialInterface.ObjectClientCalls()) +func (mock *NamespacedDockerCredentialInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockNamespacedDockerCredentialInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockNamespacedDockerCredentialInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *NamespacedDockerCredentialInterfaceMock) Update(in1 *v3.NamespacedDockerCredential) (*v3.NamespacedDockerCredential, error) { + if mock.UpdateFunc == nil { + panic("NamespacedDockerCredentialInterfaceMock.UpdateFunc: method is nil but NamespacedDockerCredentialInterface.Update was just called") + } + callInfo := struct { + In1 *v3.NamespacedDockerCredential + }{ + In1: in1, + } + lockNamespacedDockerCredentialInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockNamespacedDockerCredentialInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedNamespacedDockerCredentialInterface.UpdateCalls()) +func (mock *NamespacedDockerCredentialInterfaceMock) UpdateCalls() []struct { + In1 *v3.NamespacedDockerCredential +} { + var calls []struct { + In1 *v3.NamespacedDockerCredential + } + lockNamespacedDockerCredentialInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockNamespacedDockerCredentialInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *NamespacedDockerCredentialInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("NamespacedDockerCredentialInterfaceMock.WatchFunc: method is nil but NamespacedDockerCredentialInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockNamespacedDockerCredentialInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockNamespacedDockerCredentialInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedNamespacedDockerCredentialInterface.WatchCalls()) +func (mock *NamespacedDockerCredentialInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockNamespacedDockerCredentialInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockNamespacedDockerCredentialInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockNamespacedDockerCredentialsGetterMockNamespacedDockerCredentials sync.RWMutex +) + +// Ensure, that NamespacedDockerCredentialsGetterMock does implement NamespacedDockerCredentialsGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.NamespacedDockerCredentialsGetter = &NamespacedDockerCredentialsGetterMock{} + +// NamespacedDockerCredentialsGetterMock is a mock implementation of NamespacedDockerCredentialsGetter. +// +// func TestSomethingThatUsesNamespacedDockerCredentialsGetter(t *testing.T) { +// +// // make and configure a mocked NamespacedDockerCredentialsGetter +// mockedNamespacedDockerCredentialsGetter := &NamespacedDockerCredentialsGetterMock{ +// NamespacedDockerCredentialsFunc: func(namespace string) v3.NamespacedDockerCredentialInterface { +// panic("mock out the NamespacedDockerCredentials method") +// }, +// } +// +// // use mockedNamespacedDockerCredentialsGetter in code that requires NamespacedDockerCredentialsGetter +// // and then make assertions. +// +// } +type NamespacedDockerCredentialsGetterMock struct { + // NamespacedDockerCredentialsFunc mocks the NamespacedDockerCredentials method. + NamespacedDockerCredentialsFunc func(namespace string) v3.NamespacedDockerCredentialInterface + + // calls tracks calls to the methods. + calls struct { + // NamespacedDockerCredentials holds details about calls to the NamespacedDockerCredentials method. + NamespacedDockerCredentials []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// NamespacedDockerCredentials calls NamespacedDockerCredentialsFunc. +func (mock *NamespacedDockerCredentialsGetterMock) NamespacedDockerCredentials(namespace string) v3.NamespacedDockerCredentialInterface { + if mock.NamespacedDockerCredentialsFunc == nil { + panic("NamespacedDockerCredentialsGetterMock.NamespacedDockerCredentialsFunc: method is nil but NamespacedDockerCredentialsGetter.NamespacedDockerCredentials was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockNamespacedDockerCredentialsGetterMockNamespacedDockerCredentials.Lock() + mock.calls.NamespacedDockerCredentials = append(mock.calls.NamespacedDockerCredentials, callInfo) + lockNamespacedDockerCredentialsGetterMockNamespacedDockerCredentials.Unlock() + return mock.NamespacedDockerCredentialsFunc(namespace) +} + +// NamespacedDockerCredentialsCalls gets all the calls that were made to NamespacedDockerCredentials. +// Check the length with: +// len(mockedNamespacedDockerCredentialsGetter.NamespacedDockerCredentialsCalls()) +func (mock *NamespacedDockerCredentialsGetterMock) NamespacedDockerCredentialsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockNamespacedDockerCredentialsGetterMockNamespacedDockerCredentials.RLock() + calls = mock.calls.NamespacedDockerCredentials + lockNamespacedDockerCredentialsGetterMockNamespacedDockerCredentials.RUnlock() + return calls +} diff --git a/apis/project.cattle.io/v3/fakes/zz_generated_namespaced_service_account_token_mock_test.go b/apis/project.cattle.io/v3/fakes/zz_generated_namespaced_service_account_token_mock_test.go new file mode 100644 index 00000000..27c660ba --- /dev/null +++ b/apis/project.cattle.io/v3/fakes/zz_generated_namespaced_service_account_token_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/project.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockNamespacedServiceAccountTokenListerMockGet sync.RWMutex + lockNamespacedServiceAccountTokenListerMockList sync.RWMutex +) + +// Ensure, that NamespacedServiceAccountTokenListerMock does implement NamespacedServiceAccountTokenLister. +// If this is not the case, regenerate this file with moq. +var _ v3.NamespacedServiceAccountTokenLister = &NamespacedServiceAccountTokenListerMock{} + +// NamespacedServiceAccountTokenListerMock is a mock implementation of NamespacedServiceAccountTokenLister. +// +// func TestSomethingThatUsesNamespacedServiceAccountTokenLister(t *testing.T) { +// +// // make and configure a mocked NamespacedServiceAccountTokenLister +// mockedNamespacedServiceAccountTokenLister := &NamespacedServiceAccountTokenListerMock{ +// GetFunc: func(namespace string, name string) (*v3.NamespacedServiceAccountToken, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.NamespacedServiceAccountToken, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedNamespacedServiceAccountTokenLister in code that requires NamespacedServiceAccountTokenLister +// // and then make assertions. +// +// } +type NamespacedServiceAccountTokenListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.NamespacedServiceAccountToken, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.NamespacedServiceAccountToken, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *NamespacedServiceAccountTokenListerMock) Get(namespace string, name string) (*v3.NamespacedServiceAccountToken, error) { + if mock.GetFunc == nil { + panic("NamespacedServiceAccountTokenListerMock.GetFunc: method is nil but NamespacedServiceAccountTokenLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockNamespacedServiceAccountTokenListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockNamespacedServiceAccountTokenListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedNamespacedServiceAccountTokenLister.GetCalls()) +func (mock *NamespacedServiceAccountTokenListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockNamespacedServiceAccountTokenListerMockGet.RLock() + calls = mock.calls.Get + lockNamespacedServiceAccountTokenListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *NamespacedServiceAccountTokenListerMock) List(namespace string, selector labels.Selector) ([]*v3.NamespacedServiceAccountToken, error) { + if mock.ListFunc == nil { + panic("NamespacedServiceAccountTokenListerMock.ListFunc: method is nil but NamespacedServiceAccountTokenLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockNamespacedServiceAccountTokenListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockNamespacedServiceAccountTokenListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedNamespacedServiceAccountTokenLister.ListCalls()) +func (mock *NamespacedServiceAccountTokenListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockNamespacedServiceAccountTokenListerMockList.RLock() + calls = mock.calls.List + lockNamespacedServiceAccountTokenListerMockList.RUnlock() + return calls +} + +var ( + lockNamespacedServiceAccountTokenControllerMockAddClusterScopedHandler sync.RWMutex + lockNamespacedServiceAccountTokenControllerMockAddHandler sync.RWMutex + lockNamespacedServiceAccountTokenControllerMockEnqueue sync.RWMutex + lockNamespacedServiceAccountTokenControllerMockGeneric sync.RWMutex + lockNamespacedServiceAccountTokenControllerMockInformer sync.RWMutex + lockNamespacedServiceAccountTokenControllerMockLister sync.RWMutex + lockNamespacedServiceAccountTokenControllerMockStart sync.RWMutex + lockNamespacedServiceAccountTokenControllerMockSync sync.RWMutex +) + +// Ensure, that NamespacedServiceAccountTokenControllerMock does implement NamespacedServiceAccountTokenController. +// If this is not the case, regenerate this file with moq. +var _ v3.NamespacedServiceAccountTokenController = &NamespacedServiceAccountTokenControllerMock{} + +// NamespacedServiceAccountTokenControllerMock is a mock implementation of NamespacedServiceAccountTokenController. +// +// func TestSomethingThatUsesNamespacedServiceAccountTokenController(t *testing.T) { +// +// // make and configure a mocked NamespacedServiceAccountTokenController +// mockedNamespacedServiceAccountTokenController := &NamespacedServiceAccountTokenControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.NamespacedServiceAccountTokenHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.NamespacedServiceAccountTokenHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.NamespacedServiceAccountTokenLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedNamespacedServiceAccountTokenController in code that requires NamespacedServiceAccountTokenController +// // and then make assertions. +// +// } +type NamespacedServiceAccountTokenControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.NamespacedServiceAccountTokenHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.NamespacedServiceAccountTokenHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.NamespacedServiceAccountTokenLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.NamespacedServiceAccountTokenHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.NamespacedServiceAccountTokenHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *NamespacedServiceAccountTokenControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.NamespacedServiceAccountTokenHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("NamespacedServiceAccountTokenControllerMock.AddClusterScopedHandlerFunc: method is nil but NamespacedServiceAccountTokenController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.NamespacedServiceAccountTokenHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockNamespacedServiceAccountTokenControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockNamespacedServiceAccountTokenControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedNamespacedServiceAccountTokenController.AddClusterScopedHandlerCalls()) +func (mock *NamespacedServiceAccountTokenControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.NamespacedServiceAccountTokenHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.NamespacedServiceAccountTokenHandlerFunc + } + lockNamespacedServiceAccountTokenControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockNamespacedServiceAccountTokenControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *NamespacedServiceAccountTokenControllerMock) AddHandler(ctx context.Context, name string, handler v3.NamespacedServiceAccountTokenHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("NamespacedServiceAccountTokenControllerMock.AddHandlerFunc: method is nil but NamespacedServiceAccountTokenController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.NamespacedServiceAccountTokenHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockNamespacedServiceAccountTokenControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockNamespacedServiceAccountTokenControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedNamespacedServiceAccountTokenController.AddHandlerCalls()) +func (mock *NamespacedServiceAccountTokenControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.NamespacedServiceAccountTokenHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.NamespacedServiceAccountTokenHandlerFunc + } + lockNamespacedServiceAccountTokenControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockNamespacedServiceAccountTokenControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *NamespacedServiceAccountTokenControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("NamespacedServiceAccountTokenControllerMock.EnqueueFunc: method is nil but NamespacedServiceAccountTokenController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockNamespacedServiceAccountTokenControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockNamespacedServiceAccountTokenControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedNamespacedServiceAccountTokenController.EnqueueCalls()) +func (mock *NamespacedServiceAccountTokenControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockNamespacedServiceAccountTokenControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockNamespacedServiceAccountTokenControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *NamespacedServiceAccountTokenControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("NamespacedServiceAccountTokenControllerMock.GenericFunc: method is nil but NamespacedServiceAccountTokenController.Generic was just called") + } + callInfo := struct { + }{} + lockNamespacedServiceAccountTokenControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockNamespacedServiceAccountTokenControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedNamespacedServiceAccountTokenController.GenericCalls()) +func (mock *NamespacedServiceAccountTokenControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockNamespacedServiceAccountTokenControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockNamespacedServiceAccountTokenControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *NamespacedServiceAccountTokenControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("NamespacedServiceAccountTokenControllerMock.InformerFunc: method is nil but NamespacedServiceAccountTokenController.Informer was just called") + } + callInfo := struct { + }{} + lockNamespacedServiceAccountTokenControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockNamespacedServiceAccountTokenControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedNamespacedServiceAccountTokenController.InformerCalls()) +func (mock *NamespacedServiceAccountTokenControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockNamespacedServiceAccountTokenControllerMockInformer.RLock() + calls = mock.calls.Informer + lockNamespacedServiceAccountTokenControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *NamespacedServiceAccountTokenControllerMock) Lister() v3.NamespacedServiceAccountTokenLister { + if mock.ListerFunc == nil { + panic("NamespacedServiceAccountTokenControllerMock.ListerFunc: method is nil but NamespacedServiceAccountTokenController.Lister was just called") + } + callInfo := struct { + }{} + lockNamespacedServiceAccountTokenControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockNamespacedServiceAccountTokenControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedNamespacedServiceAccountTokenController.ListerCalls()) +func (mock *NamespacedServiceAccountTokenControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockNamespacedServiceAccountTokenControllerMockLister.RLock() + calls = mock.calls.Lister + lockNamespacedServiceAccountTokenControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *NamespacedServiceAccountTokenControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("NamespacedServiceAccountTokenControllerMock.StartFunc: method is nil but NamespacedServiceAccountTokenController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockNamespacedServiceAccountTokenControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockNamespacedServiceAccountTokenControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedNamespacedServiceAccountTokenController.StartCalls()) +func (mock *NamespacedServiceAccountTokenControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockNamespacedServiceAccountTokenControllerMockStart.RLock() + calls = mock.calls.Start + lockNamespacedServiceAccountTokenControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *NamespacedServiceAccountTokenControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("NamespacedServiceAccountTokenControllerMock.SyncFunc: method is nil but NamespacedServiceAccountTokenController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockNamespacedServiceAccountTokenControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockNamespacedServiceAccountTokenControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedNamespacedServiceAccountTokenController.SyncCalls()) +func (mock *NamespacedServiceAccountTokenControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockNamespacedServiceAccountTokenControllerMockSync.RLock() + calls = mock.calls.Sync + lockNamespacedServiceAccountTokenControllerMockSync.RUnlock() + return calls +} + +var ( + lockNamespacedServiceAccountTokenInterfaceMockAddClusterScopedHandler sync.RWMutex + lockNamespacedServiceAccountTokenInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockNamespacedServiceAccountTokenInterfaceMockAddHandler sync.RWMutex + lockNamespacedServiceAccountTokenInterfaceMockAddLifecycle sync.RWMutex + lockNamespacedServiceAccountTokenInterfaceMockController sync.RWMutex + lockNamespacedServiceAccountTokenInterfaceMockCreate sync.RWMutex + lockNamespacedServiceAccountTokenInterfaceMockDelete sync.RWMutex + lockNamespacedServiceAccountTokenInterfaceMockDeleteCollection sync.RWMutex + lockNamespacedServiceAccountTokenInterfaceMockDeleteNamespaced sync.RWMutex + lockNamespacedServiceAccountTokenInterfaceMockGet sync.RWMutex + lockNamespacedServiceAccountTokenInterfaceMockGetNamespaced sync.RWMutex + lockNamespacedServiceAccountTokenInterfaceMockList sync.RWMutex + lockNamespacedServiceAccountTokenInterfaceMockObjectClient sync.RWMutex + lockNamespacedServiceAccountTokenInterfaceMockUpdate sync.RWMutex + lockNamespacedServiceAccountTokenInterfaceMockWatch sync.RWMutex +) + +// Ensure, that NamespacedServiceAccountTokenInterfaceMock does implement NamespacedServiceAccountTokenInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.NamespacedServiceAccountTokenInterface = &NamespacedServiceAccountTokenInterfaceMock{} + +// NamespacedServiceAccountTokenInterfaceMock is a mock implementation of NamespacedServiceAccountTokenInterface. +// +// func TestSomethingThatUsesNamespacedServiceAccountTokenInterface(t *testing.T) { +// +// // make and configure a mocked NamespacedServiceAccountTokenInterface +// mockedNamespacedServiceAccountTokenInterface := &NamespacedServiceAccountTokenInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.NamespacedServiceAccountTokenHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.NamespacedServiceAccountTokenLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.NamespacedServiceAccountTokenHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.NamespacedServiceAccountTokenLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.NamespacedServiceAccountTokenController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.NamespacedServiceAccountToken) (*v3.NamespacedServiceAccountToken, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.NamespacedServiceAccountToken, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.NamespacedServiceAccountToken, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.NamespacedServiceAccountTokenList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.NamespacedServiceAccountToken) (*v3.NamespacedServiceAccountToken, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedNamespacedServiceAccountTokenInterface in code that requires NamespacedServiceAccountTokenInterface +// // and then make assertions. +// +// } +type NamespacedServiceAccountTokenInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.NamespacedServiceAccountTokenHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.NamespacedServiceAccountTokenLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.NamespacedServiceAccountTokenHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.NamespacedServiceAccountTokenLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.NamespacedServiceAccountTokenController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.NamespacedServiceAccountToken) (*v3.NamespacedServiceAccountToken, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.NamespacedServiceAccountToken, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.NamespacedServiceAccountToken, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.NamespacedServiceAccountTokenList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.NamespacedServiceAccountToken) (*v3.NamespacedServiceAccountToken, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.NamespacedServiceAccountTokenHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.NamespacedServiceAccountTokenLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.NamespacedServiceAccountTokenHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.NamespacedServiceAccountTokenLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.NamespacedServiceAccountToken + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.NamespacedServiceAccountToken + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *NamespacedServiceAccountTokenInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.NamespacedServiceAccountTokenHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("NamespacedServiceAccountTokenInterfaceMock.AddClusterScopedHandlerFunc: method is nil but NamespacedServiceAccountTokenInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.NamespacedServiceAccountTokenHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockNamespacedServiceAccountTokenInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockNamespacedServiceAccountTokenInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedNamespacedServiceAccountTokenInterface.AddClusterScopedHandlerCalls()) +func (mock *NamespacedServiceAccountTokenInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.NamespacedServiceAccountTokenHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.NamespacedServiceAccountTokenHandlerFunc + } + lockNamespacedServiceAccountTokenInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockNamespacedServiceAccountTokenInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *NamespacedServiceAccountTokenInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.NamespacedServiceAccountTokenLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("NamespacedServiceAccountTokenInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but NamespacedServiceAccountTokenInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.NamespacedServiceAccountTokenLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockNamespacedServiceAccountTokenInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockNamespacedServiceAccountTokenInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedNamespacedServiceAccountTokenInterface.AddClusterScopedLifecycleCalls()) +func (mock *NamespacedServiceAccountTokenInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.NamespacedServiceAccountTokenLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.NamespacedServiceAccountTokenLifecycle + } + lockNamespacedServiceAccountTokenInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockNamespacedServiceAccountTokenInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *NamespacedServiceAccountTokenInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.NamespacedServiceAccountTokenHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("NamespacedServiceAccountTokenInterfaceMock.AddHandlerFunc: method is nil but NamespacedServiceAccountTokenInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.NamespacedServiceAccountTokenHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockNamespacedServiceAccountTokenInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockNamespacedServiceAccountTokenInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedNamespacedServiceAccountTokenInterface.AddHandlerCalls()) +func (mock *NamespacedServiceAccountTokenInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.NamespacedServiceAccountTokenHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.NamespacedServiceAccountTokenHandlerFunc + } + lockNamespacedServiceAccountTokenInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockNamespacedServiceAccountTokenInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *NamespacedServiceAccountTokenInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.NamespacedServiceAccountTokenLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("NamespacedServiceAccountTokenInterfaceMock.AddLifecycleFunc: method is nil but NamespacedServiceAccountTokenInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.NamespacedServiceAccountTokenLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockNamespacedServiceAccountTokenInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockNamespacedServiceAccountTokenInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedNamespacedServiceAccountTokenInterface.AddLifecycleCalls()) +func (mock *NamespacedServiceAccountTokenInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.NamespacedServiceAccountTokenLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.NamespacedServiceAccountTokenLifecycle + } + lockNamespacedServiceAccountTokenInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockNamespacedServiceAccountTokenInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *NamespacedServiceAccountTokenInterfaceMock) Controller() v3.NamespacedServiceAccountTokenController { + if mock.ControllerFunc == nil { + panic("NamespacedServiceAccountTokenInterfaceMock.ControllerFunc: method is nil but NamespacedServiceAccountTokenInterface.Controller was just called") + } + callInfo := struct { + }{} + lockNamespacedServiceAccountTokenInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockNamespacedServiceAccountTokenInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedNamespacedServiceAccountTokenInterface.ControllerCalls()) +func (mock *NamespacedServiceAccountTokenInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockNamespacedServiceAccountTokenInterfaceMockController.RLock() + calls = mock.calls.Controller + lockNamespacedServiceAccountTokenInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *NamespacedServiceAccountTokenInterfaceMock) Create(in1 *v3.NamespacedServiceAccountToken) (*v3.NamespacedServiceAccountToken, error) { + if mock.CreateFunc == nil { + panic("NamespacedServiceAccountTokenInterfaceMock.CreateFunc: method is nil but NamespacedServiceAccountTokenInterface.Create was just called") + } + callInfo := struct { + In1 *v3.NamespacedServiceAccountToken + }{ + In1: in1, + } + lockNamespacedServiceAccountTokenInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockNamespacedServiceAccountTokenInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedNamespacedServiceAccountTokenInterface.CreateCalls()) +func (mock *NamespacedServiceAccountTokenInterfaceMock) CreateCalls() []struct { + In1 *v3.NamespacedServiceAccountToken +} { + var calls []struct { + In1 *v3.NamespacedServiceAccountToken + } + lockNamespacedServiceAccountTokenInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockNamespacedServiceAccountTokenInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *NamespacedServiceAccountTokenInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("NamespacedServiceAccountTokenInterfaceMock.DeleteFunc: method is nil but NamespacedServiceAccountTokenInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockNamespacedServiceAccountTokenInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockNamespacedServiceAccountTokenInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedNamespacedServiceAccountTokenInterface.DeleteCalls()) +func (mock *NamespacedServiceAccountTokenInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockNamespacedServiceAccountTokenInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockNamespacedServiceAccountTokenInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *NamespacedServiceAccountTokenInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("NamespacedServiceAccountTokenInterfaceMock.DeleteCollectionFunc: method is nil but NamespacedServiceAccountTokenInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockNamespacedServiceAccountTokenInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockNamespacedServiceAccountTokenInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedNamespacedServiceAccountTokenInterface.DeleteCollectionCalls()) +func (mock *NamespacedServiceAccountTokenInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockNamespacedServiceAccountTokenInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockNamespacedServiceAccountTokenInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *NamespacedServiceAccountTokenInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("NamespacedServiceAccountTokenInterfaceMock.DeleteNamespacedFunc: method is nil but NamespacedServiceAccountTokenInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockNamespacedServiceAccountTokenInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockNamespacedServiceAccountTokenInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedNamespacedServiceAccountTokenInterface.DeleteNamespacedCalls()) +func (mock *NamespacedServiceAccountTokenInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockNamespacedServiceAccountTokenInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockNamespacedServiceAccountTokenInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *NamespacedServiceAccountTokenInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.NamespacedServiceAccountToken, error) { + if mock.GetFunc == nil { + panic("NamespacedServiceAccountTokenInterfaceMock.GetFunc: method is nil but NamespacedServiceAccountTokenInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockNamespacedServiceAccountTokenInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockNamespacedServiceAccountTokenInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedNamespacedServiceAccountTokenInterface.GetCalls()) +func (mock *NamespacedServiceAccountTokenInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockNamespacedServiceAccountTokenInterfaceMockGet.RLock() + calls = mock.calls.Get + lockNamespacedServiceAccountTokenInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *NamespacedServiceAccountTokenInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.NamespacedServiceAccountToken, error) { + if mock.GetNamespacedFunc == nil { + panic("NamespacedServiceAccountTokenInterfaceMock.GetNamespacedFunc: method is nil but NamespacedServiceAccountTokenInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockNamespacedServiceAccountTokenInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockNamespacedServiceAccountTokenInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedNamespacedServiceAccountTokenInterface.GetNamespacedCalls()) +func (mock *NamespacedServiceAccountTokenInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockNamespacedServiceAccountTokenInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockNamespacedServiceAccountTokenInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *NamespacedServiceAccountTokenInterfaceMock) List(opts v1.ListOptions) (*v3.NamespacedServiceAccountTokenList, error) { + if mock.ListFunc == nil { + panic("NamespacedServiceAccountTokenInterfaceMock.ListFunc: method is nil but NamespacedServiceAccountTokenInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockNamespacedServiceAccountTokenInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockNamespacedServiceAccountTokenInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedNamespacedServiceAccountTokenInterface.ListCalls()) +func (mock *NamespacedServiceAccountTokenInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockNamespacedServiceAccountTokenInterfaceMockList.RLock() + calls = mock.calls.List + lockNamespacedServiceAccountTokenInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *NamespacedServiceAccountTokenInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("NamespacedServiceAccountTokenInterfaceMock.ObjectClientFunc: method is nil but NamespacedServiceAccountTokenInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockNamespacedServiceAccountTokenInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockNamespacedServiceAccountTokenInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedNamespacedServiceAccountTokenInterface.ObjectClientCalls()) +func (mock *NamespacedServiceAccountTokenInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockNamespacedServiceAccountTokenInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockNamespacedServiceAccountTokenInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *NamespacedServiceAccountTokenInterfaceMock) Update(in1 *v3.NamespacedServiceAccountToken) (*v3.NamespacedServiceAccountToken, error) { + if mock.UpdateFunc == nil { + panic("NamespacedServiceAccountTokenInterfaceMock.UpdateFunc: method is nil but NamespacedServiceAccountTokenInterface.Update was just called") + } + callInfo := struct { + In1 *v3.NamespacedServiceAccountToken + }{ + In1: in1, + } + lockNamespacedServiceAccountTokenInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockNamespacedServiceAccountTokenInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedNamespacedServiceAccountTokenInterface.UpdateCalls()) +func (mock *NamespacedServiceAccountTokenInterfaceMock) UpdateCalls() []struct { + In1 *v3.NamespacedServiceAccountToken +} { + var calls []struct { + In1 *v3.NamespacedServiceAccountToken + } + lockNamespacedServiceAccountTokenInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockNamespacedServiceAccountTokenInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *NamespacedServiceAccountTokenInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("NamespacedServiceAccountTokenInterfaceMock.WatchFunc: method is nil but NamespacedServiceAccountTokenInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockNamespacedServiceAccountTokenInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockNamespacedServiceAccountTokenInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedNamespacedServiceAccountTokenInterface.WatchCalls()) +func (mock *NamespacedServiceAccountTokenInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockNamespacedServiceAccountTokenInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockNamespacedServiceAccountTokenInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockNamespacedServiceAccountTokensGetterMockNamespacedServiceAccountTokens sync.RWMutex +) + +// Ensure, that NamespacedServiceAccountTokensGetterMock does implement NamespacedServiceAccountTokensGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.NamespacedServiceAccountTokensGetter = &NamespacedServiceAccountTokensGetterMock{} + +// NamespacedServiceAccountTokensGetterMock is a mock implementation of NamespacedServiceAccountTokensGetter. +// +// func TestSomethingThatUsesNamespacedServiceAccountTokensGetter(t *testing.T) { +// +// // make and configure a mocked NamespacedServiceAccountTokensGetter +// mockedNamespacedServiceAccountTokensGetter := &NamespacedServiceAccountTokensGetterMock{ +// NamespacedServiceAccountTokensFunc: func(namespace string) v3.NamespacedServiceAccountTokenInterface { +// panic("mock out the NamespacedServiceAccountTokens method") +// }, +// } +// +// // use mockedNamespacedServiceAccountTokensGetter in code that requires NamespacedServiceAccountTokensGetter +// // and then make assertions. +// +// } +type NamespacedServiceAccountTokensGetterMock struct { + // NamespacedServiceAccountTokensFunc mocks the NamespacedServiceAccountTokens method. + NamespacedServiceAccountTokensFunc func(namespace string) v3.NamespacedServiceAccountTokenInterface + + // calls tracks calls to the methods. + calls struct { + // NamespacedServiceAccountTokens holds details about calls to the NamespacedServiceAccountTokens method. + NamespacedServiceAccountTokens []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// NamespacedServiceAccountTokens calls NamespacedServiceAccountTokensFunc. +func (mock *NamespacedServiceAccountTokensGetterMock) NamespacedServiceAccountTokens(namespace string) v3.NamespacedServiceAccountTokenInterface { + if mock.NamespacedServiceAccountTokensFunc == nil { + panic("NamespacedServiceAccountTokensGetterMock.NamespacedServiceAccountTokensFunc: method is nil but NamespacedServiceAccountTokensGetter.NamespacedServiceAccountTokens was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockNamespacedServiceAccountTokensGetterMockNamespacedServiceAccountTokens.Lock() + mock.calls.NamespacedServiceAccountTokens = append(mock.calls.NamespacedServiceAccountTokens, callInfo) + lockNamespacedServiceAccountTokensGetterMockNamespacedServiceAccountTokens.Unlock() + return mock.NamespacedServiceAccountTokensFunc(namespace) +} + +// NamespacedServiceAccountTokensCalls gets all the calls that were made to NamespacedServiceAccountTokens. +// Check the length with: +// len(mockedNamespacedServiceAccountTokensGetter.NamespacedServiceAccountTokensCalls()) +func (mock *NamespacedServiceAccountTokensGetterMock) NamespacedServiceAccountTokensCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockNamespacedServiceAccountTokensGetterMockNamespacedServiceAccountTokens.RLock() + calls = mock.calls.NamespacedServiceAccountTokens + lockNamespacedServiceAccountTokensGetterMockNamespacedServiceAccountTokens.RUnlock() + return calls +} diff --git a/apis/project.cattle.io/v3/fakes/zz_generated_namespaced_ssh_auth_mock_test.go b/apis/project.cattle.io/v3/fakes/zz_generated_namespaced_ssh_auth_mock_test.go new file mode 100644 index 00000000..339141f5 --- /dev/null +++ b/apis/project.cattle.io/v3/fakes/zz_generated_namespaced_ssh_auth_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/project.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockNamespacedSSHAuthListerMockGet sync.RWMutex + lockNamespacedSSHAuthListerMockList sync.RWMutex +) + +// Ensure, that NamespacedSSHAuthListerMock does implement NamespacedSSHAuthLister. +// If this is not the case, regenerate this file with moq. +var _ v3.NamespacedSSHAuthLister = &NamespacedSSHAuthListerMock{} + +// NamespacedSSHAuthListerMock is a mock implementation of NamespacedSSHAuthLister. +// +// func TestSomethingThatUsesNamespacedSSHAuthLister(t *testing.T) { +// +// // make and configure a mocked NamespacedSSHAuthLister +// mockedNamespacedSSHAuthLister := &NamespacedSSHAuthListerMock{ +// GetFunc: func(namespace string, name string) (*v3.NamespacedSSHAuth, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.NamespacedSSHAuth, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedNamespacedSSHAuthLister in code that requires NamespacedSSHAuthLister +// // and then make assertions. +// +// } +type NamespacedSSHAuthListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.NamespacedSSHAuth, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.NamespacedSSHAuth, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *NamespacedSSHAuthListerMock) Get(namespace string, name string) (*v3.NamespacedSSHAuth, error) { + if mock.GetFunc == nil { + panic("NamespacedSSHAuthListerMock.GetFunc: method is nil but NamespacedSSHAuthLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockNamespacedSSHAuthListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockNamespacedSSHAuthListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedNamespacedSSHAuthLister.GetCalls()) +func (mock *NamespacedSSHAuthListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockNamespacedSSHAuthListerMockGet.RLock() + calls = mock.calls.Get + lockNamespacedSSHAuthListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *NamespacedSSHAuthListerMock) List(namespace string, selector labels.Selector) ([]*v3.NamespacedSSHAuth, error) { + if mock.ListFunc == nil { + panic("NamespacedSSHAuthListerMock.ListFunc: method is nil but NamespacedSSHAuthLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockNamespacedSSHAuthListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockNamespacedSSHAuthListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedNamespacedSSHAuthLister.ListCalls()) +func (mock *NamespacedSSHAuthListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockNamespacedSSHAuthListerMockList.RLock() + calls = mock.calls.List + lockNamespacedSSHAuthListerMockList.RUnlock() + return calls +} + +var ( + lockNamespacedSSHAuthControllerMockAddClusterScopedHandler sync.RWMutex + lockNamespacedSSHAuthControllerMockAddHandler sync.RWMutex + lockNamespacedSSHAuthControllerMockEnqueue sync.RWMutex + lockNamespacedSSHAuthControllerMockGeneric sync.RWMutex + lockNamespacedSSHAuthControllerMockInformer sync.RWMutex + lockNamespacedSSHAuthControllerMockLister sync.RWMutex + lockNamespacedSSHAuthControllerMockStart sync.RWMutex + lockNamespacedSSHAuthControllerMockSync sync.RWMutex +) + +// Ensure, that NamespacedSSHAuthControllerMock does implement NamespacedSSHAuthController. +// If this is not the case, regenerate this file with moq. +var _ v3.NamespacedSSHAuthController = &NamespacedSSHAuthControllerMock{} + +// NamespacedSSHAuthControllerMock is a mock implementation of NamespacedSSHAuthController. +// +// func TestSomethingThatUsesNamespacedSSHAuthController(t *testing.T) { +// +// // make and configure a mocked NamespacedSSHAuthController +// mockedNamespacedSSHAuthController := &NamespacedSSHAuthControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.NamespacedSSHAuthHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.NamespacedSSHAuthHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.NamespacedSSHAuthLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedNamespacedSSHAuthController in code that requires NamespacedSSHAuthController +// // and then make assertions. +// +// } +type NamespacedSSHAuthControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.NamespacedSSHAuthHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.NamespacedSSHAuthHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.NamespacedSSHAuthLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.NamespacedSSHAuthHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.NamespacedSSHAuthHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *NamespacedSSHAuthControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.NamespacedSSHAuthHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("NamespacedSSHAuthControllerMock.AddClusterScopedHandlerFunc: method is nil but NamespacedSSHAuthController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.NamespacedSSHAuthHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockNamespacedSSHAuthControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockNamespacedSSHAuthControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedNamespacedSSHAuthController.AddClusterScopedHandlerCalls()) +func (mock *NamespacedSSHAuthControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.NamespacedSSHAuthHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.NamespacedSSHAuthHandlerFunc + } + lockNamespacedSSHAuthControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockNamespacedSSHAuthControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *NamespacedSSHAuthControllerMock) AddHandler(ctx context.Context, name string, handler v3.NamespacedSSHAuthHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("NamespacedSSHAuthControllerMock.AddHandlerFunc: method is nil but NamespacedSSHAuthController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.NamespacedSSHAuthHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockNamespacedSSHAuthControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockNamespacedSSHAuthControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedNamespacedSSHAuthController.AddHandlerCalls()) +func (mock *NamespacedSSHAuthControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.NamespacedSSHAuthHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.NamespacedSSHAuthHandlerFunc + } + lockNamespacedSSHAuthControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockNamespacedSSHAuthControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *NamespacedSSHAuthControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("NamespacedSSHAuthControllerMock.EnqueueFunc: method is nil but NamespacedSSHAuthController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockNamespacedSSHAuthControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockNamespacedSSHAuthControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedNamespacedSSHAuthController.EnqueueCalls()) +func (mock *NamespacedSSHAuthControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockNamespacedSSHAuthControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockNamespacedSSHAuthControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *NamespacedSSHAuthControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("NamespacedSSHAuthControllerMock.GenericFunc: method is nil but NamespacedSSHAuthController.Generic was just called") + } + callInfo := struct { + }{} + lockNamespacedSSHAuthControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockNamespacedSSHAuthControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedNamespacedSSHAuthController.GenericCalls()) +func (mock *NamespacedSSHAuthControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockNamespacedSSHAuthControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockNamespacedSSHAuthControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *NamespacedSSHAuthControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("NamespacedSSHAuthControllerMock.InformerFunc: method is nil but NamespacedSSHAuthController.Informer was just called") + } + callInfo := struct { + }{} + lockNamespacedSSHAuthControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockNamespacedSSHAuthControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedNamespacedSSHAuthController.InformerCalls()) +func (mock *NamespacedSSHAuthControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockNamespacedSSHAuthControllerMockInformer.RLock() + calls = mock.calls.Informer + lockNamespacedSSHAuthControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *NamespacedSSHAuthControllerMock) Lister() v3.NamespacedSSHAuthLister { + if mock.ListerFunc == nil { + panic("NamespacedSSHAuthControllerMock.ListerFunc: method is nil but NamespacedSSHAuthController.Lister was just called") + } + callInfo := struct { + }{} + lockNamespacedSSHAuthControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockNamespacedSSHAuthControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedNamespacedSSHAuthController.ListerCalls()) +func (mock *NamespacedSSHAuthControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockNamespacedSSHAuthControllerMockLister.RLock() + calls = mock.calls.Lister + lockNamespacedSSHAuthControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *NamespacedSSHAuthControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("NamespacedSSHAuthControllerMock.StartFunc: method is nil but NamespacedSSHAuthController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockNamespacedSSHAuthControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockNamespacedSSHAuthControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedNamespacedSSHAuthController.StartCalls()) +func (mock *NamespacedSSHAuthControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockNamespacedSSHAuthControllerMockStart.RLock() + calls = mock.calls.Start + lockNamespacedSSHAuthControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *NamespacedSSHAuthControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("NamespacedSSHAuthControllerMock.SyncFunc: method is nil but NamespacedSSHAuthController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockNamespacedSSHAuthControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockNamespacedSSHAuthControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedNamespacedSSHAuthController.SyncCalls()) +func (mock *NamespacedSSHAuthControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockNamespacedSSHAuthControllerMockSync.RLock() + calls = mock.calls.Sync + lockNamespacedSSHAuthControllerMockSync.RUnlock() + return calls +} + +var ( + lockNamespacedSSHAuthInterfaceMockAddClusterScopedHandler sync.RWMutex + lockNamespacedSSHAuthInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockNamespacedSSHAuthInterfaceMockAddHandler sync.RWMutex + lockNamespacedSSHAuthInterfaceMockAddLifecycle sync.RWMutex + lockNamespacedSSHAuthInterfaceMockController sync.RWMutex + lockNamespacedSSHAuthInterfaceMockCreate sync.RWMutex + lockNamespacedSSHAuthInterfaceMockDelete sync.RWMutex + lockNamespacedSSHAuthInterfaceMockDeleteCollection sync.RWMutex + lockNamespacedSSHAuthInterfaceMockDeleteNamespaced sync.RWMutex + lockNamespacedSSHAuthInterfaceMockGet sync.RWMutex + lockNamespacedSSHAuthInterfaceMockGetNamespaced sync.RWMutex + lockNamespacedSSHAuthInterfaceMockList sync.RWMutex + lockNamespacedSSHAuthInterfaceMockObjectClient sync.RWMutex + lockNamespacedSSHAuthInterfaceMockUpdate sync.RWMutex + lockNamespacedSSHAuthInterfaceMockWatch sync.RWMutex +) + +// Ensure, that NamespacedSSHAuthInterfaceMock does implement NamespacedSSHAuthInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.NamespacedSSHAuthInterface = &NamespacedSSHAuthInterfaceMock{} + +// NamespacedSSHAuthInterfaceMock is a mock implementation of NamespacedSSHAuthInterface. +// +// func TestSomethingThatUsesNamespacedSSHAuthInterface(t *testing.T) { +// +// // make and configure a mocked NamespacedSSHAuthInterface +// mockedNamespacedSSHAuthInterface := &NamespacedSSHAuthInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.NamespacedSSHAuthHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.NamespacedSSHAuthLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.NamespacedSSHAuthHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.NamespacedSSHAuthLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.NamespacedSSHAuthController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.NamespacedSSHAuth) (*v3.NamespacedSSHAuth, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.NamespacedSSHAuth, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.NamespacedSSHAuth, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.NamespacedSSHAuthList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.NamespacedSSHAuth) (*v3.NamespacedSSHAuth, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedNamespacedSSHAuthInterface in code that requires NamespacedSSHAuthInterface +// // and then make assertions. +// +// } +type NamespacedSSHAuthInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.NamespacedSSHAuthHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.NamespacedSSHAuthLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.NamespacedSSHAuthHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.NamespacedSSHAuthLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.NamespacedSSHAuthController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.NamespacedSSHAuth) (*v3.NamespacedSSHAuth, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.NamespacedSSHAuth, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.NamespacedSSHAuth, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.NamespacedSSHAuthList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.NamespacedSSHAuth) (*v3.NamespacedSSHAuth, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.NamespacedSSHAuthHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.NamespacedSSHAuthLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.NamespacedSSHAuthHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.NamespacedSSHAuthLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.NamespacedSSHAuth + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.NamespacedSSHAuth + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *NamespacedSSHAuthInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.NamespacedSSHAuthHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("NamespacedSSHAuthInterfaceMock.AddClusterScopedHandlerFunc: method is nil but NamespacedSSHAuthInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.NamespacedSSHAuthHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockNamespacedSSHAuthInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockNamespacedSSHAuthInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedNamespacedSSHAuthInterface.AddClusterScopedHandlerCalls()) +func (mock *NamespacedSSHAuthInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.NamespacedSSHAuthHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.NamespacedSSHAuthHandlerFunc + } + lockNamespacedSSHAuthInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockNamespacedSSHAuthInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *NamespacedSSHAuthInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.NamespacedSSHAuthLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("NamespacedSSHAuthInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but NamespacedSSHAuthInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.NamespacedSSHAuthLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockNamespacedSSHAuthInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockNamespacedSSHAuthInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedNamespacedSSHAuthInterface.AddClusterScopedLifecycleCalls()) +func (mock *NamespacedSSHAuthInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.NamespacedSSHAuthLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.NamespacedSSHAuthLifecycle + } + lockNamespacedSSHAuthInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockNamespacedSSHAuthInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *NamespacedSSHAuthInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.NamespacedSSHAuthHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("NamespacedSSHAuthInterfaceMock.AddHandlerFunc: method is nil but NamespacedSSHAuthInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.NamespacedSSHAuthHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockNamespacedSSHAuthInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockNamespacedSSHAuthInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedNamespacedSSHAuthInterface.AddHandlerCalls()) +func (mock *NamespacedSSHAuthInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.NamespacedSSHAuthHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.NamespacedSSHAuthHandlerFunc + } + lockNamespacedSSHAuthInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockNamespacedSSHAuthInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *NamespacedSSHAuthInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.NamespacedSSHAuthLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("NamespacedSSHAuthInterfaceMock.AddLifecycleFunc: method is nil but NamespacedSSHAuthInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.NamespacedSSHAuthLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockNamespacedSSHAuthInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockNamespacedSSHAuthInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedNamespacedSSHAuthInterface.AddLifecycleCalls()) +func (mock *NamespacedSSHAuthInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.NamespacedSSHAuthLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.NamespacedSSHAuthLifecycle + } + lockNamespacedSSHAuthInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockNamespacedSSHAuthInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *NamespacedSSHAuthInterfaceMock) Controller() v3.NamespacedSSHAuthController { + if mock.ControllerFunc == nil { + panic("NamespacedSSHAuthInterfaceMock.ControllerFunc: method is nil but NamespacedSSHAuthInterface.Controller was just called") + } + callInfo := struct { + }{} + lockNamespacedSSHAuthInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockNamespacedSSHAuthInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedNamespacedSSHAuthInterface.ControllerCalls()) +func (mock *NamespacedSSHAuthInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockNamespacedSSHAuthInterfaceMockController.RLock() + calls = mock.calls.Controller + lockNamespacedSSHAuthInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *NamespacedSSHAuthInterfaceMock) Create(in1 *v3.NamespacedSSHAuth) (*v3.NamespacedSSHAuth, error) { + if mock.CreateFunc == nil { + panic("NamespacedSSHAuthInterfaceMock.CreateFunc: method is nil but NamespacedSSHAuthInterface.Create was just called") + } + callInfo := struct { + In1 *v3.NamespacedSSHAuth + }{ + In1: in1, + } + lockNamespacedSSHAuthInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockNamespacedSSHAuthInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedNamespacedSSHAuthInterface.CreateCalls()) +func (mock *NamespacedSSHAuthInterfaceMock) CreateCalls() []struct { + In1 *v3.NamespacedSSHAuth +} { + var calls []struct { + In1 *v3.NamespacedSSHAuth + } + lockNamespacedSSHAuthInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockNamespacedSSHAuthInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *NamespacedSSHAuthInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("NamespacedSSHAuthInterfaceMock.DeleteFunc: method is nil but NamespacedSSHAuthInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockNamespacedSSHAuthInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockNamespacedSSHAuthInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedNamespacedSSHAuthInterface.DeleteCalls()) +func (mock *NamespacedSSHAuthInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockNamespacedSSHAuthInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockNamespacedSSHAuthInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *NamespacedSSHAuthInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("NamespacedSSHAuthInterfaceMock.DeleteCollectionFunc: method is nil but NamespacedSSHAuthInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockNamespacedSSHAuthInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockNamespacedSSHAuthInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedNamespacedSSHAuthInterface.DeleteCollectionCalls()) +func (mock *NamespacedSSHAuthInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockNamespacedSSHAuthInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockNamespacedSSHAuthInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *NamespacedSSHAuthInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("NamespacedSSHAuthInterfaceMock.DeleteNamespacedFunc: method is nil but NamespacedSSHAuthInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockNamespacedSSHAuthInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockNamespacedSSHAuthInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedNamespacedSSHAuthInterface.DeleteNamespacedCalls()) +func (mock *NamespacedSSHAuthInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockNamespacedSSHAuthInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockNamespacedSSHAuthInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *NamespacedSSHAuthInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.NamespacedSSHAuth, error) { + if mock.GetFunc == nil { + panic("NamespacedSSHAuthInterfaceMock.GetFunc: method is nil but NamespacedSSHAuthInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockNamespacedSSHAuthInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockNamespacedSSHAuthInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedNamespacedSSHAuthInterface.GetCalls()) +func (mock *NamespacedSSHAuthInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockNamespacedSSHAuthInterfaceMockGet.RLock() + calls = mock.calls.Get + lockNamespacedSSHAuthInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *NamespacedSSHAuthInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.NamespacedSSHAuth, error) { + if mock.GetNamespacedFunc == nil { + panic("NamespacedSSHAuthInterfaceMock.GetNamespacedFunc: method is nil but NamespacedSSHAuthInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockNamespacedSSHAuthInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockNamespacedSSHAuthInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedNamespacedSSHAuthInterface.GetNamespacedCalls()) +func (mock *NamespacedSSHAuthInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockNamespacedSSHAuthInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockNamespacedSSHAuthInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *NamespacedSSHAuthInterfaceMock) List(opts v1.ListOptions) (*v3.NamespacedSSHAuthList, error) { + if mock.ListFunc == nil { + panic("NamespacedSSHAuthInterfaceMock.ListFunc: method is nil but NamespacedSSHAuthInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockNamespacedSSHAuthInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockNamespacedSSHAuthInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedNamespacedSSHAuthInterface.ListCalls()) +func (mock *NamespacedSSHAuthInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockNamespacedSSHAuthInterfaceMockList.RLock() + calls = mock.calls.List + lockNamespacedSSHAuthInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *NamespacedSSHAuthInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("NamespacedSSHAuthInterfaceMock.ObjectClientFunc: method is nil but NamespacedSSHAuthInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockNamespacedSSHAuthInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockNamespacedSSHAuthInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedNamespacedSSHAuthInterface.ObjectClientCalls()) +func (mock *NamespacedSSHAuthInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockNamespacedSSHAuthInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockNamespacedSSHAuthInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *NamespacedSSHAuthInterfaceMock) Update(in1 *v3.NamespacedSSHAuth) (*v3.NamespacedSSHAuth, error) { + if mock.UpdateFunc == nil { + panic("NamespacedSSHAuthInterfaceMock.UpdateFunc: method is nil but NamespacedSSHAuthInterface.Update was just called") + } + callInfo := struct { + In1 *v3.NamespacedSSHAuth + }{ + In1: in1, + } + lockNamespacedSSHAuthInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockNamespacedSSHAuthInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedNamespacedSSHAuthInterface.UpdateCalls()) +func (mock *NamespacedSSHAuthInterfaceMock) UpdateCalls() []struct { + In1 *v3.NamespacedSSHAuth +} { + var calls []struct { + In1 *v3.NamespacedSSHAuth + } + lockNamespacedSSHAuthInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockNamespacedSSHAuthInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *NamespacedSSHAuthInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("NamespacedSSHAuthInterfaceMock.WatchFunc: method is nil but NamespacedSSHAuthInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockNamespacedSSHAuthInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockNamespacedSSHAuthInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedNamespacedSSHAuthInterface.WatchCalls()) +func (mock *NamespacedSSHAuthInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockNamespacedSSHAuthInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockNamespacedSSHAuthInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockNamespacedSSHAuthsGetterMockNamespacedSSHAuths sync.RWMutex +) + +// Ensure, that NamespacedSSHAuthsGetterMock does implement NamespacedSSHAuthsGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.NamespacedSSHAuthsGetter = &NamespacedSSHAuthsGetterMock{} + +// NamespacedSSHAuthsGetterMock is a mock implementation of NamespacedSSHAuthsGetter. +// +// func TestSomethingThatUsesNamespacedSSHAuthsGetter(t *testing.T) { +// +// // make and configure a mocked NamespacedSSHAuthsGetter +// mockedNamespacedSSHAuthsGetter := &NamespacedSSHAuthsGetterMock{ +// NamespacedSSHAuthsFunc: func(namespace string) v3.NamespacedSSHAuthInterface { +// panic("mock out the NamespacedSSHAuths method") +// }, +// } +// +// // use mockedNamespacedSSHAuthsGetter in code that requires NamespacedSSHAuthsGetter +// // and then make assertions. +// +// } +type NamespacedSSHAuthsGetterMock struct { + // NamespacedSSHAuthsFunc mocks the NamespacedSSHAuths method. + NamespacedSSHAuthsFunc func(namespace string) v3.NamespacedSSHAuthInterface + + // calls tracks calls to the methods. + calls struct { + // NamespacedSSHAuths holds details about calls to the NamespacedSSHAuths method. + NamespacedSSHAuths []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// NamespacedSSHAuths calls NamespacedSSHAuthsFunc. +func (mock *NamespacedSSHAuthsGetterMock) NamespacedSSHAuths(namespace string) v3.NamespacedSSHAuthInterface { + if mock.NamespacedSSHAuthsFunc == nil { + panic("NamespacedSSHAuthsGetterMock.NamespacedSSHAuthsFunc: method is nil but NamespacedSSHAuthsGetter.NamespacedSSHAuths was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockNamespacedSSHAuthsGetterMockNamespacedSSHAuths.Lock() + mock.calls.NamespacedSSHAuths = append(mock.calls.NamespacedSSHAuths, callInfo) + lockNamespacedSSHAuthsGetterMockNamespacedSSHAuths.Unlock() + return mock.NamespacedSSHAuthsFunc(namespace) +} + +// NamespacedSSHAuthsCalls gets all the calls that were made to NamespacedSSHAuths. +// Check the length with: +// len(mockedNamespacedSSHAuthsGetter.NamespacedSSHAuthsCalls()) +func (mock *NamespacedSSHAuthsGetterMock) NamespacedSSHAuthsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockNamespacedSSHAuthsGetterMockNamespacedSSHAuths.RLock() + calls = mock.calls.NamespacedSSHAuths + lockNamespacedSSHAuthsGetterMockNamespacedSSHAuths.RUnlock() + return calls +} diff --git a/apis/project.cattle.io/v3/fakes/zz_generated_pipeline_execution_mock_test.go b/apis/project.cattle.io/v3/fakes/zz_generated_pipeline_execution_mock_test.go new file mode 100644 index 00000000..37f9c768 --- /dev/null +++ b/apis/project.cattle.io/v3/fakes/zz_generated_pipeline_execution_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/project.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockPipelineExecutionListerMockGet sync.RWMutex + lockPipelineExecutionListerMockList sync.RWMutex +) + +// Ensure, that PipelineExecutionListerMock does implement PipelineExecutionLister. +// If this is not the case, regenerate this file with moq. +var _ v3.PipelineExecutionLister = &PipelineExecutionListerMock{} + +// PipelineExecutionListerMock is a mock implementation of PipelineExecutionLister. +// +// func TestSomethingThatUsesPipelineExecutionLister(t *testing.T) { +// +// // make and configure a mocked PipelineExecutionLister +// mockedPipelineExecutionLister := &PipelineExecutionListerMock{ +// GetFunc: func(namespace string, name string) (*v3.PipelineExecution, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.PipelineExecution, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedPipelineExecutionLister in code that requires PipelineExecutionLister +// // and then make assertions. +// +// } +type PipelineExecutionListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.PipelineExecution, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.PipelineExecution, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *PipelineExecutionListerMock) Get(namespace string, name string) (*v3.PipelineExecution, error) { + if mock.GetFunc == nil { + panic("PipelineExecutionListerMock.GetFunc: method is nil but PipelineExecutionLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockPipelineExecutionListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockPipelineExecutionListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedPipelineExecutionLister.GetCalls()) +func (mock *PipelineExecutionListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockPipelineExecutionListerMockGet.RLock() + calls = mock.calls.Get + lockPipelineExecutionListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *PipelineExecutionListerMock) List(namespace string, selector labels.Selector) ([]*v3.PipelineExecution, error) { + if mock.ListFunc == nil { + panic("PipelineExecutionListerMock.ListFunc: method is nil but PipelineExecutionLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockPipelineExecutionListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockPipelineExecutionListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedPipelineExecutionLister.ListCalls()) +func (mock *PipelineExecutionListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockPipelineExecutionListerMockList.RLock() + calls = mock.calls.List + lockPipelineExecutionListerMockList.RUnlock() + return calls +} + +var ( + lockPipelineExecutionControllerMockAddClusterScopedHandler sync.RWMutex + lockPipelineExecutionControllerMockAddHandler sync.RWMutex + lockPipelineExecutionControllerMockEnqueue sync.RWMutex + lockPipelineExecutionControllerMockGeneric sync.RWMutex + lockPipelineExecutionControllerMockInformer sync.RWMutex + lockPipelineExecutionControllerMockLister sync.RWMutex + lockPipelineExecutionControllerMockStart sync.RWMutex + lockPipelineExecutionControllerMockSync sync.RWMutex +) + +// Ensure, that PipelineExecutionControllerMock does implement PipelineExecutionController. +// If this is not the case, regenerate this file with moq. +var _ v3.PipelineExecutionController = &PipelineExecutionControllerMock{} + +// PipelineExecutionControllerMock is a mock implementation of PipelineExecutionController. +// +// func TestSomethingThatUsesPipelineExecutionController(t *testing.T) { +// +// // make and configure a mocked PipelineExecutionController +// mockedPipelineExecutionController := &PipelineExecutionControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.PipelineExecutionHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.PipelineExecutionHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.PipelineExecutionLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedPipelineExecutionController in code that requires PipelineExecutionController +// // and then make assertions. +// +// } +type PipelineExecutionControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.PipelineExecutionHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.PipelineExecutionHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.PipelineExecutionLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.PipelineExecutionHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.PipelineExecutionHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *PipelineExecutionControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.PipelineExecutionHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("PipelineExecutionControllerMock.AddClusterScopedHandlerFunc: method is nil but PipelineExecutionController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.PipelineExecutionHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockPipelineExecutionControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockPipelineExecutionControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedPipelineExecutionController.AddClusterScopedHandlerCalls()) +func (mock *PipelineExecutionControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.PipelineExecutionHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.PipelineExecutionHandlerFunc + } + lockPipelineExecutionControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockPipelineExecutionControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *PipelineExecutionControllerMock) AddHandler(ctx context.Context, name string, handler v3.PipelineExecutionHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("PipelineExecutionControllerMock.AddHandlerFunc: method is nil but PipelineExecutionController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.PipelineExecutionHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockPipelineExecutionControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockPipelineExecutionControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedPipelineExecutionController.AddHandlerCalls()) +func (mock *PipelineExecutionControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.PipelineExecutionHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.PipelineExecutionHandlerFunc + } + lockPipelineExecutionControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockPipelineExecutionControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *PipelineExecutionControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("PipelineExecutionControllerMock.EnqueueFunc: method is nil but PipelineExecutionController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockPipelineExecutionControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockPipelineExecutionControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedPipelineExecutionController.EnqueueCalls()) +func (mock *PipelineExecutionControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockPipelineExecutionControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockPipelineExecutionControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *PipelineExecutionControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("PipelineExecutionControllerMock.GenericFunc: method is nil but PipelineExecutionController.Generic was just called") + } + callInfo := struct { + }{} + lockPipelineExecutionControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockPipelineExecutionControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedPipelineExecutionController.GenericCalls()) +func (mock *PipelineExecutionControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockPipelineExecutionControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockPipelineExecutionControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *PipelineExecutionControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("PipelineExecutionControllerMock.InformerFunc: method is nil but PipelineExecutionController.Informer was just called") + } + callInfo := struct { + }{} + lockPipelineExecutionControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockPipelineExecutionControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedPipelineExecutionController.InformerCalls()) +func (mock *PipelineExecutionControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockPipelineExecutionControllerMockInformer.RLock() + calls = mock.calls.Informer + lockPipelineExecutionControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *PipelineExecutionControllerMock) Lister() v3.PipelineExecutionLister { + if mock.ListerFunc == nil { + panic("PipelineExecutionControllerMock.ListerFunc: method is nil but PipelineExecutionController.Lister was just called") + } + callInfo := struct { + }{} + lockPipelineExecutionControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockPipelineExecutionControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedPipelineExecutionController.ListerCalls()) +func (mock *PipelineExecutionControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockPipelineExecutionControllerMockLister.RLock() + calls = mock.calls.Lister + lockPipelineExecutionControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *PipelineExecutionControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("PipelineExecutionControllerMock.StartFunc: method is nil but PipelineExecutionController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockPipelineExecutionControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockPipelineExecutionControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedPipelineExecutionController.StartCalls()) +func (mock *PipelineExecutionControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockPipelineExecutionControllerMockStart.RLock() + calls = mock.calls.Start + lockPipelineExecutionControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *PipelineExecutionControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("PipelineExecutionControllerMock.SyncFunc: method is nil but PipelineExecutionController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockPipelineExecutionControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockPipelineExecutionControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedPipelineExecutionController.SyncCalls()) +func (mock *PipelineExecutionControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockPipelineExecutionControllerMockSync.RLock() + calls = mock.calls.Sync + lockPipelineExecutionControllerMockSync.RUnlock() + return calls +} + +var ( + lockPipelineExecutionInterfaceMockAddClusterScopedHandler sync.RWMutex + lockPipelineExecutionInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockPipelineExecutionInterfaceMockAddHandler sync.RWMutex + lockPipelineExecutionInterfaceMockAddLifecycle sync.RWMutex + lockPipelineExecutionInterfaceMockController sync.RWMutex + lockPipelineExecutionInterfaceMockCreate sync.RWMutex + lockPipelineExecutionInterfaceMockDelete sync.RWMutex + lockPipelineExecutionInterfaceMockDeleteCollection sync.RWMutex + lockPipelineExecutionInterfaceMockDeleteNamespaced sync.RWMutex + lockPipelineExecutionInterfaceMockGet sync.RWMutex + lockPipelineExecutionInterfaceMockGetNamespaced sync.RWMutex + lockPipelineExecutionInterfaceMockList sync.RWMutex + lockPipelineExecutionInterfaceMockObjectClient sync.RWMutex + lockPipelineExecutionInterfaceMockUpdate sync.RWMutex + lockPipelineExecutionInterfaceMockWatch sync.RWMutex +) + +// Ensure, that PipelineExecutionInterfaceMock does implement PipelineExecutionInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.PipelineExecutionInterface = &PipelineExecutionInterfaceMock{} + +// PipelineExecutionInterfaceMock is a mock implementation of PipelineExecutionInterface. +// +// func TestSomethingThatUsesPipelineExecutionInterface(t *testing.T) { +// +// // make and configure a mocked PipelineExecutionInterface +// mockedPipelineExecutionInterface := &PipelineExecutionInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.PipelineExecutionHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.PipelineExecutionLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.PipelineExecutionHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.PipelineExecutionLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.PipelineExecutionController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.PipelineExecution) (*v3.PipelineExecution, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.PipelineExecution, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.PipelineExecution, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.PipelineExecutionList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.PipelineExecution) (*v3.PipelineExecution, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedPipelineExecutionInterface in code that requires PipelineExecutionInterface +// // and then make assertions. +// +// } +type PipelineExecutionInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.PipelineExecutionHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.PipelineExecutionLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.PipelineExecutionHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.PipelineExecutionLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.PipelineExecutionController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.PipelineExecution) (*v3.PipelineExecution, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.PipelineExecution, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.PipelineExecution, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.PipelineExecutionList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.PipelineExecution) (*v3.PipelineExecution, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.PipelineExecutionHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.PipelineExecutionLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.PipelineExecutionHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.PipelineExecutionLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.PipelineExecution + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.PipelineExecution + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *PipelineExecutionInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.PipelineExecutionHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("PipelineExecutionInterfaceMock.AddClusterScopedHandlerFunc: method is nil but PipelineExecutionInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.PipelineExecutionHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockPipelineExecutionInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockPipelineExecutionInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedPipelineExecutionInterface.AddClusterScopedHandlerCalls()) +func (mock *PipelineExecutionInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.PipelineExecutionHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.PipelineExecutionHandlerFunc + } + lockPipelineExecutionInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockPipelineExecutionInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *PipelineExecutionInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.PipelineExecutionLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("PipelineExecutionInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but PipelineExecutionInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.PipelineExecutionLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockPipelineExecutionInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockPipelineExecutionInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedPipelineExecutionInterface.AddClusterScopedLifecycleCalls()) +func (mock *PipelineExecutionInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.PipelineExecutionLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.PipelineExecutionLifecycle + } + lockPipelineExecutionInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockPipelineExecutionInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *PipelineExecutionInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.PipelineExecutionHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("PipelineExecutionInterfaceMock.AddHandlerFunc: method is nil but PipelineExecutionInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.PipelineExecutionHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockPipelineExecutionInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockPipelineExecutionInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedPipelineExecutionInterface.AddHandlerCalls()) +func (mock *PipelineExecutionInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.PipelineExecutionHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.PipelineExecutionHandlerFunc + } + lockPipelineExecutionInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockPipelineExecutionInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *PipelineExecutionInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.PipelineExecutionLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("PipelineExecutionInterfaceMock.AddLifecycleFunc: method is nil but PipelineExecutionInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.PipelineExecutionLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockPipelineExecutionInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockPipelineExecutionInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedPipelineExecutionInterface.AddLifecycleCalls()) +func (mock *PipelineExecutionInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.PipelineExecutionLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.PipelineExecutionLifecycle + } + lockPipelineExecutionInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockPipelineExecutionInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *PipelineExecutionInterfaceMock) Controller() v3.PipelineExecutionController { + if mock.ControllerFunc == nil { + panic("PipelineExecutionInterfaceMock.ControllerFunc: method is nil but PipelineExecutionInterface.Controller was just called") + } + callInfo := struct { + }{} + lockPipelineExecutionInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockPipelineExecutionInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedPipelineExecutionInterface.ControllerCalls()) +func (mock *PipelineExecutionInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockPipelineExecutionInterfaceMockController.RLock() + calls = mock.calls.Controller + lockPipelineExecutionInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *PipelineExecutionInterfaceMock) Create(in1 *v3.PipelineExecution) (*v3.PipelineExecution, error) { + if mock.CreateFunc == nil { + panic("PipelineExecutionInterfaceMock.CreateFunc: method is nil but PipelineExecutionInterface.Create was just called") + } + callInfo := struct { + In1 *v3.PipelineExecution + }{ + In1: in1, + } + lockPipelineExecutionInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockPipelineExecutionInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedPipelineExecutionInterface.CreateCalls()) +func (mock *PipelineExecutionInterfaceMock) CreateCalls() []struct { + In1 *v3.PipelineExecution +} { + var calls []struct { + In1 *v3.PipelineExecution + } + lockPipelineExecutionInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockPipelineExecutionInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *PipelineExecutionInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("PipelineExecutionInterfaceMock.DeleteFunc: method is nil but PipelineExecutionInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockPipelineExecutionInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockPipelineExecutionInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedPipelineExecutionInterface.DeleteCalls()) +func (mock *PipelineExecutionInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockPipelineExecutionInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockPipelineExecutionInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *PipelineExecutionInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("PipelineExecutionInterfaceMock.DeleteCollectionFunc: method is nil but PipelineExecutionInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockPipelineExecutionInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockPipelineExecutionInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedPipelineExecutionInterface.DeleteCollectionCalls()) +func (mock *PipelineExecutionInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockPipelineExecutionInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockPipelineExecutionInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *PipelineExecutionInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("PipelineExecutionInterfaceMock.DeleteNamespacedFunc: method is nil but PipelineExecutionInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockPipelineExecutionInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockPipelineExecutionInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedPipelineExecutionInterface.DeleteNamespacedCalls()) +func (mock *PipelineExecutionInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockPipelineExecutionInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockPipelineExecutionInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *PipelineExecutionInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.PipelineExecution, error) { + if mock.GetFunc == nil { + panic("PipelineExecutionInterfaceMock.GetFunc: method is nil but PipelineExecutionInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockPipelineExecutionInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockPipelineExecutionInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedPipelineExecutionInterface.GetCalls()) +func (mock *PipelineExecutionInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockPipelineExecutionInterfaceMockGet.RLock() + calls = mock.calls.Get + lockPipelineExecutionInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *PipelineExecutionInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.PipelineExecution, error) { + if mock.GetNamespacedFunc == nil { + panic("PipelineExecutionInterfaceMock.GetNamespacedFunc: method is nil but PipelineExecutionInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockPipelineExecutionInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockPipelineExecutionInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedPipelineExecutionInterface.GetNamespacedCalls()) +func (mock *PipelineExecutionInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockPipelineExecutionInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockPipelineExecutionInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *PipelineExecutionInterfaceMock) List(opts v1.ListOptions) (*v3.PipelineExecutionList, error) { + if mock.ListFunc == nil { + panic("PipelineExecutionInterfaceMock.ListFunc: method is nil but PipelineExecutionInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockPipelineExecutionInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockPipelineExecutionInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedPipelineExecutionInterface.ListCalls()) +func (mock *PipelineExecutionInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockPipelineExecutionInterfaceMockList.RLock() + calls = mock.calls.List + lockPipelineExecutionInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *PipelineExecutionInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("PipelineExecutionInterfaceMock.ObjectClientFunc: method is nil but PipelineExecutionInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockPipelineExecutionInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockPipelineExecutionInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedPipelineExecutionInterface.ObjectClientCalls()) +func (mock *PipelineExecutionInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockPipelineExecutionInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockPipelineExecutionInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *PipelineExecutionInterfaceMock) Update(in1 *v3.PipelineExecution) (*v3.PipelineExecution, error) { + if mock.UpdateFunc == nil { + panic("PipelineExecutionInterfaceMock.UpdateFunc: method is nil but PipelineExecutionInterface.Update was just called") + } + callInfo := struct { + In1 *v3.PipelineExecution + }{ + In1: in1, + } + lockPipelineExecutionInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockPipelineExecutionInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedPipelineExecutionInterface.UpdateCalls()) +func (mock *PipelineExecutionInterfaceMock) UpdateCalls() []struct { + In1 *v3.PipelineExecution +} { + var calls []struct { + In1 *v3.PipelineExecution + } + lockPipelineExecutionInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockPipelineExecutionInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *PipelineExecutionInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("PipelineExecutionInterfaceMock.WatchFunc: method is nil but PipelineExecutionInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockPipelineExecutionInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockPipelineExecutionInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedPipelineExecutionInterface.WatchCalls()) +func (mock *PipelineExecutionInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockPipelineExecutionInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockPipelineExecutionInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockPipelineExecutionsGetterMockPipelineExecutions sync.RWMutex +) + +// Ensure, that PipelineExecutionsGetterMock does implement PipelineExecutionsGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.PipelineExecutionsGetter = &PipelineExecutionsGetterMock{} + +// PipelineExecutionsGetterMock is a mock implementation of PipelineExecutionsGetter. +// +// func TestSomethingThatUsesPipelineExecutionsGetter(t *testing.T) { +// +// // make and configure a mocked PipelineExecutionsGetter +// mockedPipelineExecutionsGetter := &PipelineExecutionsGetterMock{ +// PipelineExecutionsFunc: func(namespace string) v3.PipelineExecutionInterface { +// panic("mock out the PipelineExecutions method") +// }, +// } +// +// // use mockedPipelineExecutionsGetter in code that requires PipelineExecutionsGetter +// // and then make assertions. +// +// } +type PipelineExecutionsGetterMock struct { + // PipelineExecutionsFunc mocks the PipelineExecutions method. + PipelineExecutionsFunc func(namespace string) v3.PipelineExecutionInterface + + // calls tracks calls to the methods. + calls struct { + // PipelineExecutions holds details about calls to the PipelineExecutions method. + PipelineExecutions []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// PipelineExecutions calls PipelineExecutionsFunc. +func (mock *PipelineExecutionsGetterMock) PipelineExecutions(namespace string) v3.PipelineExecutionInterface { + if mock.PipelineExecutionsFunc == nil { + panic("PipelineExecutionsGetterMock.PipelineExecutionsFunc: method is nil but PipelineExecutionsGetter.PipelineExecutions was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockPipelineExecutionsGetterMockPipelineExecutions.Lock() + mock.calls.PipelineExecutions = append(mock.calls.PipelineExecutions, callInfo) + lockPipelineExecutionsGetterMockPipelineExecutions.Unlock() + return mock.PipelineExecutionsFunc(namespace) +} + +// PipelineExecutionsCalls gets all the calls that were made to PipelineExecutions. +// Check the length with: +// len(mockedPipelineExecutionsGetter.PipelineExecutionsCalls()) +func (mock *PipelineExecutionsGetterMock) PipelineExecutionsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockPipelineExecutionsGetterMockPipelineExecutions.RLock() + calls = mock.calls.PipelineExecutions + lockPipelineExecutionsGetterMockPipelineExecutions.RUnlock() + return calls +} diff --git a/apis/project.cattle.io/v3/fakes/zz_generated_pipeline_mock_test.go b/apis/project.cattle.io/v3/fakes/zz_generated_pipeline_mock_test.go new file mode 100644 index 00000000..81915316 --- /dev/null +++ b/apis/project.cattle.io/v3/fakes/zz_generated_pipeline_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/project.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockPipelineListerMockGet sync.RWMutex + lockPipelineListerMockList sync.RWMutex +) + +// Ensure, that PipelineListerMock does implement PipelineLister. +// If this is not the case, regenerate this file with moq. +var _ v3.PipelineLister = &PipelineListerMock{} + +// PipelineListerMock is a mock implementation of PipelineLister. +// +// func TestSomethingThatUsesPipelineLister(t *testing.T) { +// +// // make and configure a mocked PipelineLister +// mockedPipelineLister := &PipelineListerMock{ +// GetFunc: func(namespace string, name string) (*v3.Pipeline, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.Pipeline, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedPipelineLister in code that requires PipelineLister +// // and then make assertions. +// +// } +type PipelineListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.Pipeline, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.Pipeline, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *PipelineListerMock) Get(namespace string, name string) (*v3.Pipeline, error) { + if mock.GetFunc == nil { + panic("PipelineListerMock.GetFunc: method is nil but PipelineLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockPipelineListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockPipelineListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedPipelineLister.GetCalls()) +func (mock *PipelineListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockPipelineListerMockGet.RLock() + calls = mock.calls.Get + lockPipelineListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *PipelineListerMock) List(namespace string, selector labels.Selector) ([]*v3.Pipeline, error) { + if mock.ListFunc == nil { + panic("PipelineListerMock.ListFunc: method is nil but PipelineLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockPipelineListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockPipelineListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedPipelineLister.ListCalls()) +func (mock *PipelineListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockPipelineListerMockList.RLock() + calls = mock.calls.List + lockPipelineListerMockList.RUnlock() + return calls +} + +var ( + lockPipelineControllerMockAddClusterScopedHandler sync.RWMutex + lockPipelineControllerMockAddHandler sync.RWMutex + lockPipelineControllerMockEnqueue sync.RWMutex + lockPipelineControllerMockGeneric sync.RWMutex + lockPipelineControllerMockInformer sync.RWMutex + lockPipelineControllerMockLister sync.RWMutex + lockPipelineControllerMockStart sync.RWMutex + lockPipelineControllerMockSync sync.RWMutex +) + +// Ensure, that PipelineControllerMock does implement PipelineController. +// If this is not the case, regenerate this file with moq. +var _ v3.PipelineController = &PipelineControllerMock{} + +// PipelineControllerMock is a mock implementation of PipelineController. +// +// func TestSomethingThatUsesPipelineController(t *testing.T) { +// +// // make and configure a mocked PipelineController +// mockedPipelineController := &PipelineControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.PipelineHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.PipelineHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.PipelineLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedPipelineController in code that requires PipelineController +// // and then make assertions. +// +// } +type PipelineControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.PipelineHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.PipelineHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.PipelineLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.PipelineHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.PipelineHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *PipelineControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.PipelineHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("PipelineControllerMock.AddClusterScopedHandlerFunc: method is nil but PipelineController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.PipelineHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockPipelineControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockPipelineControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedPipelineController.AddClusterScopedHandlerCalls()) +func (mock *PipelineControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.PipelineHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.PipelineHandlerFunc + } + lockPipelineControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockPipelineControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *PipelineControllerMock) AddHandler(ctx context.Context, name string, handler v3.PipelineHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("PipelineControllerMock.AddHandlerFunc: method is nil but PipelineController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.PipelineHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockPipelineControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockPipelineControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedPipelineController.AddHandlerCalls()) +func (mock *PipelineControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.PipelineHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.PipelineHandlerFunc + } + lockPipelineControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockPipelineControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *PipelineControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("PipelineControllerMock.EnqueueFunc: method is nil but PipelineController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockPipelineControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockPipelineControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedPipelineController.EnqueueCalls()) +func (mock *PipelineControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockPipelineControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockPipelineControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *PipelineControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("PipelineControllerMock.GenericFunc: method is nil but PipelineController.Generic was just called") + } + callInfo := struct { + }{} + lockPipelineControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockPipelineControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedPipelineController.GenericCalls()) +func (mock *PipelineControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockPipelineControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockPipelineControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *PipelineControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("PipelineControllerMock.InformerFunc: method is nil but PipelineController.Informer was just called") + } + callInfo := struct { + }{} + lockPipelineControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockPipelineControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedPipelineController.InformerCalls()) +func (mock *PipelineControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockPipelineControllerMockInformer.RLock() + calls = mock.calls.Informer + lockPipelineControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *PipelineControllerMock) Lister() v3.PipelineLister { + if mock.ListerFunc == nil { + panic("PipelineControllerMock.ListerFunc: method is nil but PipelineController.Lister was just called") + } + callInfo := struct { + }{} + lockPipelineControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockPipelineControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedPipelineController.ListerCalls()) +func (mock *PipelineControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockPipelineControllerMockLister.RLock() + calls = mock.calls.Lister + lockPipelineControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *PipelineControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("PipelineControllerMock.StartFunc: method is nil but PipelineController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockPipelineControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockPipelineControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedPipelineController.StartCalls()) +func (mock *PipelineControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockPipelineControllerMockStart.RLock() + calls = mock.calls.Start + lockPipelineControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *PipelineControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("PipelineControllerMock.SyncFunc: method is nil but PipelineController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockPipelineControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockPipelineControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedPipelineController.SyncCalls()) +func (mock *PipelineControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockPipelineControllerMockSync.RLock() + calls = mock.calls.Sync + lockPipelineControllerMockSync.RUnlock() + return calls +} + +var ( + lockPipelineInterfaceMockAddClusterScopedHandler sync.RWMutex + lockPipelineInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockPipelineInterfaceMockAddHandler sync.RWMutex + lockPipelineInterfaceMockAddLifecycle sync.RWMutex + lockPipelineInterfaceMockController sync.RWMutex + lockPipelineInterfaceMockCreate sync.RWMutex + lockPipelineInterfaceMockDelete sync.RWMutex + lockPipelineInterfaceMockDeleteCollection sync.RWMutex + lockPipelineInterfaceMockDeleteNamespaced sync.RWMutex + lockPipelineInterfaceMockGet sync.RWMutex + lockPipelineInterfaceMockGetNamespaced sync.RWMutex + lockPipelineInterfaceMockList sync.RWMutex + lockPipelineInterfaceMockObjectClient sync.RWMutex + lockPipelineInterfaceMockUpdate sync.RWMutex + lockPipelineInterfaceMockWatch sync.RWMutex +) + +// Ensure, that PipelineInterfaceMock does implement PipelineInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.PipelineInterface = &PipelineInterfaceMock{} + +// PipelineInterfaceMock is a mock implementation of PipelineInterface. +// +// func TestSomethingThatUsesPipelineInterface(t *testing.T) { +// +// // make and configure a mocked PipelineInterface +// mockedPipelineInterface := &PipelineInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.PipelineHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.PipelineLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.PipelineHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.PipelineLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.PipelineController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.Pipeline) (*v3.Pipeline, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.Pipeline, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.Pipeline, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.PipelineList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.Pipeline) (*v3.Pipeline, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedPipelineInterface in code that requires PipelineInterface +// // and then make assertions. +// +// } +type PipelineInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.PipelineHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.PipelineLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.PipelineHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.PipelineLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.PipelineController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.Pipeline) (*v3.Pipeline, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.Pipeline, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.Pipeline, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.PipelineList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.Pipeline) (*v3.Pipeline, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.PipelineHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.PipelineLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.PipelineHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.PipelineLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.Pipeline + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.Pipeline + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *PipelineInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.PipelineHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("PipelineInterfaceMock.AddClusterScopedHandlerFunc: method is nil but PipelineInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.PipelineHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockPipelineInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockPipelineInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedPipelineInterface.AddClusterScopedHandlerCalls()) +func (mock *PipelineInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.PipelineHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.PipelineHandlerFunc + } + lockPipelineInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockPipelineInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *PipelineInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.PipelineLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("PipelineInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but PipelineInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.PipelineLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockPipelineInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockPipelineInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedPipelineInterface.AddClusterScopedLifecycleCalls()) +func (mock *PipelineInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.PipelineLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.PipelineLifecycle + } + lockPipelineInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockPipelineInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *PipelineInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.PipelineHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("PipelineInterfaceMock.AddHandlerFunc: method is nil but PipelineInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.PipelineHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockPipelineInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockPipelineInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedPipelineInterface.AddHandlerCalls()) +func (mock *PipelineInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.PipelineHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.PipelineHandlerFunc + } + lockPipelineInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockPipelineInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *PipelineInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.PipelineLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("PipelineInterfaceMock.AddLifecycleFunc: method is nil but PipelineInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.PipelineLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockPipelineInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockPipelineInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedPipelineInterface.AddLifecycleCalls()) +func (mock *PipelineInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.PipelineLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.PipelineLifecycle + } + lockPipelineInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockPipelineInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *PipelineInterfaceMock) Controller() v3.PipelineController { + if mock.ControllerFunc == nil { + panic("PipelineInterfaceMock.ControllerFunc: method is nil but PipelineInterface.Controller was just called") + } + callInfo := struct { + }{} + lockPipelineInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockPipelineInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedPipelineInterface.ControllerCalls()) +func (mock *PipelineInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockPipelineInterfaceMockController.RLock() + calls = mock.calls.Controller + lockPipelineInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *PipelineInterfaceMock) Create(in1 *v3.Pipeline) (*v3.Pipeline, error) { + if mock.CreateFunc == nil { + panic("PipelineInterfaceMock.CreateFunc: method is nil but PipelineInterface.Create was just called") + } + callInfo := struct { + In1 *v3.Pipeline + }{ + In1: in1, + } + lockPipelineInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockPipelineInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedPipelineInterface.CreateCalls()) +func (mock *PipelineInterfaceMock) CreateCalls() []struct { + In1 *v3.Pipeline +} { + var calls []struct { + In1 *v3.Pipeline + } + lockPipelineInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockPipelineInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *PipelineInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("PipelineInterfaceMock.DeleteFunc: method is nil but PipelineInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockPipelineInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockPipelineInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedPipelineInterface.DeleteCalls()) +func (mock *PipelineInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockPipelineInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockPipelineInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *PipelineInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("PipelineInterfaceMock.DeleteCollectionFunc: method is nil but PipelineInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockPipelineInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockPipelineInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedPipelineInterface.DeleteCollectionCalls()) +func (mock *PipelineInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockPipelineInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockPipelineInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *PipelineInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("PipelineInterfaceMock.DeleteNamespacedFunc: method is nil but PipelineInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockPipelineInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockPipelineInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedPipelineInterface.DeleteNamespacedCalls()) +func (mock *PipelineInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockPipelineInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockPipelineInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *PipelineInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.Pipeline, error) { + if mock.GetFunc == nil { + panic("PipelineInterfaceMock.GetFunc: method is nil but PipelineInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockPipelineInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockPipelineInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedPipelineInterface.GetCalls()) +func (mock *PipelineInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockPipelineInterfaceMockGet.RLock() + calls = mock.calls.Get + lockPipelineInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *PipelineInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.Pipeline, error) { + if mock.GetNamespacedFunc == nil { + panic("PipelineInterfaceMock.GetNamespacedFunc: method is nil but PipelineInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockPipelineInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockPipelineInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedPipelineInterface.GetNamespacedCalls()) +func (mock *PipelineInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockPipelineInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockPipelineInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *PipelineInterfaceMock) List(opts v1.ListOptions) (*v3.PipelineList, error) { + if mock.ListFunc == nil { + panic("PipelineInterfaceMock.ListFunc: method is nil but PipelineInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockPipelineInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockPipelineInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedPipelineInterface.ListCalls()) +func (mock *PipelineInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockPipelineInterfaceMockList.RLock() + calls = mock.calls.List + lockPipelineInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *PipelineInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("PipelineInterfaceMock.ObjectClientFunc: method is nil but PipelineInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockPipelineInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockPipelineInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedPipelineInterface.ObjectClientCalls()) +func (mock *PipelineInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockPipelineInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockPipelineInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *PipelineInterfaceMock) Update(in1 *v3.Pipeline) (*v3.Pipeline, error) { + if mock.UpdateFunc == nil { + panic("PipelineInterfaceMock.UpdateFunc: method is nil but PipelineInterface.Update was just called") + } + callInfo := struct { + In1 *v3.Pipeline + }{ + In1: in1, + } + lockPipelineInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockPipelineInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedPipelineInterface.UpdateCalls()) +func (mock *PipelineInterfaceMock) UpdateCalls() []struct { + In1 *v3.Pipeline +} { + var calls []struct { + In1 *v3.Pipeline + } + lockPipelineInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockPipelineInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *PipelineInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("PipelineInterfaceMock.WatchFunc: method is nil but PipelineInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockPipelineInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockPipelineInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedPipelineInterface.WatchCalls()) +func (mock *PipelineInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockPipelineInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockPipelineInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockPipelinesGetterMockPipelines sync.RWMutex +) + +// Ensure, that PipelinesGetterMock does implement PipelinesGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.PipelinesGetter = &PipelinesGetterMock{} + +// PipelinesGetterMock is a mock implementation of PipelinesGetter. +// +// func TestSomethingThatUsesPipelinesGetter(t *testing.T) { +// +// // make and configure a mocked PipelinesGetter +// mockedPipelinesGetter := &PipelinesGetterMock{ +// PipelinesFunc: func(namespace string) v3.PipelineInterface { +// panic("mock out the Pipelines method") +// }, +// } +// +// // use mockedPipelinesGetter in code that requires PipelinesGetter +// // and then make assertions. +// +// } +type PipelinesGetterMock struct { + // PipelinesFunc mocks the Pipelines method. + PipelinesFunc func(namespace string) v3.PipelineInterface + + // calls tracks calls to the methods. + calls struct { + // Pipelines holds details about calls to the Pipelines method. + Pipelines []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// Pipelines calls PipelinesFunc. +func (mock *PipelinesGetterMock) Pipelines(namespace string) v3.PipelineInterface { + if mock.PipelinesFunc == nil { + panic("PipelinesGetterMock.PipelinesFunc: method is nil but PipelinesGetter.Pipelines was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockPipelinesGetterMockPipelines.Lock() + mock.calls.Pipelines = append(mock.calls.Pipelines, callInfo) + lockPipelinesGetterMockPipelines.Unlock() + return mock.PipelinesFunc(namespace) +} + +// PipelinesCalls gets all the calls that were made to Pipelines. +// Check the length with: +// len(mockedPipelinesGetter.PipelinesCalls()) +func (mock *PipelinesGetterMock) PipelinesCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockPipelinesGetterMockPipelines.RLock() + calls = mock.calls.Pipelines + lockPipelinesGetterMockPipelines.RUnlock() + return calls +} diff --git a/apis/project.cattle.io/v3/fakes/zz_generated_pipeline_setting_mock_test.go b/apis/project.cattle.io/v3/fakes/zz_generated_pipeline_setting_mock_test.go new file mode 100644 index 00000000..f324a19a --- /dev/null +++ b/apis/project.cattle.io/v3/fakes/zz_generated_pipeline_setting_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/project.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockPipelineSettingListerMockGet sync.RWMutex + lockPipelineSettingListerMockList sync.RWMutex +) + +// Ensure, that PipelineSettingListerMock does implement PipelineSettingLister. +// If this is not the case, regenerate this file with moq. +var _ v3.PipelineSettingLister = &PipelineSettingListerMock{} + +// PipelineSettingListerMock is a mock implementation of PipelineSettingLister. +// +// func TestSomethingThatUsesPipelineSettingLister(t *testing.T) { +// +// // make and configure a mocked PipelineSettingLister +// mockedPipelineSettingLister := &PipelineSettingListerMock{ +// GetFunc: func(namespace string, name string) (*v3.PipelineSetting, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.PipelineSetting, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedPipelineSettingLister in code that requires PipelineSettingLister +// // and then make assertions. +// +// } +type PipelineSettingListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.PipelineSetting, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.PipelineSetting, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *PipelineSettingListerMock) Get(namespace string, name string) (*v3.PipelineSetting, error) { + if mock.GetFunc == nil { + panic("PipelineSettingListerMock.GetFunc: method is nil but PipelineSettingLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockPipelineSettingListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockPipelineSettingListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedPipelineSettingLister.GetCalls()) +func (mock *PipelineSettingListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockPipelineSettingListerMockGet.RLock() + calls = mock.calls.Get + lockPipelineSettingListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *PipelineSettingListerMock) List(namespace string, selector labels.Selector) ([]*v3.PipelineSetting, error) { + if mock.ListFunc == nil { + panic("PipelineSettingListerMock.ListFunc: method is nil but PipelineSettingLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockPipelineSettingListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockPipelineSettingListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedPipelineSettingLister.ListCalls()) +func (mock *PipelineSettingListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockPipelineSettingListerMockList.RLock() + calls = mock.calls.List + lockPipelineSettingListerMockList.RUnlock() + return calls +} + +var ( + lockPipelineSettingControllerMockAddClusterScopedHandler sync.RWMutex + lockPipelineSettingControllerMockAddHandler sync.RWMutex + lockPipelineSettingControllerMockEnqueue sync.RWMutex + lockPipelineSettingControllerMockGeneric sync.RWMutex + lockPipelineSettingControllerMockInformer sync.RWMutex + lockPipelineSettingControllerMockLister sync.RWMutex + lockPipelineSettingControllerMockStart sync.RWMutex + lockPipelineSettingControllerMockSync sync.RWMutex +) + +// Ensure, that PipelineSettingControllerMock does implement PipelineSettingController. +// If this is not the case, regenerate this file with moq. +var _ v3.PipelineSettingController = &PipelineSettingControllerMock{} + +// PipelineSettingControllerMock is a mock implementation of PipelineSettingController. +// +// func TestSomethingThatUsesPipelineSettingController(t *testing.T) { +// +// // make and configure a mocked PipelineSettingController +// mockedPipelineSettingController := &PipelineSettingControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.PipelineSettingHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.PipelineSettingHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.PipelineSettingLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedPipelineSettingController in code that requires PipelineSettingController +// // and then make assertions. +// +// } +type PipelineSettingControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.PipelineSettingHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.PipelineSettingHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.PipelineSettingLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.PipelineSettingHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.PipelineSettingHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *PipelineSettingControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.PipelineSettingHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("PipelineSettingControllerMock.AddClusterScopedHandlerFunc: method is nil but PipelineSettingController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.PipelineSettingHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockPipelineSettingControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockPipelineSettingControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedPipelineSettingController.AddClusterScopedHandlerCalls()) +func (mock *PipelineSettingControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.PipelineSettingHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.PipelineSettingHandlerFunc + } + lockPipelineSettingControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockPipelineSettingControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *PipelineSettingControllerMock) AddHandler(ctx context.Context, name string, handler v3.PipelineSettingHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("PipelineSettingControllerMock.AddHandlerFunc: method is nil but PipelineSettingController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.PipelineSettingHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockPipelineSettingControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockPipelineSettingControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedPipelineSettingController.AddHandlerCalls()) +func (mock *PipelineSettingControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.PipelineSettingHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.PipelineSettingHandlerFunc + } + lockPipelineSettingControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockPipelineSettingControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *PipelineSettingControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("PipelineSettingControllerMock.EnqueueFunc: method is nil but PipelineSettingController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockPipelineSettingControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockPipelineSettingControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedPipelineSettingController.EnqueueCalls()) +func (mock *PipelineSettingControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockPipelineSettingControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockPipelineSettingControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *PipelineSettingControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("PipelineSettingControllerMock.GenericFunc: method is nil but PipelineSettingController.Generic was just called") + } + callInfo := struct { + }{} + lockPipelineSettingControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockPipelineSettingControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedPipelineSettingController.GenericCalls()) +func (mock *PipelineSettingControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockPipelineSettingControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockPipelineSettingControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *PipelineSettingControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("PipelineSettingControllerMock.InformerFunc: method is nil but PipelineSettingController.Informer was just called") + } + callInfo := struct { + }{} + lockPipelineSettingControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockPipelineSettingControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedPipelineSettingController.InformerCalls()) +func (mock *PipelineSettingControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockPipelineSettingControllerMockInformer.RLock() + calls = mock.calls.Informer + lockPipelineSettingControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *PipelineSettingControllerMock) Lister() v3.PipelineSettingLister { + if mock.ListerFunc == nil { + panic("PipelineSettingControllerMock.ListerFunc: method is nil but PipelineSettingController.Lister was just called") + } + callInfo := struct { + }{} + lockPipelineSettingControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockPipelineSettingControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedPipelineSettingController.ListerCalls()) +func (mock *PipelineSettingControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockPipelineSettingControllerMockLister.RLock() + calls = mock.calls.Lister + lockPipelineSettingControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *PipelineSettingControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("PipelineSettingControllerMock.StartFunc: method is nil but PipelineSettingController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockPipelineSettingControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockPipelineSettingControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedPipelineSettingController.StartCalls()) +func (mock *PipelineSettingControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockPipelineSettingControllerMockStart.RLock() + calls = mock.calls.Start + lockPipelineSettingControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *PipelineSettingControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("PipelineSettingControllerMock.SyncFunc: method is nil but PipelineSettingController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockPipelineSettingControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockPipelineSettingControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedPipelineSettingController.SyncCalls()) +func (mock *PipelineSettingControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockPipelineSettingControllerMockSync.RLock() + calls = mock.calls.Sync + lockPipelineSettingControllerMockSync.RUnlock() + return calls +} + +var ( + lockPipelineSettingInterfaceMockAddClusterScopedHandler sync.RWMutex + lockPipelineSettingInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockPipelineSettingInterfaceMockAddHandler sync.RWMutex + lockPipelineSettingInterfaceMockAddLifecycle sync.RWMutex + lockPipelineSettingInterfaceMockController sync.RWMutex + lockPipelineSettingInterfaceMockCreate sync.RWMutex + lockPipelineSettingInterfaceMockDelete sync.RWMutex + lockPipelineSettingInterfaceMockDeleteCollection sync.RWMutex + lockPipelineSettingInterfaceMockDeleteNamespaced sync.RWMutex + lockPipelineSettingInterfaceMockGet sync.RWMutex + lockPipelineSettingInterfaceMockGetNamespaced sync.RWMutex + lockPipelineSettingInterfaceMockList sync.RWMutex + lockPipelineSettingInterfaceMockObjectClient sync.RWMutex + lockPipelineSettingInterfaceMockUpdate sync.RWMutex + lockPipelineSettingInterfaceMockWatch sync.RWMutex +) + +// Ensure, that PipelineSettingInterfaceMock does implement PipelineSettingInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.PipelineSettingInterface = &PipelineSettingInterfaceMock{} + +// PipelineSettingInterfaceMock is a mock implementation of PipelineSettingInterface. +// +// func TestSomethingThatUsesPipelineSettingInterface(t *testing.T) { +// +// // make and configure a mocked PipelineSettingInterface +// mockedPipelineSettingInterface := &PipelineSettingInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.PipelineSettingHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.PipelineSettingLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.PipelineSettingHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.PipelineSettingLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.PipelineSettingController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.PipelineSetting) (*v3.PipelineSetting, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.PipelineSetting, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.PipelineSetting, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.PipelineSettingList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.PipelineSetting) (*v3.PipelineSetting, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedPipelineSettingInterface in code that requires PipelineSettingInterface +// // and then make assertions. +// +// } +type PipelineSettingInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.PipelineSettingHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.PipelineSettingLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.PipelineSettingHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.PipelineSettingLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.PipelineSettingController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.PipelineSetting) (*v3.PipelineSetting, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.PipelineSetting, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.PipelineSetting, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.PipelineSettingList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.PipelineSetting) (*v3.PipelineSetting, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.PipelineSettingHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.PipelineSettingLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.PipelineSettingHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.PipelineSettingLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.PipelineSetting + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.PipelineSetting + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *PipelineSettingInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.PipelineSettingHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("PipelineSettingInterfaceMock.AddClusterScopedHandlerFunc: method is nil but PipelineSettingInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.PipelineSettingHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockPipelineSettingInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockPipelineSettingInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedPipelineSettingInterface.AddClusterScopedHandlerCalls()) +func (mock *PipelineSettingInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.PipelineSettingHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.PipelineSettingHandlerFunc + } + lockPipelineSettingInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockPipelineSettingInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *PipelineSettingInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.PipelineSettingLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("PipelineSettingInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but PipelineSettingInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.PipelineSettingLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockPipelineSettingInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockPipelineSettingInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedPipelineSettingInterface.AddClusterScopedLifecycleCalls()) +func (mock *PipelineSettingInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.PipelineSettingLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.PipelineSettingLifecycle + } + lockPipelineSettingInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockPipelineSettingInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *PipelineSettingInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.PipelineSettingHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("PipelineSettingInterfaceMock.AddHandlerFunc: method is nil but PipelineSettingInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.PipelineSettingHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockPipelineSettingInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockPipelineSettingInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedPipelineSettingInterface.AddHandlerCalls()) +func (mock *PipelineSettingInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.PipelineSettingHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.PipelineSettingHandlerFunc + } + lockPipelineSettingInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockPipelineSettingInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *PipelineSettingInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.PipelineSettingLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("PipelineSettingInterfaceMock.AddLifecycleFunc: method is nil but PipelineSettingInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.PipelineSettingLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockPipelineSettingInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockPipelineSettingInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedPipelineSettingInterface.AddLifecycleCalls()) +func (mock *PipelineSettingInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.PipelineSettingLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.PipelineSettingLifecycle + } + lockPipelineSettingInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockPipelineSettingInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *PipelineSettingInterfaceMock) Controller() v3.PipelineSettingController { + if mock.ControllerFunc == nil { + panic("PipelineSettingInterfaceMock.ControllerFunc: method is nil but PipelineSettingInterface.Controller was just called") + } + callInfo := struct { + }{} + lockPipelineSettingInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockPipelineSettingInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedPipelineSettingInterface.ControllerCalls()) +func (mock *PipelineSettingInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockPipelineSettingInterfaceMockController.RLock() + calls = mock.calls.Controller + lockPipelineSettingInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *PipelineSettingInterfaceMock) Create(in1 *v3.PipelineSetting) (*v3.PipelineSetting, error) { + if mock.CreateFunc == nil { + panic("PipelineSettingInterfaceMock.CreateFunc: method is nil but PipelineSettingInterface.Create was just called") + } + callInfo := struct { + In1 *v3.PipelineSetting + }{ + In1: in1, + } + lockPipelineSettingInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockPipelineSettingInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedPipelineSettingInterface.CreateCalls()) +func (mock *PipelineSettingInterfaceMock) CreateCalls() []struct { + In1 *v3.PipelineSetting +} { + var calls []struct { + In1 *v3.PipelineSetting + } + lockPipelineSettingInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockPipelineSettingInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *PipelineSettingInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("PipelineSettingInterfaceMock.DeleteFunc: method is nil but PipelineSettingInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockPipelineSettingInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockPipelineSettingInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedPipelineSettingInterface.DeleteCalls()) +func (mock *PipelineSettingInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockPipelineSettingInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockPipelineSettingInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *PipelineSettingInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("PipelineSettingInterfaceMock.DeleteCollectionFunc: method is nil but PipelineSettingInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockPipelineSettingInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockPipelineSettingInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedPipelineSettingInterface.DeleteCollectionCalls()) +func (mock *PipelineSettingInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockPipelineSettingInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockPipelineSettingInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *PipelineSettingInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("PipelineSettingInterfaceMock.DeleteNamespacedFunc: method is nil but PipelineSettingInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockPipelineSettingInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockPipelineSettingInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedPipelineSettingInterface.DeleteNamespacedCalls()) +func (mock *PipelineSettingInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockPipelineSettingInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockPipelineSettingInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *PipelineSettingInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.PipelineSetting, error) { + if mock.GetFunc == nil { + panic("PipelineSettingInterfaceMock.GetFunc: method is nil but PipelineSettingInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockPipelineSettingInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockPipelineSettingInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedPipelineSettingInterface.GetCalls()) +func (mock *PipelineSettingInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockPipelineSettingInterfaceMockGet.RLock() + calls = mock.calls.Get + lockPipelineSettingInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *PipelineSettingInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.PipelineSetting, error) { + if mock.GetNamespacedFunc == nil { + panic("PipelineSettingInterfaceMock.GetNamespacedFunc: method is nil but PipelineSettingInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockPipelineSettingInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockPipelineSettingInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedPipelineSettingInterface.GetNamespacedCalls()) +func (mock *PipelineSettingInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockPipelineSettingInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockPipelineSettingInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *PipelineSettingInterfaceMock) List(opts v1.ListOptions) (*v3.PipelineSettingList, error) { + if mock.ListFunc == nil { + panic("PipelineSettingInterfaceMock.ListFunc: method is nil but PipelineSettingInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockPipelineSettingInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockPipelineSettingInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedPipelineSettingInterface.ListCalls()) +func (mock *PipelineSettingInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockPipelineSettingInterfaceMockList.RLock() + calls = mock.calls.List + lockPipelineSettingInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *PipelineSettingInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("PipelineSettingInterfaceMock.ObjectClientFunc: method is nil but PipelineSettingInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockPipelineSettingInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockPipelineSettingInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedPipelineSettingInterface.ObjectClientCalls()) +func (mock *PipelineSettingInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockPipelineSettingInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockPipelineSettingInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *PipelineSettingInterfaceMock) Update(in1 *v3.PipelineSetting) (*v3.PipelineSetting, error) { + if mock.UpdateFunc == nil { + panic("PipelineSettingInterfaceMock.UpdateFunc: method is nil but PipelineSettingInterface.Update was just called") + } + callInfo := struct { + In1 *v3.PipelineSetting + }{ + In1: in1, + } + lockPipelineSettingInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockPipelineSettingInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedPipelineSettingInterface.UpdateCalls()) +func (mock *PipelineSettingInterfaceMock) UpdateCalls() []struct { + In1 *v3.PipelineSetting +} { + var calls []struct { + In1 *v3.PipelineSetting + } + lockPipelineSettingInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockPipelineSettingInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *PipelineSettingInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("PipelineSettingInterfaceMock.WatchFunc: method is nil but PipelineSettingInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockPipelineSettingInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockPipelineSettingInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedPipelineSettingInterface.WatchCalls()) +func (mock *PipelineSettingInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockPipelineSettingInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockPipelineSettingInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockPipelineSettingsGetterMockPipelineSettings sync.RWMutex +) + +// Ensure, that PipelineSettingsGetterMock does implement PipelineSettingsGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.PipelineSettingsGetter = &PipelineSettingsGetterMock{} + +// PipelineSettingsGetterMock is a mock implementation of PipelineSettingsGetter. +// +// func TestSomethingThatUsesPipelineSettingsGetter(t *testing.T) { +// +// // make and configure a mocked PipelineSettingsGetter +// mockedPipelineSettingsGetter := &PipelineSettingsGetterMock{ +// PipelineSettingsFunc: func(namespace string) v3.PipelineSettingInterface { +// panic("mock out the PipelineSettings method") +// }, +// } +// +// // use mockedPipelineSettingsGetter in code that requires PipelineSettingsGetter +// // and then make assertions. +// +// } +type PipelineSettingsGetterMock struct { + // PipelineSettingsFunc mocks the PipelineSettings method. + PipelineSettingsFunc func(namespace string) v3.PipelineSettingInterface + + // calls tracks calls to the methods. + calls struct { + // PipelineSettings holds details about calls to the PipelineSettings method. + PipelineSettings []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// PipelineSettings calls PipelineSettingsFunc. +func (mock *PipelineSettingsGetterMock) PipelineSettings(namespace string) v3.PipelineSettingInterface { + if mock.PipelineSettingsFunc == nil { + panic("PipelineSettingsGetterMock.PipelineSettingsFunc: method is nil but PipelineSettingsGetter.PipelineSettings was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockPipelineSettingsGetterMockPipelineSettings.Lock() + mock.calls.PipelineSettings = append(mock.calls.PipelineSettings, callInfo) + lockPipelineSettingsGetterMockPipelineSettings.Unlock() + return mock.PipelineSettingsFunc(namespace) +} + +// PipelineSettingsCalls gets all the calls that were made to PipelineSettings. +// Check the length with: +// len(mockedPipelineSettingsGetter.PipelineSettingsCalls()) +func (mock *PipelineSettingsGetterMock) PipelineSettingsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockPipelineSettingsGetterMockPipelineSettings.RLock() + calls = mock.calls.PipelineSettings + lockPipelineSettingsGetterMockPipelineSettings.RUnlock() + return calls +} diff --git a/apis/project.cattle.io/v3/fakes/zz_generated_service_account_token_mock_test.go b/apis/project.cattle.io/v3/fakes/zz_generated_service_account_token_mock_test.go new file mode 100644 index 00000000..4a972d8c --- /dev/null +++ b/apis/project.cattle.io/v3/fakes/zz_generated_service_account_token_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/project.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockServiceAccountTokenListerMockGet sync.RWMutex + lockServiceAccountTokenListerMockList sync.RWMutex +) + +// Ensure, that ServiceAccountTokenListerMock does implement ServiceAccountTokenLister. +// If this is not the case, regenerate this file with moq. +var _ v3.ServiceAccountTokenLister = &ServiceAccountTokenListerMock{} + +// ServiceAccountTokenListerMock is a mock implementation of ServiceAccountTokenLister. +// +// func TestSomethingThatUsesServiceAccountTokenLister(t *testing.T) { +// +// // make and configure a mocked ServiceAccountTokenLister +// mockedServiceAccountTokenLister := &ServiceAccountTokenListerMock{ +// GetFunc: func(namespace string, name string) (*v3.ServiceAccountToken, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.ServiceAccountToken, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedServiceAccountTokenLister in code that requires ServiceAccountTokenLister +// // and then make assertions. +// +// } +type ServiceAccountTokenListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.ServiceAccountToken, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.ServiceAccountToken, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *ServiceAccountTokenListerMock) Get(namespace string, name string) (*v3.ServiceAccountToken, error) { + if mock.GetFunc == nil { + panic("ServiceAccountTokenListerMock.GetFunc: method is nil but ServiceAccountTokenLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockServiceAccountTokenListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockServiceAccountTokenListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedServiceAccountTokenLister.GetCalls()) +func (mock *ServiceAccountTokenListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockServiceAccountTokenListerMockGet.RLock() + calls = mock.calls.Get + lockServiceAccountTokenListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ServiceAccountTokenListerMock) List(namespace string, selector labels.Selector) ([]*v3.ServiceAccountToken, error) { + if mock.ListFunc == nil { + panic("ServiceAccountTokenListerMock.ListFunc: method is nil but ServiceAccountTokenLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockServiceAccountTokenListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockServiceAccountTokenListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedServiceAccountTokenLister.ListCalls()) +func (mock *ServiceAccountTokenListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockServiceAccountTokenListerMockList.RLock() + calls = mock.calls.List + lockServiceAccountTokenListerMockList.RUnlock() + return calls +} + +var ( + lockServiceAccountTokenControllerMockAddClusterScopedHandler sync.RWMutex + lockServiceAccountTokenControllerMockAddHandler sync.RWMutex + lockServiceAccountTokenControllerMockEnqueue sync.RWMutex + lockServiceAccountTokenControllerMockGeneric sync.RWMutex + lockServiceAccountTokenControllerMockInformer sync.RWMutex + lockServiceAccountTokenControllerMockLister sync.RWMutex + lockServiceAccountTokenControllerMockStart sync.RWMutex + lockServiceAccountTokenControllerMockSync sync.RWMutex +) + +// Ensure, that ServiceAccountTokenControllerMock does implement ServiceAccountTokenController. +// If this is not the case, regenerate this file with moq. +var _ v3.ServiceAccountTokenController = &ServiceAccountTokenControllerMock{} + +// ServiceAccountTokenControllerMock is a mock implementation of ServiceAccountTokenController. +// +// func TestSomethingThatUsesServiceAccountTokenController(t *testing.T) { +// +// // make and configure a mocked ServiceAccountTokenController +// mockedServiceAccountTokenController := &ServiceAccountTokenControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.ServiceAccountTokenHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.ServiceAccountTokenHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.ServiceAccountTokenLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedServiceAccountTokenController in code that requires ServiceAccountTokenController +// // and then make assertions. +// +// } +type ServiceAccountTokenControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.ServiceAccountTokenHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.ServiceAccountTokenHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.ServiceAccountTokenLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.ServiceAccountTokenHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.ServiceAccountTokenHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ServiceAccountTokenControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.ServiceAccountTokenHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ServiceAccountTokenControllerMock.AddClusterScopedHandlerFunc: method is nil but ServiceAccountTokenController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ServiceAccountTokenHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockServiceAccountTokenControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockServiceAccountTokenControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedServiceAccountTokenController.AddClusterScopedHandlerCalls()) +func (mock *ServiceAccountTokenControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ServiceAccountTokenHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.ServiceAccountTokenHandlerFunc + } + lockServiceAccountTokenControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockServiceAccountTokenControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ServiceAccountTokenControllerMock) AddHandler(ctx context.Context, name string, handler v3.ServiceAccountTokenHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ServiceAccountTokenControllerMock.AddHandlerFunc: method is nil but ServiceAccountTokenController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.ServiceAccountTokenHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockServiceAccountTokenControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockServiceAccountTokenControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedServiceAccountTokenController.AddHandlerCalls()) +func (mock *ServiceAccountTokenControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.ServiceAccountTokenHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.ServiceAccountTokenHandlerFunc + } + lockServiceAccountTokenControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockServiceAccountTokenControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *ServiceAccountTokenControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("ServiceAccountTokenControllerMock.EnqueueFunc: method is nil but ServiceAccountTokenController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockServiceAccountTokenControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockServiceAccountTokenControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedServiceAccountTokenController.EnqueueCalls()) +func (mock *ServiceAccountTokenControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockServiceAccountTokenControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockServiceAccountTokenControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *ServiceAccountTokenControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("ServiceAccountTokenControllerMock.GenericFunc: method is nil but ServiceAccountTokenController.Generic was just called") + } + callInfo := struct { + }{} + lockServiceAccountTokenControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockServiceAccountTokenControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedServiceAccountTokenController.GenericCalls()) +func (mock *ServiceAccountTokenControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockServiceAccountTokenControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockServiceAccountTokenControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *ServiceAccountTokenControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("ServiceAccountTokenControllerMock.InformerFunc: method is nil but ServiceAccountTokenController.Informer was just called") + } + callInfo := struct { + }{} + lockServiceAccountTokenControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockServiceAccountTokenControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedServiceAccountTokenController.InformerCalls()) +func (mock *ServiceAccountTokenControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockServiceAccountTokenControllerMockInformer.RLock() + calls = mock.calls.Informer + lockServiceAccountTokenControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *ServiceAccountTokenControllerMock) Lister() v3.ServiceAccountTokenLister { + if mock.ListerFunc == nil { + panic("ServiceAccountTokenControllerMock.ListerFunc: method is nil but ServiceAccountTokenController.Lister was just called") + } + callInfo := struct { + }{} + lockServiceAccountTokenControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockServiceAccountTokenControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedServiceAccountTokenController.ListerCalls()) +func (mock *ServiceAccountTokenControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockServiceAccountTokenControllerMockLister.RLock() + calls = mock.calls.Lister + lockServiceAccountTokenControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *ServiceAccountTokenControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("ServiceAccountTokenControllerMock.StartFunc: method is nil but ServiceAccountTokenController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockServiceAccountTokenControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockServiceAccountTokenControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedServiceAccountTokenController.StartCalls()) +func (mock *ServiceAccountTokenControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockServiceAccountTokenControllerMockStart.RLock() + calls = mock.calls.Start + lockServiceAccountTokenControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *ServiceAccountTokenControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("ServiceAccountTokenControllerMock.SyncFunc: method is nil but ServiceAccountTokenController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockServiceAccountTokenControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockServiceAccountTokenControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedServiceAccountTokenController.SyncCalls()) +func (mock *ServiceAccountTokenControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockServiceAccountTokenControllerMockSync.RLock() + calls = mock.calls.Sync + lockServiceAccountTokenControllerMockSync.RUnlock() + return calls +} + +var ( + lockServiceAccountTokenInterfaceMockAddClusterScopedHandler sync.RWMutex + lockServiceAccountTokenInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockServiceAccountTokenInterfaceMockAddHandler sync.RWMutex + lockServiceAccountTokenInterfaceMockAddLifecycle sync.RWMutex + lockServiceAccountTokenInterfaceMockController sync.RWMutex + lockServiceAccountTokenInterfaceMockCreate sync.RWMutex + lockServiceAccountTokenInterfaceMockDelete sync.RWMutex + lockServiceAccountTokenInterfaceMockDeleteCollection sync.RWMutex + lockServiceAccountTokenInterfaceMockDeleteNamespaced sync.RWMutex + lockServiceAccountTokenInterfaceMockGet sync.RWMutex + lockServiceAccountTokenInterfaceMockGetNamespaced sync.RWMutex + lockServiceAccountTokenInterfaceMockList sync.RWMutex + lockServiceAccountTokenInterfaceMockObjectClient sync.RWMutex + lockServiceAccountTokenInterfaceMockUpdate sync.RWMutex + lockServiceAccountTokenInterfaceMockWatch sync.RWMutex +) + +// Ensure, that ServiceAccountTokenInterfaceMock does implement ServiceAccountTokenInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.ServiceAccountTokenInterface = &ServiceAccountTokenInterfaceMock{} + +// ServiceAccountTokenInterfaceMock is a mock implementation of ServiceAccountTokenInterface. +// +// func TestSomethingThatUsesServiceAccountTokenInterface(t *testing.T) { +// +// // make and configure a mocked ServiceAccountTokenInterface +// mockedServiceAccountTokenInterface := &ServiceAccountTokenInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.ServiceAccountTokenHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.ServiceAccountTokenLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.ServiceAccountTokenHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.ServiceAccountTokenLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.ServiceAccountTokenController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.ServiceAccountToken) (*v3.ServiceAccountToken, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.ServiceAccountToken, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.ServiceAccountToken, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.ServiceAccountTokenList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.ServiceAccountToken) (*v3.ServiceAccountToken, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedServiceAccountTokenInterface in code that requires ServiceAccountTokenInterface +// // and then make assertions. +// +// } +type ServiceAccountTokenInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.ServiceAccountTokenHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.ServiceAccountTokenLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.ServiceAccountTokenHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.ServiceAccountTokenLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.ServiceAccountTokenController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.ServiceAccountToken) (*v3.ServiceAccountToken, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.ServiceAccountToken, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.ServiceAccountToken, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.ServiceAccountTokenList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.ServiceAccountToken) (*v3.ServiceAccountToken, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.ServiceAccountTokenHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.ServiceAccountTokenLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.ServiceAccountTokenHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.ServiceAccountTokenLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.ServiceAccountToken + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.ServiceAccountToken + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ServiceAccountTokenInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.ServiceAccountTokenHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ServiceAccountTokenInterfaceMock.AddClusterScopedHandlerFunc: method is nil but ServiceAccountTokenInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ServiceAccountTokenHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockServiceAccountTokenInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockServiceAccountTokenInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedServiceAccountTokenInterface.AddClusterScopedHandlerCalls()) +func (mock *ServiceAccountTokenInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ServiceAccountTokenHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.ServiceAccountTokenHandlerFunc + } + lockServiceAccountTokenInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockServiceAccountTokenInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *ServiceAccountTokenInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.ServiceAccountTokenLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("ServiceAccountTokenInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but ServiceAccountTokenInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ServiceAccountTokenLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockServiceAccountTokenInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockServiceAccountTokenInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedServiceAccountTokenInterface.AddClusterScopedLifecycleCalls()) +func (mock *ServiceAccountTokenInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ServiceAccountTokenLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.ServiceAccountTokenLifecycle + } + lockServiceAccountTokenInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockServiceAccountTokenInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ServiceAccountTokenInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.ServiceAccountTokenHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ServiceAccountTokenInterfaceMock.AddHandlerFunc: method is nil but ServiceAccountTokenInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.ServiceAccountTokenHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockServiceAccountTokenInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockServiceAccountTokenInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedServiceAccountTokenInterface.AddHandlerCalls()) +func (mock *ServiceAccountTokenInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.ServiceAccountTokenHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.ServiceAccountTokenHandlerFunc + } + lockServiceAccountTokenInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockServiceAccountTokenInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *ServiceAccountTokenInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.ServiceAccountTokenLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("ServiceAccountTokenInterfaceMock.AddLifecycleFunc: method is nil but ServiceAccountTokenInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.ServiceAccountTokenLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockServiceAccountTokenInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockServiceAccountTokenInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedServiceAccountTokenInterface.AddLifecycleCalls()) +func (mock *ServiceAccountTokenInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.ServiceAccountTokenLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.ServiceAccountTokenLifecycle + } + lockServiceAccountTokenInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockServiceAccountTokenInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *ServiceAccountTokenInterfaceMock) Controller() v3.ServiceAccountTokenController { + if mock.ControllerFunc == nil { + panic("ServiceAccountTokenInterfaceMock.ControllerFunc: method is nil but ServiceAccountTokenInterface.Controller was just called") + } + callInfo := struct { + }{} + lockServiceAccountTokenInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockServiceAccountTokenInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedServiceAccountTokenInterface.ControllerCalls()) +func (mock *ServiceAccountTokenInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockServiceAccountTokenInterfaceMockController.RLock() + calls = mock.calls.Controller + lockServiceAccountTokenInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *ServiceAccountTokenInterfaceMock) Create(in1 *v3.ServiceAccountToken) (*v3.ServiceAccountToken, error) { + if mock.CreateFunc == nil { + panic("ServiceAccountTokenInterfaceMock.CreateFunc: method is nil but ServiceAccountTokenInterface.Create was just called") + } + callInfo := struct { + In1 *v3.ServiceAccountToken + }{ + In1: in1, + } + lockServiceAccountTokenInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockServiceAccountTokenInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedServiceAccountTokenInterface.CreateCalls()) +func (mock *ServiceAccountTokenInterfaceMock) CreateCalls() []struct { + In1 *v3.ServiceAccountToken +} { + var calls []struct { + In1 *v3.ServiceAccountToken + } + lockServiceAccountTokenInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockServiceAccountTokenInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *ServiceAccountTokenInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("ServiceAccountTokenInterfaceMock.DeleteFunc: method is nil but ServiceAccountTokenInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockServiceAccountTokenInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockServiceAccountTokenInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedServiceAccountTokenInterface.DeleteCalls()) +func (mock *ServiceAccountTokenInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockServiceAccountTokenInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockServiceAccountTokenInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *ServiceAccountTokenInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("ServiceAccountTokenInterfaceMock.DeleteCollectionFunc: method is nil but ServiceAccountTokenInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockServiceAccountTokenInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockServiceAccountTokenInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedServiceAccountTokenInterface.DeleteCollectionCalls()) +func (mock *ServiceAccountTokenInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockServiceAccountTokenInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockServiceAccountTokenInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *ServiceAccountTokenInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("ServiceAccountTokenInterfaceMock.DeleteNamespacedFunc: method is nil but ServiceAccountTokenInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockServiceAccountTokenInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockServiceAccountTokenInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedServiceAccountTokenInterface.DeleteNamespacedCalls()) +func (mock *ServiceAccountTokenInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockServiceAccountTokenInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockServiceAccountTokenInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *ServiceAccountTokenInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.ServiceAccountToken, error) { + if mock.GetFunc == nil { + panic("ServiceAccountTokenInterfaceMock.GetFunc: method is nil but ServiceAccountTokenInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockServiceAccountTokenInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockServiceAccountTokenInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedServiceAccountTokenInterface.GetCalls()) +func (mock *ServiceAccountTokenInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockServiceAccountTokenInterfaceMockGet.RLock() + calls = mock.calls.Get + lockServiceAccountTokenInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *ServiceAccountTokenInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.ServiceAccountToken, error) { + if mock.GetNamespacedFunc == nil { + panic("ServiceAccountTokenInterfaceMock.GetNamespacedFunc: method is nil but ServiceAccountTokenInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockServiceAccountTokenInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockServiceAccountTokenInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedServiceAccountTokenInterface.GetNamespacedCalls()) +func (mock *ServiceAccountTokenInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockServiceAccountTokenInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockServiceAccountTokenInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ServiceAccountTokenInterfaceMock) List(opts v1.ListOptions) (*v3.ServiceAccountTokenList, error) { + if mock.ListFunc == nil { + panic("ServiceAccountTokenInterfaceMock.ListFunc: method is nil but ServiceAccountTokenInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockServiceAccountTokenInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockServiceAccountTokenInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedServiceAccountTokenInterface.ListCalls()) +func (mock *ServiceAccountTokenInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockServiceAccountTokenInterfaceMockList.RLock() + calls = mock.calls.List + lockServiceAccountTokenInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *ServiceAccountTokenInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("ServiceAccountTokenInterfaceMock.ObjectClientFunc: method is nil but ServiceAccountTokenInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockServiceAccountTokenInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockServiceAccountTokenInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedServiceAccountTokenInterface.ObjectClientCalls()) +func (mock *ServiceAccountTokenInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockServiceAccountTokenInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockServiceAccountTokenInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *ServiceAccountTokenInterfaceMock) Update(in1 *v3.ServiceAccountToken) (*v3.ServiceAccountToken, error) { + if mock.UpdateFunc == nil { + panic("ServiceAccountTokenInterfaceMock.UpdateFunc: method is nil but ServiceAccountTokenInterface.Update was just called") + } + callInfo := struct { + In1 *v3.ServiceAccountToken + }{ + In1: in1, + } + lockServiceAccountTokenInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockServiceAccountTokenInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedServiceAccountTokenInterface.UpdateCalls()) +func (mock *ServiceAccountTokenInterfaceMock) UpdateCalls() []struct { + In1 *v3.ServiceAccountToken +} { + var calls []struct { + In1 *v3.ServiceAccountToken + } + lockServiceAccountTokenInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockServiceAccountTokenInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *ServiceAccountTokenInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("ServiceAccountTokenInterfaceMock.WatchFunc: method is nil but ServiceAccountTokenInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockServiceAccountTokenInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockServiceAccountTokenInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedServiceAccountTokenInterface.WatchCalls()) +func (mock *ServiceAccountTokenInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockServiceAccountTokenInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockServiceAccountTokenInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockServiceAccountTokensGetterMockServiceAccountTokens sync.RWMutex +) + +// Ensure, that ServiceAccountTokensGetterMock does implement ServiceAccountTokensGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.ServiceAccountTokensGetter = &ServiceAccountTokensGetterMock{} + +// ServiceAccountTokensGetterMock is a mock implementation of ServiceAccountTokensGetter. +// +// func TestSomethingThatUsesServiceAccountTokensGetter(t *testing.T) { +// +// // make and configure a mocked ServiceAccountTokensGetter +// mockedServiceAccountTokensGetter := &ServiceAccountTokensGetterMock{ +// ServiceAccountTokensFunc: func(namespace string) v3.ServiceAccountTokenInterface { +// panic("mock out the ServiceAccountTokens method") +// }, +// } +// +// // use mockedServiceAccountTokensGetter in code that requires ServiceAccountTokensGetter +// // and then make assertions. +// +// } +type ServiceAccountTokensGetterMock struct { + // ServiceAccountTokensFunc mocks the ServiceAccountTokens method. + ServiceAccountTokensFunc func(namespace string) v3.ServiceAccountTokenInterface + + // calls tracks calls to the methods. + calls struct { + // ServiceAccountTokens holds details about calls to the ServiceAccountTokens method. + ServiceAccountTokens []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// ServiceAccountTokens calls ServiceAccountTokensFunc. +func (mock *ServiceAccountTokensGetterMock) ServiceAccountTokens(namespace string) v3.ServiceAccountTokenInterface { + if mock.ServiceAccountTokensFunc == nil { + panic("ServiceAccountTokensGetterMock.ServiceAccountTokensFunc: method is nil but ServiceAccountTokensGetter.ServiceAccountTokens was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockServiceAccountTokensGetterMockServiceAccountTokens.Lock() + mock.calls.ServiceAccountTokens = append(mock.calls.ServiceAccountTokens, callInfo) + lockServiceAccountTokensGetterMockServiceAccountTokens.Unlock() + return mock.ServiceAccountTokensFunc(namespace) +} + +// ServiceAccountTokensCalls gets all the calls that were made to ServiceAccountTokens. +// Check the length with: +// len(mockedServiceAccountTokensGetter.ServiceAccountTokensCalls()) +func (mock *ServiceAccountTokensGetterMock) ServiceAccountTokensCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockServiceAccountTokensGetterMockServiceAccountTokens.RLock() + calls = mock.calls.ServiceAccountTokens + lockServiceAccountTokensGetterMockServiceAccountTokens.RUnlock() + return calls +} diff --git a/apis/project.cattle.io/v3/fakes/zz_generated_source_code_credential_mock_test.go b/apis/project.cattle.io/v3/fakes/zz_generated_source_code_credential_mock_test.go new file mode 100644 index 00000000..1fae32b4 --- /dev/null +++ b/apis/project.cattle.io/v3/fakes/zz_generated_source_code_credential_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/project.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockSourceCodeCredentialListerMockGet sync.RWMutex + lockSourceCodeCredentialListerMockList sync.RWMutex +) + +// Ensure, that SourceCodeCredentialListerMock does implement SourceCodeCredentialLister. +// If this is not the case, regenerate this file with moq. +var _ v3.SourceCodeCredentialLister = &SourceCodeCredentialListerMock{} + +// SourceCodeCredentialListerMock is a mock implementation of SourceCodeCredentialLister. +// +// func TestSomethingThatUsesSourceCodeCredentialLister(t *testing.T) { +// +// // make and configure a mocked SourceCodeCredentialLister +// mockedSourceCodeCredentialLister := &SourceCodeCredentialListerMock{ +// GetFunc: func(namespace string, name string) (*v3.SourceCodeCredential, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.SourceCodeCredential, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedSourceCodeCredentialLister in code that requires SourceCodeCredentialLister +// // and then make assertions. +// +// } +type SourceCodeCredentialListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.SourceCodeCredential, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.SourceCodeCredential, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *SourceCodeCredentialListerMock) Get(namespace string, name string) (*v3.SourceCodeCredential, error) { + if mock.GetFunc == nil { + panic("SourceCodeCredentialListerMock.GetFunc: method is nil but SourceCodeCredentialLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockSourceCodeCredentialListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockSourceCodeCredentialListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedSourceCodeCredentialLister.GetCalls()) +func (mock *SourceCodeCredentialListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockSourceCodeCredentialListerMockGet.RLock() + calls = mock.calls.Get + lockSourceCodeCredentialListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *SourceCodeCredentialListerMock) List(namespace string, selector labels.Selector) ([]*v3.SourceCodeCredential, error) { + if mock.ListFunc == nil { + panic("SourceCodeCredentialListerMock.ListFunc: method is nil but SourceCodeCredentialLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockSourceCodeCredentialListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockSourceCodeCredentialListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedSourceCodeCredentialLister.ListCalls()) +func (mock *SourceCodeCredentialListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockSourceCodeCredentialListerMockList.RLock() + calls = mock.calls.List + lockSourceCodeCredentialListerMockList.RUnlock() + return calls +} + +var ( + lockSourceCodeCredentialControllerMockAddClusterScopedHandler sync.RWMutex + lockSourceCodeCredentialControllerMockAddHandler sync.RWMutex + lockSourceCodeCredentialControllerMockEnqueue sync.RWMutex + lockSourceCodeCredentialControllerMockGeneric sync.RWMutex + lockSourceCodeCredentialControllerMockInformer sync.RWMutex + lockSourceCodeCredentialControllerMockLister sync.RWMutex + lockSourceCodeCredentialControllerMockStart sync.RWMutex + lockSourceCodeCredentialControllerMockSync sync.RWMutex +) + +// Ensure, that SourceCodeCredentialControllerMock does implement SourceCodeCredentialController. +// If this is not the case, regenerate this file with moq. +var _ v3.SourceCodeCredentialController = &SourceCodeCredentialControllerMock{} + +// SourceCodeCredentialControllerMock is a mock implementation of SourceCodeCredentialController. +// +// func TestSomethingThatUsesSourceCodeCredentialController(t *testing.T) { +// +// // make and configure a mocked SourceCodeCredentialController +// mockedSourceCodeCredentialController := &SourceCodeCredentialControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.SourceCodeCredentialHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.SourceCodeCredentialHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.SourceCodeCredentialLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedSourceCodeCredentialController in code that requires SourceCodeCredentialController +// // and then make assertions. +// +// } +type SourceCodeCredentialControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.SourceCodeCredentialHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.SourceCodeCredentialHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.SourceCodeCredentialLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.SourceCodeCredentialHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.SourceCodeCredentialHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *SourceCodeCredentialControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.SourceCodeCredentialHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("SourceCodeCredentialControllerMock.AddClusterScopedHandlerFunc: method is nil but SourceCodeCredentialController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.SourceCodeCredentialHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockSourceCodeCredentialControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockSourceCodeCredentialControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedSourceCodeCredentialController.AddClusterScopedHandlerCalls()) +func (mock *SourceCodeCredentialControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.SourceCodeCredentialHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.SourceCodeCredentialHandlerFunc + } + lockSourceCodeCredentialControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockSourceCodeCredentialControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *SourceCodeCredentialControllerMock) AddHandler(ctx context.Context, name string, handler v3.SourceCodeCredentialHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("SourceCodeCredentialControllerMock.AddHandlerFunc: method is nil but SourceCodeCredentialController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.SourceCodeCredentialHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockSourceCodeCredentialControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockSourceCodeCredentialControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedSourceCodeCredentialController.AddHandlerCalls()) +func (mock *SourceCodeCredentialControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.SourceCodeCredentialHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.SourceCodeCredentialHandlerFunc + } + lockSourceCodeCredentialControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockSourceCodeCredentialControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *SourceCodeCredentialControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("SourceCodeCredentialControllerMock.EnqueueFunc: method is nil but SourceCodeCredentialController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockSourceCodeCredentialControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockSourceCodeCredentialControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedSourceCodeCredentialController.EnqueueCalls()) +func (mock *SourceCodeCredentialControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockSourceCodeCredentialControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockSourceCodeCredentialControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *SourceCodeCredentialControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("SourceCodeCredentialControllerMock.GenericFunc: method is nil but SourceCodeCredentialController.Generic was just called") + } + callInfo := struct { + }{} + lockSourceCodeCredentialControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockSourceCodeCredentialControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedSourceCodeCredentialController.GenericCalls()) +func (mock *SourceCodeCredentialControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockSourceCodeCredentialControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockSourceCodeCredentialControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *SourceCodeCredentialControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("SourceCodeCredentialControllerMock.InformerFunc: method is nil but SourceCodeCredentialController.Informer was just called") + } + callInfo := struct { + }{} + lockSourceCodeCredentialControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockSourceCodeCredentialControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedSourceCodeCredentialController.InformerCalls()) +func (mock *SourceCodeCredentialControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockSourceCodeCredentialControllerMockInformer.RLock() + calls = mock.calls.Informer + lockSourceCodeCredentialControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *SourceCodeCredentialControllerMock) Lister() v3.SourceCodeCredentialLister { + if mock.ListerFunc == nil { + panic("SourceCodeCredentialControllerMock.ListerFunc: method is nil but SourceCodeCredentialController.Lister was just called") + } + callInfo := struct { + }{} + lockSourceCodeCredentialControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockSourceCodeCredentialControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedSourceCodeCredentialController.ListerCalls()) +func (mock *SourceCodeCredentialControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockSourceCodeCredentialControllerMockLister.RLock() + calls = mock.calls.Lister + lockSourceCodeCredentialControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *SourceCodeCredentialControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("SourceCodeCredentialControllerMock.StartFunc: method is nil but SourceCodeCredentialController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockSourceCodeCredentialControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockSourceCodeCredentialControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedSourceCodeCredentialController.StartCalls()) +func (mock *SourceCodeCredentialControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockSourceCodeCredentialControllerMockStart.RLock() + calls = mock.calls.Start + lockSourceCodeCredentialControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *SourceCodeCredentialControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("SourceCodeCredentialControllerMock.SyncFunc: method is nil but SourceCodeCredentialController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockSourceCodeCredentialControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockSourceCodeCredentialControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedSourceCodeCredentialController.SyncCalls()) +func (mock *SourceCodeCredentialControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockSourceCodeCredentialControllerMockSync.RLock() + calls = mock.calls.Sync + lockSourceCodeCredentialControllerMockSync.RUnlock() + return calls +} + +var ( + lockSourceCodeCredentialInterfaceMockAddClusterScopedHandler sync.RWMutex + lockSourceCodeCredentialInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockSourceCodeCredentialInterfaceMockAddHandler sync.RWMutex + lockSourceCodeCredentialInterfaceMockAddLifecycle sync.RWMutex + lockSourceCodeCredentialInterfaceMockController sync.RWMutex + lockSourceCodeCredentialInterfaceMockCreate sync.RWMutex + lockSourceCodeCredentialInterfaceMockDelete sync.RWMutex + lockSourceCodeCredentialInterfaceMockDeleteCollection sync.RWMutex + lockSourceCodeCredentialInterfaceMockDeleteNamespaced sync.RWMutex + lockSourceCodeCredentialInterfaceMockGet sync.RWMutex + lockSourceCodeCredentialInterfaceMockGetNamespaced sync.RWMutex + lockSourceCodeCredentialInterfaceMockList sync.RWMutex + lockSourceCodeCredentialInterfaceMockObjectClient sync.RWMutex + lockSourceCodeCredentialInterfaceMockUpdate sync.RWMutex + lockSourceCodeCredentialInterfaceMockWatch sync.RWMutex +) + +// Ensure, that SourceCodeCredentialInterfaceMock does implement SourceCodeCredentialInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.SourceCodeCredentialInterface = &SourceCodeCredentialInterfaceMock{} + +// SourceCodeCredentialInterfaceMock is a mock implementation of SourceCodeCredentialInterface. +// +// func TestSomethingThatUsesSourceCodeCredentialInterface(t *testing.T) { +// +// // make and configure a mocked SourceCodeCredentialInterface +// mockedSourceCodeCredentialInterface := &SourceCodeCredentialInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.SourceCodeCredentialHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.SourceCodeCredentialLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.SourceCodeCredentialHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.SourceCodeCredentialLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.SourceCodeCredentialController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.SourceCodeCredential) (*v3.SourceCodeCredential, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.SourceCodeCredential, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.SourceCodeCredential, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.SourceCodeCredentialList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.SourceCodeCredential) (*v3.SourceCodeCredential, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedSourceCodeCredentialInterface in code that requires SourceCodeCredentialInterface +// // and then make assertions. +// +// } +type SourceCodeCredentialInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.SourceCodeCredentialHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.SourceCodeCredentialLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.SourceCodeCredentialHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.SourceCodeCredentialLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.SourceCodeCredentialController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.SourceCodeCredential) (*v3.SourceCodeCredential, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.SourceCodeCredential, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.SourceCodeCredential, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.SourceCodeCredentialList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.SourceCodeCredential) (*v3.SourceCodeCredential, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.SourceCodeCredentialHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.SourceCodeCredentialLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.SourceCodeCredentialHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.SourceCodeCredentialLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.SourceCodeCredential + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.SourceCodeCredential + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *SourceCodeCredentialInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.SourceCodeCredentialHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("SourceCodeCredentialInterfaceMock.AddClusterScopedHandlerFunc: method is nil but SourceCodeCredentialInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.SourceCodeCredentialHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockSourceCodeCredentialInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockSourceCodeCredentialInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedSourceCodeCredentialInterface.AddClusterScopedHandlerCalls()) +func (mock *SourceCodeCredentialInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.SourceCodeCredentialHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.SourceCodeCredentialHandlerFunc + } + lockSourceCodeCredentialInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockSourceCodeCredentialInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *SourceCodeCredentialInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.SourceCodeCredentialLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("SourceCodeCredentialInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but SourceCodeCredentialInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.SourceCodeCredentialLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockSourceCodeCredentialInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockSourceCodeCredentialInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedSourceCodeCredentialInterface.AddClusterScopedLifecycleCalls()) +func (mock *SourceCodeCredentialInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.SourceCodeCredentialLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.SourceCodeCredentialLifecycle + } + lockSourceCodeCredentialInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockSourceCodeCredentialInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *SourceCodeCredentialInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.SourceCodeCredentialHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("SourceCodeCredentialInterfaceMock.AddHandlerFunc: method is nil but SourceCodeCredentialInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.SourceCodeCredentialHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockSourceCodeCredentialInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockSourceCodeCredentialInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedSourceCodeCredentialInterface.AddHandlerCalls()) +func (mock *SourceCodeCredentialInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.SourceCodeCredentialHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.SourceCodeCredentialHandlerFunc + } + lockSourceCodeCredentialInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockSourceCodeCredentialInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *SourceCodeCredentialInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.SourceCodeCredentialLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("SourceCodeCredentialInterfaceMock.AddLifecycleFunc: method is nil but SourceCodeCredentialInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.SourceCodeCredentialLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockSourceCodeCredentialInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockSourceCodeCredentialInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedSourceCodeCredentialInterface.AddLifecycleCalls()) +func (mock *SourceCodeCredentialInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.SourceCodeCredentialLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.SourceCodeCredentialLifecycle + } + lockSourceCodeCredentialInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockSourceCodeCredentialInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *SourceCodeCredentialInterfaceMock) Controller() v3.SourceCodeCredentialController { + if mock.ControllerFunc == nil { + panic("SourceCodeCredentialInterfaceMock.ControllerFunc: method is nil but SourceCodeCredentialInterface.Controller was just called") + } + callInfo := struct { + }{} + lockSourceCodeCredentialInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockSourceCodeCredentialInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedSourceCodeCredentialInterface.ControllerCalls()) +func (mock *SourceCodeCredentialInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockSourceCodeCredentialInterfaceMockController.RLock() + calls = mock.calls.Controller + lockSourceCodeCredentialInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *SourceCodeCredentialInterfaceMock) Create(in1 *v3.SourceCodeCredential) (*v3.SourceCodeCredential, error) { + if mock.CreateFunc == nil { + panic("SourceCodeCredentialInterfaceMock.CreateFunc: method is nil but SourceCodeCredentialInterface.Create was just called") + } + callInfo := struct { + In1 *v3.SourceCodeCredential + }{ + In1: in1, + } + lockSourceCodeCredentialInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockSourceCodeCredentialInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedSourceCodeCredentialInterface.CreateCalls()) +func (mock *SourceCodeCredentialInterfaceMock) CreateCalls() []struct { + In1 *v3.SourceCodeCredential +} { + var calls []struct { + In1 *v3.SourceCodeCredential + } + lockSourceCodeCredentialInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockSourceCodeCredentialInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *SourceCodeCredentialInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("SourceCodeCredentialInterfaceMock.DeleteFunc: method is nil but SourceCodeCredentialInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockSourceCodeCredentialInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockSourceCodeCredentialInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedSourceCodeCredentialInterface.DeleteCalls()) +func (mock *SourceCodeCredentialInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockSourceCodeCredentialInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockSourceCodeCredentialInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *SourceCodeCredentialInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("SourceCodeCredentialInterfaceMock.DeleteCollectionFunc: method is nil but SourceCodeCredentialInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockSourceCodeCredentialInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockSourceCodeCredentialInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedSourceCodeCredentialInterface.DeleteCollectionCalls()) +func (mock *SourceCodeCredentialInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockSourceCodeCredentialInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockSourceCodeCredentialInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *SourceCodeCredentialInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("SourceCodeCredentialInterfaceMock.DeleteNamespacedFunc: method is nil but SourceCodeCredentialInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockSourceCodeCredentialInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockSourceCodeCredentialInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedSourceCodeCredentialInterface.DeleteNamespacedCalls()) +func (mock *SourceCodeCredentialInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockSourceCodeCredentialInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockSourceCodeCredentialInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *SourceCodeCredentialInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.SourceCodeCredential, error) { + if mock.GetFunc == nil { + panic("SourceCodeCredentialInterfaceMock.GetFunc: method is nil but SourceCodeCredentialInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockSourceCodeCredentialInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockSourceCodeCredentialInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedSourceCodeCredentialInterface.GetCalls()) +func (mock *SourceCodeCredentialInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockSourceCodeCredentialInterfaceMockGet.RLock() + calls = mock.calls.Get + lockSourceCodeCredentialInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *SourceCodeCredentialInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.SourceCodeCredential, error) { + if mock.GetNamespacedFunc == nil { + panic("SourceCodeCredentialInterfaceMock.GetNamespacedFunc: method is nil but SourceCodeCredentialInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockSourceCodeCredentialInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockSourceCodeCredentialInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedSourceCodeCredentialInterface.GetNamespacedCalls()) +func (mock *SourceCodeCredentialInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockSourceCodeCredentialInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockSourceCodeCredentialInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *SourceCodeCredentialInterfaceMock) List(opts v1.ListOptions) (*v3.SourceCodeCredentialList, error) { + if mock.ListFunc == nil { + panic("SourceCodeCredentialInterfaceMock.ListFunc: method is nil but SourceCodeCredentialInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockSourceCodeCredentialInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockSourceCodeCredentialInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedSourceCodeCredentialInterface.ListCalls()) +func (mock *SourceCodeCredentialInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockSourceCodeCredentialInterfaceMockList.RLock() + calls = mock.calls.List + lockSourceCodeCredentialInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *SourceCodeCredentialInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("SourceCodeCredentialInterfaceMock.ObjectClientFunc: method is nil but SourceCodeCredentialInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockSourceCodeCredentialInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockSourceCodeCredentialInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedSourceCodeCredentialInterface.ObjectClientCalls()) +func (mock *SourceCodeCredentialInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockSourceCodeCredentialInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockSourceCodeCredentialInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *SourceCodeCredentialInterfaceMock) Update(in1 *v3.SourceCodeCredential) (*v3.SourceCodeCredential, error) { + if mock.UpdateFunc == nil { + panic("SourceCodeCredentialInterfaceMock.UpdateFunc: method is nil but SourceCodeCredentialInterface.Update was just called") + } + callInfo := struct { + In1 *v3.SourceCodeCredential + }{ + In1: in1, + } + lockSourceCodeCredentialInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockSourceCodeCredentialInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedSourceCodeCredentialInterface.UpdateCalls()) +func (mock *SourceCodeCredentialInterfaceMock) UpdateCalls() []struct { + In1 *v3.SourceCodeCredential +} { + var calls []struct { + In1 *v3.SourceCodeCredential + } + lockSourceCodeCredentialInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockSourceCodeCredentialInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *SourceCodeCredentialInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("SourceCodeCredentialInterfaceMock.WatchFunc: method is nil but SourceCodeCredentialInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockSourceCodeCredentialInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockSourceCodeCredentialInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedSourceCodeCredentialInterface.WatchCalls()) +func (mock *SourceCodeCredentialInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockSourceCodeCredentialInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockSourceCodeCredentialInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockSourceCodeCredentialsGetterMockSourceCodeCredentials sync.RWMutex +) + +// Ensure, that SourceCodeCredentialsGetterMock does implement SourceCodeCredentialsGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.SourceCodeCredentialsGetter = &SourceCodeCredentialsGetterMock{} + +// SourceCodeCredentialsGetterMock is a mock implementation of SourceCodeCredentialsGetter. +// +// func TestSomethingThatUsesSourceCodeCredentialsGetter(t *testing.T) { +// +// // make and configure a mocked SourceCodeCredentialsGetter +// mockedSourceCodeCredentialsGetter := &SourceCodeCredentialsGetterMock{ +// SourceCodeCredentialsFunc: func(namespace string) v3.SourceCodeCredentialInterface { +// panic("mock out the SourceCodeCredentials method") +// }, +// } +// +// // use mockedSourceCodeCredentialsGetter in code that requires SourceCodeCredentialsGetter +// // and then make assertions. +// +// } +type SourceCodeCredentialsGetterMock struct { + // SourceCodeCredentialsFunc mocks the SourceCodeCredentials method. + SourceCodeCredentialsFunc func(namespace string) v3.SourceCodeCredentialInterface + + // calls tracks calls to the methods. + calls struct { + // SourceCodeCredentials holds details about calls to the SourceCodeCredentials method. + SourceCodeCredentials []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// SourceCodeCredentials calls SourceCodeCredentialsFunc. +func (mock *SourceCodeCredentialsGetterMock) SourceCodeCredentials(namespace string) v3.SourceCodeCredentialInterface { + if mock.SourceCodeCredentialsFunc == nil { + panic("SourceCodeCredentialsGetterMock.SourceCodeCredentialsFunc: method is nil but SourceCodeCredentialsGetter.SourceCodeCredentials was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockSourceCodeCredentialsGetterMockSourceCodeCredentials.Lock() + mock.calls.SourceCodeCredentials = append(mock.calls.SourceCodeCredentials, callInfo) + lockSourceCodeCredentialsGetterMockSourceCodeCredentials.Unlock() + return mock.SourceCodeCredentialsFunc(namespace) +} + +// SourceCodeCredentialsCalls gets all the calls that were made to SourceCodeCredentials. +// Check the length with: +// len(mockedSourceCodeCredentialsGetter.SourceCodeCredentialsCalls()) +func (mock *SourceCodeCredentialsGetterMock) SourceCodeCredentialsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockSourceCodeCredentialsGetterMockSourceCodeCredentials.RLock() + calls = mock.calls.SourceCodeCredentials + lockSourceCodeCredentialsGetterMockSourceCodeCredentials.RUnlock() + return calls +} diff --git a/apis/project.cattle.io/v3/fakes/zz_generated_source_code_provider_config_mock_test.go b/apis/project.cattle.io/v3/fakes/zz_generated_source_code_provider_config_mock_test.go new file mode 100644 index 00000000..9ddc8a42 --- /dev/null +++ b/apis/project.cattle.io/v3/fakes/zz_generated_source_code_provider_config_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/project.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockSourceCodeProviderConfigListerMockGet sync.RWMutex + lockSourceCodeProviderConfigListerMockList sync.RWMutex +) + +// Ensure, that SourceCodeProviderConfigListerMock does implement SourceCodeProviderConfigLister. +// If this is not the case, regenerate this file with moq. +var _ v3.SourceCodeProviderConfigLister = &SourceCodeProviderConfigListerMock{} + +// SourceCodeProviderConfigListerMock is a mock implementation of SourceCodeProviderConfigLister. +// +// func TestSomethingThatUsesSourceCodeProviderConfigLister(t *testing.T) { +// +// // make and configure a mocked SourceCodeProviderConfigLister +// mockedSourceCodeProviderConfigLister := &SourceCodeProviderConfigListerMock{ +// GetFunc: func(namespace string, name string) (*v3.SourceCodeProviderConfig, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.SourceCodeProviderConfig, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedSourceCodeProviderConfigLister in code that requires SourceCodeProviderConfigLister +// // and then make assertions. +// +// } +type SourceCodeProviderConfigListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.SourceCodeProviderConfig, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.SourceCodeProviderConfig, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *SourceCodeProviderConfigListerMock) Get(namespace string, name string) (*v3.SourceCodeProviderConfig, error) { + if mock.GetFunc == nil { + panic("SourceCodeProviderConfigListerMock.GetFunc: method is nil but SourceCodeProviderConfigLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockSourceCodeProviderConfigListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockSourceCodeProviderConfigListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedSourceCodeProviderConfigLister.GetCalls()) +func (mock *SourceCodeProviderConfigListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockSourceCodeProviderConfigListerMockGet.RLock() + calls = mock.calls.Get + lockSourceCodeProviderConfigListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *SourceCodeProviderConfigListerMock) List(namespace string, selector labels.Selector) ([]*v3.SourceCodeProviderConfig, error) { + if mock.ListFunc == nil { + panic("SourceCodeProviderConfigListerMock.ListFunc: method is nil but SourceCodeProviderConfigLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockSourceCodeProviderConfigListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockSourceCodeProviderConfigListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedSourceCodeProviderConfigLister.ListCalls()) +func (mock *SourceCodeProviderConfigListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockSourceCodeProviderConfigListerMockList.RLock() + calls = mock.calls.List + lockSourceCodeProviderConfigListerMockList.RUnlock() + return calls +} + +var ( + lockSourceCodeProviderConfigControllerMockAddClusterScopedHandler sync.RWMutex + lockSourceCodeProviderConfigControllerMockAddHandler sync.RWMutex + lockSourceCodeProviderConfigControllerMockEnqueue sync.RWMutex + lockSourceCodeProviderConfigControllerMockGeneric sync.RWMutex + lockSourceCodeProviderConfigControllerMockInformer sync.RWMutex + lockSourceCodeProviderConfigControllerMockLister sync.RWMutex + lockSourceCodeProviderConfigControllerMockStart sync.RWMutex + lockSourceCodeProviderConfigControllerMockSync sync.RWMutex +) + +// Ensure, that SourceCodeProviderConfigControllerMock does implement SourceCodeProviderConfigController. +// If this is not the case, regenerate this file with moq. +var _ v3.SourceCodeProviderConfigController = &SourceCodeProviderConfigControllerMock{} + +// SourceCodeProviderConfigControllerMock is a mock implementation of SourceCodeProviderConfigController. +// +// func TestSomethingThatUsesSourceCodeProviderConfigController(t *testing.T) { +// +// // make and configure a mocked SourceCodeProviderConfigController +// mockedSourceCodeProviderConfigController := &SourceCodeProviderConfigControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.SourceCodeProviderConfigHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.SourceCodeProviderConfigHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.SourceCodeProviderConfigLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedSourceCodeProviderConfigController in code that requires SourceCodeProviderConfigController +// // and then make assertions. +// +// } +type SourceCodeProviderConfigControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.SourceCodeProviderConfigHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.SourceCodeProviderConfigHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.SourceCodeProviderConfigLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.SourceCodeProviderConfigHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.SourceCodeProviderConfigHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *SourceCodeProviderConfigControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.SourceCodeProviderConfigHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("SourceCodeProviderConfigControllerMock.AddClusterScopedHandlerFunc: method is nil but SourceCodeProviderConfigController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.SourceCodeProviderConfigHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockSourceCodeProviderConfigControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockSourceCodeProviderConfigControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedSourceCodeProviderConfigController.AddClusterScopedHandlerCalls()) +func (mock *SourceCodeProviderConfigControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.SourceCodeProviderConfigHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.SourceCodeProviderConfigHandlerFunc + } + lockSourceCodeProviderConfigControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockSourceCodeProviderConfigControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *SourceCodeProviderConfigControllerMock) AddHandler(ctx context.Context, name string, handler v3.SourceCodeProviderConfigHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("SourceCodeProviderConfigControllerMock.AddHandlerFunc: method is nil but SourceCodeProviderConfigController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.SourceCodeProviderConfigHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockSourceCodeProviderConfigControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockSourceCodeProviderConfigControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedSourceCodeProviderConfigController.AddHandlerCalls()) +func (mock *SourceCodeProviderConfigControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.SourceCodeProviderConfigHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.SourceCodeProviderConfigHandlerFunc + } + lockSourceCodeProviderConfigControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockSourceCodeProviderConfigControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *SourceCodeProviderConfigControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("SourceCodeProviderConfigControllerMock.EnqueueFunc: method is nil but SourceCodeProviderConfigController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockSourceCodeProviderConfigControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockSourceCodeProviderConfigControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedSourceCodeProviderConfigController.EnqueueCalls()) +func (mock *SourceCodeProviderConfigControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockSourceCodeProviderConfigControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockSourceCodeProviderConfigControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *SourceCodeProviderConfigControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("SourceCodeProviderConfigControllerMock.GenericFunc: method is nil but SourceCodeProviderConfigController.Generic was just called") + } + callInfo := struct { + }{} + lockSourceCodeProviderConfigControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockSourceCodeProviderConfigControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedSourceCodeProviderConfigController.GenericCalls()) +func (mock *SourceCodeProviderConfigControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockSourceCodeProviderConfigControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockSourceCodeProviderConfigControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *SourceCodeProviderConfigControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("SourceCodeProviderConfigControllerMock.InformerFunc: method is nil but SourceCodeProviderConfigController.Informer was just called") + } + callInfo := struct { + }{} + lockSourceCodeProviderConfigControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockSourceCodeProviderConfigControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedSourceCodeProviderConfigController.InformerCalls()) +func (mock *SourceCodeProviderConfigControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockSourceCodeProviderConfigControllerMockInformer.RLock() + calls = mock.calls.Informer + lockSourceCodeProviderConfigControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *SourceCodeProviderConfigControllerMock) Lister() v3.SourceCodeProviderConfigLister { + if mock.ListerFunc == nil { + panic("SourceCodeProviderConfigControllerMock.ListerFunc: method is nil but SourceCodeProviderConfigController.Lister was just called") + } + callInfo := struct { + }{} + lockSourceCodeProviderConfigControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockSourceCodeProviderConfigControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedSourceCodeProviderConfigController.ListerCalls()) +func (mock *SourceCodeProviderConfigControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockSourceCodeProviderConfigControllerMockLister.RLock() + calls = mock.calls.Lister + lockSourceCodeProviderConfigControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *SourceCodeProviderConfigControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("SourceCodeProviderConfigControllerMock.StartFunc: method is nil but SourceCodeProviderConfigController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockSourceCodeProviderConfigControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockSourceCodeProviderConfigControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedSourceCodeProviderConfigController.StartCalls()) +func (mock *SourceCodeProviderConfigControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockSourceCodeProviderConfigControllerMockStart.RLock() + calls = mock.calls.Start + lockSourceCodeProviderConfigControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *SourceCodeProviderConfigControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("SourceCodeProviderConfigControllerMock.SyncFunc: method is nil but SourceCodeProviderConfigController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockSourceCodeProviderConfigControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockSourceCodeProviderConfigControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedSourceCodeProviderConfigController.SyncCalls()) +func (mock *SourceCodeProviderConfigControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockSourceCodeProviderConfigControllerMockSync.RLock() + calls = mock.calls.Sync + lockSourceCodeProviderConfigControllerMockSync.RUnlock() + return calls +} + +var ( + lockSourceCodeProviderConfigInterfaceMockAddClusterScopedHandler sync.RWMutex + lockSourceCodeProviderConfigInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockSourceCodeProviderConfigInterfaceMockAddHandler sync.RWMutex + lockSourceCodeProviderConfigInterfaceMockAddLifecycle sync.RWMutex + lockSourceCodeProviderConfigInterfaceMockController sync.RWMutex + lockSourceCodeProviderConfigInterfaceMockCreate sync.RWMutex + lockSourceCodeProviderConfigInterfaceMockDelete sync.RWMutex + lockSourceCodeProviderConfigInterfaceMockDeleteCollection sync.RWMutex + lockSourceCodeProviderConfigInterfaceMockDeleteNamespaced sync.RWMutex + lockSourceCodeProviderConfigInterfaceMockGet sync.RWMutex + lockSourceCodeProviderConfigInterfaceMockGetNamespaced sync.RWMutex + lockSourceCodeProviderConfigInterfaceMockList sync.RWMutex + lockSourceCodeProviderConfigInterfaceMockObjectClient sync.RWMutex + lockSourceCodeProviderConfigInterfaceMockUpdate sync.RWMutex + lockSourceCodeProviderConfigInterfaceMockWatch sync.RWMutex +) + +// Ensure, that SourceCodeProviderConfigInterfaceMock does implement SourceCodeProviderConfigInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.SourceCodeProviderConfigInterface = &SourceCodeProviderConfigInterfaceMock{} + +// SourceCodeProviderConfigInterfaceMock is a mock implementation of SourceCodeProviderConfigInterface. +// +// func TestSomethingThatUsesSourceCodeProviderConfigInterface(t *testing.T) { +// +// // make and configure a mocked SourceCodeProviderConfigInterface +// mockedSourceCodeProviderConfigInterface := &SourceCodeProviderConfigInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.SourceCodeProviderConfigHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.SourceCodeProviderConfigLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.SourceCodeProviderConfigHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.SourceCodeProviderConfigLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.SourceCodeProviderConfigController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.SourceCodeProviderConfig) (*v3.SourceCodeProviderConfig, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.SourceCodeProviderConfig, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.SourceCodeProviderConfig, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.SourceCodeProviderConfigList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.SourceCodeProviderConfig) (*v3.SourceCodeProviderConfig, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedSourceCodeProviderConfigInterface in code that requires SourceCodeProviderConfigInterface +// // and then make assertions. +// +// } +type SourceCodeProviderConfigInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.SourceCodeProviderConfigHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.SourceCodeProviderConfigLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.SourceCodeProviderConfigHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.SourceCodeProviderConfigLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.SourceCodeProviderConfigController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.SourceCodeProviderConfig) (*v3.SourceCodeProviderConfig, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.SourceCodeProviderConfig, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.SourceCodeProviderConfig, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.SourceCodeProviderConfigList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.SourceCodeProviderConfig) (*v3.SourceCodeProviderConfig, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.SourceCodeProviderConfigHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.SourceCodeProviderConfigLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.SourceCodeProviderConfigHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.SourceCodeProviderConfigLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.SourceCodeProviderConfig + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.SourceCodeProviderConfig + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *SourceCodeProviderConfigInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.SourceCodeProviderConfigHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("SourceCodeProviderConfigInterfaceMock.AddClusterScopedHandlerFunc: method is nil but SourceCodeProviderConfigInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.SourceCodeProviderConfigHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockSourceCodeProviderConfigInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockSourceCodeProviderConfigInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedSourceCodeProviderConfigInterface.AddClusterScopedHandlerCalls()) +func (mock *SourceCodeProviderConfigInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.SourceCodeProviderConfigHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.SourceCodeProviderConfigHandlerFunc + } + lockSourceCodeProviderConfigInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockSourceCodeProviderConfigInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *SourceCodeProviderConfigInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.SourceCodeProviderConfigLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("SourceCodeProviderConfigInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but SourceCodeProviderConfigInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.SourceCodeProviderConfigLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockSourceCodeProviderConfigInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockSourceCodeProviderConfigInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedSourceCodeProviderConfigInterface.AddClusterScopedLifecycleCalls()) +func (mock *SourceCodeProviderConfigInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.SourceCodeProviderConfigLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.SourceCodeProviderConfigLifecycle + } + lockSourceCodeProviderConfigInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockSourceCodeProviderConfigInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *SourceCodeProviderConfigInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.SourceCodeProviderConfigHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("SourceCodeProviderConfigInterfaceMock.AddHandlerFunc: method is nil but SourceCodeProviderConfigInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.SourceCodeProviderConfigHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockSourceCodeProviderConfigInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockSourceCodeProviderConfigInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedSourceCodeProviderConfigInterface.AddHandlerCalls()) +func (mock *SourceCodeProviderConfigInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.SourceCodeProviderConfigHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.SourceCodeProviderConfigHandlerFunc + } + lockSourceCodeProviderConfigInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockSourceCodeProviderConfigInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *SourceCodeProviderConfigInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.SourceCodeProviderConfigLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("SourceCodeProviderConfigInterfaceMock.AddLifecycleFunc: method is nil but SourceCodeProviderConfigInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.SourceCodeProviderConfigLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockSourceCodeProviderConfigInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockSourceCodeProviderConfigInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedSourceCodeProviderConfigInterface.AddLifecycleCalls()) +func (mock *SourceCodeProviderConfigInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.SourceCodeProviderConfigLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.SourceCodeProviderConfigLifecycle + } + lockSourceCodeProviderConfigInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockSourceCodeProviderConfigInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *SourceCodeProviderConfigInterfaceMock) Controller() v3.SourceCodeProviderConfigController { + if mock.ControllerFunc == nil { + panic("SourceCodeProviderConfigInterfaceMock.ControllerFunc: method is nil but SourceCodeProviderConfigInterface.Controller was just called") + } + callInfo := struct { + }{} + lockSourceCodeProviderConfigInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockSourceCodeProviderConfigInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedSourceCodeProviderConfigInterface.ControllerCalls()) +func (mock *SourceCodeProviderConfigInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockSourceCodeProviderConfigInterfaceMockController.RLock() + calls = mock.calls.Controller + lockSourceCodeProviderConfigInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *SourceCodeProviderConfigInterfaceMock) Create(in1 *v3.SourceCodeProviderConfig) (*v3.SourceCodeProviderConfig, error) { + if mock.CreateFunc == nil { + panic("SourceCodeProviderConfigInterfaceMock.CreateFunc: method is nil but SourceCodeProviderConfigInterface.Create was just called") + } + callInfo := struct { + In1 *v3.SourceCodeProviderConfig + }{ + In1: in1, + } + lockSourceCodeProviderConfigInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockSourceCodeProviderConfigInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedSourceCodeProviderConfigInterface.CreateCalls()) +func (mock *SourceCodeProviderConfigInterfaceMock) CreateCalls() []struct { + In1 *v3.SourceCodeProviderConfig +} { + var calls []struct { + In1 *v3.SourceCodeProviderConfig + } + lockSourceCodeProviderConfigInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockSourceCodeProviderConfigInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *SourceCodeProviderConfigInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("SourceCodeProviderConfigInterfaceMock.DeleteFunc: method is nil but SourceCodeProviderConfigInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockSourceCodeProviderConfigInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockSourceCodeProviderConfigInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedSourceCodeProviderConfigInterface.DeleteCalls()) +func (mock *SourceCodeProviderConfigInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockSourceCodeProviderConfigInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockSourceCodeProviderConfigInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *SourceCodeProviderConfigInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("SourceCodeProviderConfigInterfaceMock.DeleteCollectionFunc: method is nil but SourceCodeProviderConfigInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockSourceCodeProviderConfigInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockSourceCodeProviderConfigInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedSourceCodeProviderConfigInterface.DeleteCollectionCalls()) +func (mock *SourceCodeProviderConfigInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockSourceCodeProviderConfigInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockSourceCodeProviderConfigInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *SourceCodeProviderConfigInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("SourceCodeProviderConfigInterfaceMock.DeleteNamespacedFunc: method is nil but SourceCodeProviderConfigInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockSourceCodeProviderConfigInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockSourceCodeProviderConfigInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedSourceCodeProviderConfigInterface.DeleteNamespacedCalls()) +func (mock *SourceCodeProviderConfigInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockSourceCodeProviderConfigInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockSourceCodeProviderConfigInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *SourceCodeProviderConfigInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.SourceCodeProviderConfig, error) { + if mock.GetFunc == nil { + panic("SourceCodeProviderConfigInterfaceMock.GetFunc: method is nil but SourceCodeProviderConfigInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockSourceCodeProviderConfigInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockSourceCodeProviderConfigInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedSourceCodeProviderConfigInterface.GetCalls()) +func (mock *SourceCodeProviderConfigInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockSourceCodeProviderConfigInterfaceMockGet.RLock() + calls = mock.calls.Get + lockSourceCodeProviderConfigInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *SourceCodeProviderConfigInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.SourceCodeProviderConfig, error) { + if mock.GetNamespacedFunc == nil { + panic("SourceCodeProviderConfigInterfaceMock.GetNamespacedFunc: method is nil but SourceCodeProviderConfigInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockSourceCodeProviderConfigInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockSourceCodeProviderConfigInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedSourceCodeProviderConfigInterface.GetNamespacedCalls()) +func (mock *SourceCodeProviderConfigInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockSourceCodeProviderConfigInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockSourceCodeProviderConfigInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *SourceCodeProviderConfigInterfaceMock) List(opts v1.ListOptions) (*v3.SourceCodeProviderConfigList, error) { + if mock.ListFunc == nil { + panic("SourceCodeProviderConfigInterfaceMock.ListFunc: method is nil but SourceCodeProviderConfigInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockSourceCodeProviderConfigInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockSourceCodeProviderConfigInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedSourceCodeProviderConfigInterface.ListCalls()) +func (mock *SourceCodeProviderConfigInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockSourceCodeProviderConfigInterfaceMockList.RLock() + calls = mock.calls.List + lockSourceCodeProviderConfigInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *SourceCodeProviderConfigInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("SourceCodeProviderConfigInterfaceMock.ObjectClientFunc: method is nil but SourceCodeProviderConfigInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockSourceCodeProviderConfigInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockSourceCodeProviderConfigInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedSourceCodeProviderConfigInterface.ObjectClientCalls()) +func (mock *SourceCodeProviderConfigInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockSourceCodeProviderConfigInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockSourceCodeProviderConfigInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *SourceCodeProviderConfigInterfaceMock) Update(in1 *v3.SourceCodeProviderConfig) (*v3.SourceCodeProviderConfig, error) { + if mock.UpdateFunc == nil { + panic("SourceCodeProviderConfigInterfaceMock.UpdateFunc: method is nil but SourceCodeProviderConfigInterface.Update was just called") + } + callInfo := struct { + In1 *v3.SourceCodeProviderConfig + }{ + In1: in1, + } + lockSourceCodeProviderConfigInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockSourceCodeProviderConfigInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedSourceCodeProviderConfigInterface.UpdateCalls()) +func (mock *SourceCodeProviderConfigInterfaceMock) UpdateCalls() []struct { + In1 *v3.SourceCodeProviderConfig +} { + var calls []struct { + In1 *v3.SourceCodeProviderConfig + } + lockSourceCodeProviderConfigInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockSourceCodeProviderConfigInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *SourceCodeProviderConfigInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("SourceCodeProviderConfigInterfaceMock.WatchFunc: method is nil but SourceCodeProviderConfigInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockSourceCodeProviderConfigInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockSourceCodeProviderConfigInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedSourceCodeProviderConfigInterface.WatchCalls()) +func (mock *SourceCodeProviderConfigInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockSourceCodeProviderConfigInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockSourceCodeProviderConfigInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockSourceCodeProviderConfigsGetterMockSourceCodeProviderConfigs sync.RWMutex +) + +// Ensure, that SourceCodeProviderConfigsGetterMock does implement SourceCodeProviderConfigsGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.SourceCodeProviderConfigsGetter = &SourceCodeProviderConfigsGetterMock{} + +// SourceCodeProviderConfigsGetterMock is a mock implementation of SourceCodeProviderConfigsGetter. +// +// func TestSomethingThatUsesSourceCodeProviderConfigsGetter(t *testing.T) { +// +// // make and configure a mocked SourceCodeProviderConfigsGetter +// mockedSourceCodeProviderConfigsGetter := &SourceCodeProviderConfigsGetterMock{ +// SourceCodeProviderConfigsFunc: func(namespace string) v3.SourceCodeProviderConfigInterface { +// panic("mock out the SourceCodeProviderConfigs method") +// }, +// } +// +// // use mockedSourceCodeProviderConfigsGetter in code that requires SourceCodeProviderConfigsGetter +// // and then make assertions. +// +// } +type SourceCodeProviderConfigsGetterMock struct { + // SourceCodeProviderConfigsFunc mocks the SourceCodeProviderConfigs method. + SourceCodeProviderConfigsFunc func(namespace string) v3.SourceCodeProviderConfigInterface + + // calls tracks calls to the methods. + calls struct { + // SourceCodeProviderConfigs holds details about calls to the SourceCodeProviderConfigs method. + SourceCodeProviderConfigs []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// SourceCodeProviderConfigs calls SourceCodeProviderConfigsFunc. +func (mock *SourceCodeProviderConfigsGetterMock) SourceCodeProviderConfigs(namespace string) v3.SourceCodeProviderConfigInterface { + if mock.SourceCodeProviderConfigsFunc == nil { + panic("SourceCodeProviderConfigsGetterMock.SourceCodeProviderConfigsFunc: method is nil but SourceCodeProviderConfigsGetter.SourceCodeProviderConfigs was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockSourceCodeProviderConfigsGetterMockSourceCodeProviderConfigs.Lock() + mock.calls.SourceCodeProviderConfigs = append(mock.calls.SourceCodeProviderConfigs, callInfo) + lockSourceCodeProviderConfigsGetterMockSourceCodeProviderConfigs.Unlock() + return mock.SourceCodeProviderConfigsFunc(namespace) +} + +// SourceCodeProviderConfigsCalls gets all the calls that were made to SourceCodeProviderConfigs. +// Check the length with: +// len(mockedSourceCodeProviderConfigsGetter.SourceCodeProviderConfigsCalls()) +func (mock *SourceCodeProviderConfigsGetterMock) SourceCodeProviderConfigsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockSourceCodeProviderConfigsGetterMockSourceCodeProviderConfigs.RLock() + calls = mock.calls.SourceCodeProviderConfigs + lockSourceCodeProviderConfigsGetterMockSourceCodeProviderConfigs.RUnlock() + return calls +} diff --git a/apis/project.cattle.io/v3/fakes/zz_generated_source_code_provider_mock_test.go b/apis/project.cattle.io/v3/fakes/zz_generated_source_code_provider_mock_test.go new file mode 100644 index 00000000..cc9b3fcb --- /dev/null +++ b/apis/project.cattle.io/v3/fakes/zz_generated_source_code_provider_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/project.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockSourceCodeProviderListerMockGet sync.RWMutex + lockSourceCodeProviderListerMockList sync.RWMutex +) + +// Ensure, that SourceCodeProviderListerMock does implement SourceCodeProviderLister. +// If this is not the case, regenerate this file with moq. +var _ v3.SourceCodeProviderLister = &SourceCodeProviderListerMock{} + +// SourceCodeProviderListerMock is a mock implementation of SourceCodeProviderLister. +// +// func TestSomethingThatUsesSourceCodeProviderLister(t *testing.T) { +// +// // make and configure a mocked SourceCodeProviderLister +// mockedSourceCodeProviderLister := &SourceCodeProviderListerMock{ +// GetFunc: func(namespace string, name string) (*v3.SourceCodeProvider, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.SourceCodeProvider, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedSourceCodeProviderLister in code that requires SourceCodeProviderLister +// // and then make assertions. +// +// } +type SourceCodeProviderListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.SourceCodeProvider, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.SourceCodeProvider, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *SourceCodeProviderListerMock) Get(namespace string, name string) (*v3.SourceCodeProvider, error) { + if mock.GetFunc == nil { + panic("SourceCodeProviderListerMock.GetFunc: method is nil but SourceCodeProviderLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockSourceCodeProviderListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockSourceCodeProviderListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedSourceCodeProviderLister.GetCalls()) +func (mock *SourceCodeProviderListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockSourceCodeProviderListerMockGet.RLock() + calls = mock.calls.Get + lockSourceCodeProviderListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *SourceCodeProviderListerMock) List(namespace string, selector labels.Selector) ([]*v3.SourceCodeProvider, error) { + if mock.ListFunc == nil { + panic("SourceCodeProviderListerMock.ListFunc: method is nil but SourceCodeProviderLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockSourceCodeProviderListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockSourceCodeProviderListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedSourceCodeProviderLister.ListCalls()) +func (mock *SourceCodeProviderListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockSourceCodeProviderListerMockList.RLock() + calls = mock.calls.List + lockSourceCodeProviderListerMockList.RUnlock() + return calls +} + +var ( + lockSourceCodeProviderControllerMockAddClusterScopedHandler sync.RWMutex + lockSourceCodeProviderControllerMockAddHandler sync.RWMutex + lockSourceCodeProviderControllerMockEnqueue sync.RWMutex + lockSourceCodeProviderControllerMockGeneric sync.RWMutex + lockSourceCodeProviderControllerMockInformer sync.RWMutex + lockSourceCodeProviderControllerMockLister sync.RWMutex + lockSourceCodeProviderControllerMockStart sync.RWMutex + lockSourceCodeProviderControllerMockSync sync.RWMutex +) + +// Ensure, that SourceCodeProviderControllerMock does implement SourceCodeProviderController. +// If this is not the case, regenerate this file with moq. +var _ v3.SourceCodeProviderController = &SourceCodeProviderControllerMock{} + +// SourceCodeProviderControllerMock is a mock implementation of SourceCodeProviderController. +// +// func TestSomethingThatUsesSourceCodeProviderController(t *testing.T) { +// +// // make and configure a mocked SourceCodeProviderController +// mockedSourceCodeProviderController := &SourceCodeProviderControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.SourceCodeProviderHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.SourceCodeProviderHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.SourceCodeProviderLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedSourceCodeProviderController in code that requires SourceCodeProviderController +// // and then make assertions. +// +// } +type SourceCodeProviderControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.SourceCodeProviderHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.SourceCodeProviderHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.SourceCodeProviderLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.SourceCodeProviderHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.SourceCodeProviderHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *SourceCodeProviderControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.SourceCodeProviderHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("SourceCodeProviderControllerMock.AddClusterScopedHandlerFunc: method is nil but SourceCodeProviderController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.SourceCodeProviderHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockSourceCodeProviderControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockSourceCodeProviderControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedSourceCodeProviderController.AddClusterScopedHandlerCalls()) +func (mock *SourceCodeProviderControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.SourceCodeProviderHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.SourceCodeProviderHandlerFunc + } + lockSourceCodeProviderControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockSourceCodeProviderControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *SourceCodeProviderControllerMock) AddHandler(ctx context.Context, name string, handler v3.SourceCodeProviderHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("SourceCodeProviderControllerMock.AddHandlerFunc: method is nil but SourceCodeProviderController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.SourceCodeProviderHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockSourceCodeProviderControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockSourceCodeProviderControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedSourceCodeProviderController.AddHandlerCalls()) +func (mock *SourceCodeProviderControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.SourceCodeProviderHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.SourceCodeProviderHandlerFunc + } + lockSourceCodeProviderControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockSourceCodeProviderControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *SourceCodeProviderControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("SourceCodeProviderControllerMock.EnqueueFunc: method is nil but SourceCodeProviderController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockSourceCodeProviderControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockSourceCodeProviderControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedSourceCodeProviderController.EnqueueCalls()) +func (mock *SourceCodeProviderControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockSourceCodeProviderControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockSourceCodeProviderControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *SourceCodeProviderControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("SourceCodeProviderControllerMock.GenericFunc: method is nil but SourceCodeProviderController.Generic was just called") + } + callInfo := struct { + }{} + lockSourceCodeProviderControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockSourceCodeProviderControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedSourceCodeProviderController.GenericCalls()) +func (mock *SourceCodeProviderControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockSourceCodeProviderControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockSourceCodeProviderControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *SourceCodeProviderControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("SourceCodeProviderControllerMock.InformerFunc: method is nil but SourceCodeProviderController.Informer was just called") + } + callInfo := struct { + }{} + lockSourceCodeProviderControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockSourceCodeProviderControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedSourceCodeProviderController.InformerCalls()) +func (mock *SourceCodeProviderControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockSourceCodeProviderControllerMockInformer.RLock() + calls = mock.calls.Informer + lockSourceCodeProviderControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *SourceCodeProviderControllerMock) Lister() v3.SourceCodeProviderLister { + if mock.ListerFunc == nil { + panic("SourceCodeProviderControllerMock.ListerFunc: method is nil but SourceCodeProviderController.Lister was just called") + } + callInfo := struct { + }{} + lockSourceCodeProviderControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockSourceCodeProviderControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedSourceCodeProviderController.ListerCalls()) +func (mock *SourceCodeProviderControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockSourceCodeProviderControllerMockLister.RLock() + calls = mock.calls.Lister + lockSourceCodeProviderControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *SourceCodeProviderControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("SourceCodeProviderControllerMock.StartFunc: method is nil but SourceCodeProviderController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockSourceCodeProviderControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockSourceCodeProviderControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedSourceCodeProviderController.StartCalls()) +func (mock *SourceCodeProviderControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockSourceCodeProviderControllerMockStart.RLock() + calls = mock.calls.Start + lockSourceCodeProviderControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *SourceCodeProviderControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("SourceCodeProviderControllerMock.SyncFunc: method is nil but SourceCodeProviderController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockSourceCodeProviderControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockSourceCodeProviderControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedSourceCodeProviderController.SyncCalls()) +func (mock *SourceCodeProviderControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockSourceCodeProviderControllerMockSync.RLock() + calls = mock.calls.Sync + lockSourceCodeProviderControllerMockSync.RUnlock() + return calls +} + +var ( + lockSourceCodeProviderInterfaceMockAddClusterScopedHandler sync.RWMutex + lockSourceCodeProviderInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockSourceCodeProviderInterfaceMockAddHandler sync.RWMutex + lockSourceCodeProviderInterfaceMockAddLifecycle sync.RWMutex + lockSourceCodeProviderInterfaceMockController sync.RWMutex + lockSourceCodeProviderInterfaceMockCreate sync.RWMutex + lockSourceCodeProviderInterfaceMockDelete sync.RWMutex + lockSourceCodeProviderInterfaceMockDeleteCollection sync.RWMutex + lockSourceCodeProviderInterfaceMockDeleteNamespaced sync.RWMutex + lockSourceCodeProviderInterfaceMockGet sync.RWMutex + lockSourceCodeProviderInterfaceMockGetNamespaced sync.RWMutex + lockSourceCodeProviderInterfaceMockList sync.RWMutex + lockSourceCodeProviderInterfaceMockObjectClient sync.RWMutex + lockSourceCodeProviderInterfaceMockUpdate sync.RWMutex + lockSourceCodeProviderInterfaceMockWatch sync.RWMutex +) + +// Ensure, that SourceCodeProviderInterfaceMock does implement SourceCodeProviderInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.SourceCodeProviderInterface = &SourceCodeProviderInterfaceMock{} + +// SourceCodeProviderInterfaceMock is a mock implementation of SourceCodeProviderInterface. +// +// func TestSomethingThatUsesSourceCodeProviderInterface(t *testing.T) { +// +// // make and configure a mocked SourceCodeProviderInterface +// mockedSourceCodeProviderInterface := &SourceCodeProviderInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.SourceCodeProviderHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.SourceCodeProviderLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.SourceCodeProviderHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.SourceCodeProviderLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.SourceCodeProviderController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.SourceCodeProvider) (*v3.SourceCodeProvider, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.SourceCodeProvider, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.SourceCodeProvider, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.SourceCodeProviderList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.SourceCodeProvider) (*v3.SourceCodeProvider, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedSourceCodeProviderInterface in code that requires SourceCodeProviderInterface +// // and then make assertions. +// +// } +type SourceCodeProviderInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.SourceCodeProviderHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.SourceCodeProviderLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.SourceCodeProviderHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.SourceCodeProviderLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.SourceCodeProviderController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.SourceCodeProvider) (*v3.SourceCodeProvider, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.SourceCodeProvider, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.SourceCodeProvider, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.SourceCodeProviderList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.SourceCodeProvider) (*v3.SourceCodeProvider, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.SourceCodeProviderHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.SourceCodeProviderLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.SourceCodeProviderHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.SourceCodeProviderLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.SourceCodeProvider + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.SourceCodeProvider + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *SourceCodeProviderInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.SourceCodeProviderHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("SourceCodeProviderInterfaceMock.AddClusterScopedHandlerFunc: method is nil but SourceCodeProviderInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.SourceCodeProviderHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockSourceCodeProviderInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockSourceCodeProviderInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedSourceCodeProviderInterface.AddClusterScopedHandlerCalls()) +func (mock *SourceCodeProviderInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.SourceCodeProviderHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.SourceCodeProviderHandlerFunc + } + lockSourceCodeProviderInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockSourceCodeProviderInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *SourceCodeProviderInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.SourceCodeProviderLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("SourceCodeProviderInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but SourceCodeProviderInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.SourceCodeProviderLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockSourceCodeProviderInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockSourceCodeProviderInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedSourceCodeProviderInterface.AddClusterScopedLifecycleCalls()) +func (mock *SourceCodeProviderInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.SourceCodeProviderLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.SourceCodeProviderLifecycle + } + lockSourceCodeProviderInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockSourceCodeProviderInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *SourceCodeProviderInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.SourceCodeProviderHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("SourceCodeProviderInterfaceMock.AddHandlerFunc: method is nil but SourceCodeProviderInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.SourceCodeProviderHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockSourceCodeProviderInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockSourceCodeProviderInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedSourceCodeProviderInterface.AddHandlerCalls()) +func (mock *SourceCodeProviderInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.SourceCodeProviderHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.SourceCodeProviderHandlerFunc + } + lockSourceCodeProviderInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockSourceCodeProviderInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *SourceCodeProviderInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.SourceCodeProviderLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("SourceCodeProviderInterfaceMock.AddLifecycleFunc: method is nil but SourceCodeProviderInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.SourceCodeProviderLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockSourceCodeProviderInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockSourceCodeProviderInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedSourceCodeProviderInterface.AddLifecycleCalls()) +func (mock *SourceCodeProviderInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.SourceCodeProviderLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.SourceCodeProviderLifecycle + } + lockSourceCodeProviderInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockSourceCodeProviderInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *SourceCodeProviderInterfaceMock) Controller() v3.SourceCodeProviderController { + if mock.ControllerFunc == nil { + panic("SourceCodeProviderInterfaceMock.ControllerFunc: method is nil but SourceCodeProviderInterface.Controller was just called") + } + callInfo := struct { + }{} + lockSourceCodeProviderInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockSourceCodeProviderInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedSourceCodeProviderInterface.ControllerCalls()) +func (mock *SourceCodeProviderInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockSourceCodeProviderInterfaceMockController.RLock() + calls = mock.calls.Controller + lockSourceCodeProviderInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *SourceCodeProviderInterfaceMock) Create(in1 *v3.SourceCodeProvider) (*v3.SourceCodeProvider, error) { + if mock.CreateFunc == nil { + panic("SourceCodeProviderInterfaceMock.CreateFunc: method is nil but SourceCodeProviderInterface.Create was just called") + } + callInfo := struct { + In1 *v3.SourceCodeProvider + }{ + In1: in1, + } + lockSourceCodeProviderInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockSourceCodeProviderInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedSourceCodeProviderInterface.CreateCalls()) +func (mock *SourceCodeProviderInterfaceMock) CreateCalls() []struct { + In1 *v3.SourceCodeProvider +} { + var calls []struct { + In1 *v3.SourceCodeProvider + } + lockSourceCodeProviderInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockSourceCodeProviderInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *SourceCodeProviderInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("SourceCodeProviderInterfaceMock.DeleteFunc: method is nil but SourceCodeProviderInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockSourceCodeProviderInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockSourceCodeProviderInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedSourceCodeProviderInterface.DeleteCalls()) +func (mock *SourceCodeProviderInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockSourceCodeProviderInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockSourceCodeProviderInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *SourceCodeProviderInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("SourceCodeProviderInterfaceMock.DeleteCollectionFunc: method is nil but SourceCodeProviderInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockSourceCodeProviderInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockSourceCodeProviderInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedSourceCodeProviderInterface.DeleteCollectionCalls()) +func (mock *SourceCodeProviderInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockSourceCodeProviderInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockSourceCodeProviderInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *SourceCodeProviderInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("SourceCodeProviderInterfaceMock.DeleteNamespacedFunc: method is nil but SourceCodeProviderInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockSourceCodeProviderInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockSourceCodeProviderInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedSourceCodeProviderInterface.DeleteNamespacedCalls()) +func (mock *SourceCodeProviderInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockSourceCodeProviderInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockSourceCodeProviderInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *SourceCodeProviderInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.SourceCodeProvider, error) { + if mock.GetFunc == nil { + panic("SourceCodeProviderInterfaceMock.GetFunc: method is nil but SourceCodeProviderInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockSourceCodeProviderInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockSourceCodeProviderInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedSourceCodeProviderInterface.GetCalls()) +func (mock *SourceCodeProviderInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockSourceCodeProviderInterfaceMockGet.RLock() + calls = mock.calls.Get + lockSourceCodeProviderInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *SourceCodeProviderInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.SourceCodeProvider, error) { + if mock.GetNamespacedFunc == nil { + panic("SourceCodeProviderInterfaceMock.GetNamespacedFunc: method is nil but SourceCodeProviderInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockSourceCodeProviderInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockSourceCodeProviderInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedSourceCodeProviderInterface.GetNamespacedCalls()) +func (mock *SourceCodeProviderInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockSourceCodeProviderInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockSourceCodeProviderInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *SourceCodeProviderInterfaceMock) List(opts v1.ListOptions) (*v3.SourceCodeProviderList, error) { + if mock.ListFunc == nil { + panic("SourceCodeProviderInterfaceMock.ListFunc: method is nil but SourceCodeProviderInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockSourceCodeProviderInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockSourceCodeProviderInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedSourceCodeProviderInterface.ListCalls()) +func (mock *SourceCodeProviderInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockSourceCodeProviderInterfaceMockList.RLock() + calls = mock.calls.List + lockSourceCodeProviderInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *SourceCodeProviderInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("SourceCodeProviderInterfaceMock.ObjectClientFunc: method is nil but SourceCodeProviderInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockSourceCodeProviderInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockSourceCodeProviderInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedSourceCodeProviderInterface.ObjectClientCalls()) +func (mock *SourceCodeProviderInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockSourceCodeProviderInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockSourceCodeProviderInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *SourceCodeProviderInterfaceMock) Update(in1 *v3.SourceCodeProvider) (*v3.SourceCodeProvider, error) { + if mock.UpdateFunc == nil { + panic("SourceCodeProviderInterfaceMock.UpdateFunc: method is nil but SourceCodeProviderInterface.Update was just called") + } + callInfo := struct { + In1 *v3.SourceCodeProvider + }{ + In1: in1, + } + lockSourceCodeProviderInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockSourceCodeProviderInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedSourceCodeProviderInterface.UpdateCalls()) +func (mock *SourceCodeProviderInterfaceMock) UpdateCalls() []struct { + In1 *v3.SourceCodeProvider +} { + var calls []struct { + In1 *v3.SourceCodeProvider + } + lockSourceCodeProviderInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockSourceCodeProviderInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *SourceCodeProviderInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("SourceCodeProviderInterfaceMock.WatchFunc: method is nil but SourceCodeProviderInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockSourceCodeProviderInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockSourceCodeProviderInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedSourceCodeProviderInterface.WatchCalls()) +func (mock *SourceCodeProviderInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockSourceCodeProviderInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockSourceCodeProviderInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockSourceCodeProvidersGetterMockSourceCodeProviders sync.RWMutex +) + +// Ensure, that SourceCodeProvidersGetterMock does implement SourceCodeProvidersGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.SourceCodeProvidersGetter = &SourceCodeProvidersGetterMock{} + +// SourceCodeProvidersGetterMock is a mock implementation of SourceCodeProvidersGetter. +// +// func TestSomethingThatUsesSourceCodeProvidersGetter(t *testing.T) { +// +// // make and configure a mocked SourceCodeProvidersGetter +// mockedSourceCodeProvidersGetter := &SourceCodeProvidersGetterMock{ +// SourceCodeProvidersFunc: func(namespace string) v3.SourceCodeProviderInterface { +// panic("mock out the SourceCodeProviders method") +// }, +// } +// +// // use mockedSourceCodeProvidersGetter in code that requires SourceCodeProvidersGetter +// // and then make assertions. +// +// } +type SourceCodeProvidersGetterMock struct { + // SourceCodeProvidersFunc mocks the SourceCodeProviders method. + SourceCodeProvidersFunc func(namespace string) v3.SourceCodeProviderInterface + + // calls tracks calls to the methods. + calls struct { + // SourceCodeProviders holds details about calls to the SourceCodeProviders method. + SourceCodeProviders []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// SourceCodeProviders calls SourceCodeProvidersFunc. +func (mock *SourceCodeProvidersGetterMock) SourceCodeProviders(namespace string) v3.SourceCodeProviderInterface { + if mock.SourceCodeProvidersFunc == nil { + panic("SourceCodeProvidersGetterMock.SourceCodeProvidersFunc: method is nil but SourceCodeProvidersGetter.SourceCodeProviders was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockSourceCodeProvidersGetterMockSourceCodeProviders.Lock() + mock.calls.SourceCodeProviders = append(mock.calls.SourceCodeProviders, callInfo) + lockSourceCodeProvidersGetterMockSourceCodeProviders.Unlock() + return mock.SourceCodeProvidersFunc(namespace) +} + +// SourceCodeProvidersCalls gets all the calls that were made to SourceCodeProviders. +// Check the length with: +// len(mockedSourceCodeProvidersGetter.SourceCodeProvidersCalls()) +func (mock *SourceCodeProvidersGetterMock) SourceCodeProvidersCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockSourceCodeProvidersGetterMockSourceCodeProviders.RLock() + calls = mock.calls.SourceCodeProviders + lockSourceCodeProvidersGetterMockSourceCodeProviders.RUnlock() + return calls +} diff --git a/apis/project.cattle.io/v3/fakes/zz_generated_source_code_repository_mock_test.go b/apis/project.cattle.io/v3/fakes/zz_generated_source_code_repository_mock_test.go new file mode 100644 index 00000000..20cd65ca --- /dev/null +++ b/apis/project.cattle.io/v3/fakes/zz_generated_source_code_repository_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/project.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockSourceCodeRepositoryListerMockGet sync.RWMutex + lockSourceCodeRepositoryListerMockList sync.RWMutex +) + +// Ensure, that SourceCodeRepositoryListerMock does implement SourceCodeRepositoryLister. +// If this is not the case, regenerate this file with moq. +var _ v3.SourceCodeRepositoryLister = &SourceCodeRepositoryListerMock{} + +// SourceCodeRepositoryListerMock is a mock implementation of SourceCodeRepositoryLister. +// +// func TestSomethingThatUsesSourceCodeRepositoryLister(t *testing.T) { +// +// // make and configure a mocked SourceCodeRepositoryLister +// mockedSourceCodeRepositoryLister := &SourceCodeRepositoryListerMock{ +// GetFunc: func(namespace string, name string) (*v3.SourceCodeRepository, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.SourceCodeRepository, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedSourceCodeRepositoryLister in code that requires SourceCodeRepositoryLister +// // and then make assertions. +// +// } +type SourceCodeRepositoryListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.SourceCodeRepository, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.SourceCodeRepository, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *SourceCodeRepositoryListerMock) Get(namespace string, name string) (*v3.SourceCodeRepository, error) { + if mock.GetFunc == nil { + panic("SourceCodeRepositoryListerMock.GetFunc: method is nil but SourceCodeRepositoryLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockSourceCodeRepositoryListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockSourceCodeRepositoryListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedSourceCodeRepositoryLister.GetCalls()) +func (mock *SourceCodeRepositoryListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockSourceCodeRepositoryListerMockGet.RLock() + calls = mock.calls.Get + lockSourceCodeRepositoryListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *SourceCodeRepositoryListerMock) List(namespace string, selector labels.Selector) ([]*v3.SourceCodeRepository, error) { + if mock.ListFunc == nil { + panic("SourceCodeRepositoryListerMock.ListFunc: method is nil but SourceCodeRepositoryLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockSourceCodeRepositoryListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockSourceCodeRepositoryListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedSourceCodeRepositoryLister.ListCalls()) +func (mock *SourceCodeRepositoryListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockSourceCodeRepositoryListerMockList.RLock() + calls = mock.calls.List + lockSourceCodeRepositoryListerMockList.RUnlock() + return calls +} + +var ( + lockSourceCodeRepositoryControllerMockAddClusterScopedHandler sync.RWMutex + lockSourceCodeRepositoryControllerMockAddHandler sync.RWMutex + lockSourceCodeRepositoryControllerMockEnqueue sync.RWMutex + lockSourceCodeRepositoryControllerMockGeneric sync.RWMutex + lockSourceCodeRepositoryControllerMockInformer sync.RWMutex + lockSourceCodeRepositoryControllerMockLister sync.RWMutex + lockSourceCodeRepositoryControllerMockStart sync.RWMutex + lockSourceCodeRepositoryControllerMockSync sync.RWMutex +) + +// Ensure, that SourceCodeRepositoryControllerMock does implement SourceCodeRepositoryController. +// If this is not the case, regenerate this file with moq. +var _ v3.SourceCodeRepositoryController = &SourceCodeRepositoryControllerMock{} + +// SourceCodeRepositoryControllerMock is a mock implementation of SourceCodeRepositoryController. +// +// func TestSomethingThatUsesSourceCodeRepositoryController(t *testing.T) { +// +// // make and configure a mocked SourceCodeRepositoryController +// mockedSourceCodeRepositoryController := &SourceCodeRepositoryControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.SourceCodeRepositoryHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.SourceCodeRepositoryHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.SourceCodeRepositoryLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedSourceCodeRepositoryController in code that requires SourceCodeRepositoryController +// // and then make assertions. +// +// } +type SourceCodeRepositoryControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.SourceCodeRepositoryHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.SourceCodeRepositoryHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.SourceCodeRepositoryLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.SourceCodeRepositoryHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.SourceCodeRepositoryHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *SourceCodeRepositoryControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.SourceCodeRepositoryHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("SourceCodeRepositoryControllerMock.AddClusterScopedHandlerFunc: method is nil but SourceCodeRepositoryController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.SourceCodeRepositoryHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockSourceCodeRepositoryControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockSourceCodeRepositoryControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedSourceCodeRepositoryController.AddClusterScopedHandlerCalls()) +func (mock *SourceCodeRepositoryControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.SourceCodeRepositoryHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.SourceCodeRepositoryHandlerFunc + } + lockSourceCodeRepositoryControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockSourceCodeRepositoryControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *SourceCodeRepositoryControllerMock) AddHandler(ctx context.Context, name string, handler v3.SourceCodeRepositoryHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("SourceCodeRepositoryControllerMock.AddHandlerFunc: method is nil but SourceCodeRepositoryController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.SourceCodeRepositoryHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockSourceCodeRepositoryControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockSourceCodeRepositoryControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedSourceCodeRepositoryController.AddHandlerCalls()) +func (mock *SourceCodeRepositoryControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.SourceCodeRepositoryHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.SourceCodeRepositoryHandlerFunc + } + lockSourceCodeRepositoryControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockSourceCodeRepositoryControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *SourceCodeRepositoryControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("SourceCodeRepositoryControllerMock.EnqueueFunc: method is nil but SourceCodeRepositoryController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockSourceCodeRepositoryControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockSourceCodeRepositoryControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedSourceCodeRepositoryController.EnqueueCalls()) +func (mock *SourceCodeRepositoryControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockSourceCodeRepositoryControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockSourceCodeRepositoryControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *SourceCodeRepositoryControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("SourceCodeRepositoryControllerMock.GenericFunc: method is nil but SourceCodeRepositoryController.Generic was just called") + } + callInfo := struct { + }{} + lockSourceCodeRepositoryControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockSourceCodeRepositoryControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedSourceCodeRepositoryController.GenericCalls()) +func (mock *SourceCodeRepositoryControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockSourceCodeRepositoryControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockSourceCodeRepositoryControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *SourceCodeRepositoryControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("SourceCodeRepositoryControllerMock.InformerFunc: method is nil but SourceCodeRepositoryController.Informer was just called") + } + callInfo := struct { + }{} + lockSourceCodeRepositoryControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockSourceCodeRepositoryControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedSourceCodeRepositoryController.InformerCalls()) +func (mock *SourceCodeRepositoryControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockSourceCodeRepositoryControllerMockInformer.RLock() + calls = mock.calls.Informer + lockSourceCodeRepositoryControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *SourceCodeRepositoryControllerMock) Lister() v3.SourceCodeRepositoryLister { + if mock.ListerFunc == nil { + panic("SourceCodeRepositoryControllerMock.ListerFunc: method is nil but SourceCodeRepositoryController.Lister was just called") + } + callInfo := struct { + }{} + lockSourceCodeRepositoryControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockSourceCodeRepositoryControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedSourceCodeRepositoryController.ListerCalls()) +func (mock *SourceCodeRepositoryControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockSourceCodeRepositoryControllerMockLister.RLock() + calls = mock.calls.Lister + lockSourceCodeRepositoryControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *SourceCodeRepositoryControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("SourceCodeRepositoryControllerMock.StartFunc: method is nil but SourceCodeRepositoryController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockSourceCodeRepositoryControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockSourceCodeRepositoryControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedSourceCodeRepositoryController.StartCalls()) +func (mock *SourceCodeRepositoryControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockSourceCodeRepositoryControllerMockStart.RLock() + calls = mock.calls.Start + lockSourceCodeRepositoryControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *SourceCodeRepositoryControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("SourceCodeRepositoryControllerMock.SyncFunc: method is nil but SourceCodeRepositoryController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockSourceCodeRepositoryControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockSourceCodeRepositoryControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedSourceCodeRepositoryController.SyncCalls()) +func (mock *SourceCodeRepositoryControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockSourceCodeRepositoryControllerMockSync.RLock() + calls = mock.calls.Sync + lockSourceCodeRepositoryControllerMockSync.RUnlock() + return calls +} + +var ( + lockSourceCodeRepositoryInterfaceMockAddClusterScopedHandler sync.RWMutex + lockSourceCodeRepositoryInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockSourceCodeRepositoryInterfaceMockAddHandler sync.RWMutex + lockSourceCodeRepositoryInterfaceMockAddLifecycle sync.RWMutex + lockSourceCodeRepositoryInterfaceMockController sync.RWMutex + lockSourceCodeRepositoryInterfaceMockCreate sync.RWMutex + lockSourceCodeRepositoryInterfaceMockDelete sync.RWMutex + lockSourceCodeRepositoryInterfaceMockDeleteCollection sync.RWMutex + lockSourceCodeRepositoryInterfaceMockDeleteNamespaced sync.RWMutex + lockSourceCodeRepositoryInterfaceMockGet sync.RWMutex + lockSourceCodeRepositoryInterfaceMockGetNamespaced sync.RWMutex + lockSourceCodeRepositoryInterfaceMockList sync.RWMutex + lockSourceCodeRepositoryInterfaceMockObjectClient sync.RWMutex + lockSourceCodeRepositoryInterfaceMockUpdate sync.RWMutex + lockSourceCodeRepositoryInterfaceMockWatch sync.RWMutex +) + +// Ensure, that SourceCodeRepositoryInterfaceMock does implement SourceCodeRepositoryInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.SourceCodeRepositoryInterface = &SourceCodeRepositoryInterfaceMock{} + +// SourceCodeRepositoryInterfaceMock is a mock implementation of SourceCodeRepositoryInterface. +// +// func TestSomethingThatUsesSourceCodeRepositoryInterface(t *testing.T) { +// +// // make and configure a mocked SourceCodeRepositoryInterface +// mockedSourceCodeRepositoryInterface := &SourceCodeRepositoryInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.SourceCodeRepositoryHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.SourceCodeRepositoryLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.SourceCodeRepositoryHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.SourceCodeRepositoryLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.SourceCodeRepositoryController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.SourceCodeRepository) (*v3.SourceCodeRepository, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.SourceCodeRepository, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.SourceCodeRepository, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.SourceCodeRepositoryList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.SourceCodeRepository) (*v3.SourceCodeRepository, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedSourceCodeRepositoryInterface in code that requires SourceCodeRepositoryInterface +// // and then make assertions. +// +// } +type SourceCodeRepositoryInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.SourceCodeRepositoryHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.SourceCodeRepositoryLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.SourceCodeRepositoryHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.SourceCodeRepositoryLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.SourceCodeRepositoryController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.SourceCodeRepository) (*v3.SourceCodeRepository, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.SourceCodeRepository, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.SourceCodeRepository, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.SourceCodeRepositoryList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.SourceCodeRepository) (*v3.SourceCodeRepository, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.SourceCodeRepositoryHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.SourceCodeRepositoryLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.SourceCodeRepositoryHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.SourceCodeRepositoryLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.SourceCodeRepository + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.SourceCodeRepository + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *SourceCodeRepositoryInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.SourceCodeRepositoryHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("SourceCodeRepositoryInterfaceMock.AddClusterScopedHandlerFunc: method is nil but SourceCodeRepositoryInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.SourceCodeRepositoryHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockSourceCodeRepositoryInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockSourceCodeRepositoryInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedSourceCodeRepositoryInterface.AddClusterScopedHandlerCalls()) +func (mock *SourceCodeRepositoryInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.SourceCodeRepositoryHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.SourceCodeRepositoryHandlerFunc + } + lockSourceCodeRepositoryInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockSourceCodeRepositoryInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *SourceCodeRepositoryInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.SourceCodeRepositoryLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("SourceCodeRepositoryInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but SourceCodeRepositoryInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.SourceCodeRepositoryLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockSourceCodeRepositoryInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockSourceCodeRepositoryInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedSourceCodeRepositoryInterface.AddClusterScopedLifecycleCalls()) +func (mock *SourceCodeRepositoryInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.SourceCodeRepositoryLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.SourceCodeRepositoryLifecycle + } + lockSourceCodeRepositoryInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockSourceCodeRepositoryInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *SourceCodeRepositoryInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.SourceCodeRepositoryHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("SourceCodeRepositoryInterfaceMock.AddHandlerFunc: method is nil but SourceCodeRepositoryInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.SourceCodeRepositoryHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockSourceCodeRepositoryInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockSourceCodeRepositoryInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedSourceCodeRepositoryInterface.AddHandlerCalls()) +func (mock *SourceCodeRepositoryInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.SourceCodeRepositoryHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.SourceCodeRepositoryHandlerFunc + } + lockSourceCodeRepositoryInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockSourceCodeRepositoryInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *SourceCodeRepositoryInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.SourceCodeRepositoryLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("SourceCodeRepositoryInterfaceMock.AddLifecycleFunc: method is nil but SourceCodeRepositoryInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.SourceCodeRepositoryLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockSourceCodeRepositoryInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockSourceCodeRepositoryInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedSourceCodeRepositoryInterface.AddLifecycleCalls()) +func (mock *SourceCodeRepositoryInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.SourceCodeRepositoryLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.SourceCodeRepositoryLifecycle + } + lockSourceCodeRepositoryInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockSourceCodeRepositoryInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *SourceCodeRepositoryInterfaceMock) Controller() v3.SourceCodeRepositoryController { + if mock.ControllerFunc == nil { + panic("SourceCodeRepositoryInterfaceMock.ControllerFunc: method is nil but SourceCodeRepositoryInterface.Controller was just called") + } + callInfo := struct { + }{} + lockSourceCodeRepositoryInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockSourceCodeRepositoryInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedSourceCodeRepositoryInterface.ControllerCalls()) +func (mock *SourceCodeRepositoryInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockSourceCodeRepositoryInterfaceMockController.RLock() + calls = mock.calls.Controller + lockSourceCodeRepositoryInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *SourceCodeRepositoryInterfaceMock) Create(in1 *v3.SourceCodeRepository) (*v3.SourceCodeRepository, error) { + if mock.CreateFunc == nil { + panic("SourceCodeRepositoryInterfaceMock.CreateFunc: method is nil but SourceCodeRepositoryInterface.Create was just called") + } + callInfo := struct { + In1 *v3.SourceCodeRepository + }{ + In1: in1, + } + lockSourceCodeRepositoryInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockSourceCodeRepositoryInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedSourceCodeRepositoryInterface.CreateCalls()) +func (mock *SourceCodeRepositoryInterfaceMock) CreateCalls() []struct { + In1 *v3.SourceCodeRepository +} { + var calls []struct { + In1 *v3.SourceCodeRepository + } + lockSourceCodeRepositoryInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockSourceCodeRepositoryInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *SourceCodeRepositoryInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("SourceCodeRepositoryInterfaceMock.DeleteFunc: method is nil but SourceCodeRepositoryInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockSourceCodeRepositoryInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockSourceCodeRepositoryInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedSourceCodeRepositoryInterface.DeleteCalls()) +func (mock *SourceCodeRepositoryInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockSourceCodeRepositoryInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockSourceCodeRepositoryInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *SourceCodeRepositoryInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("SourceCodeRepositoryInterfaceMock.DeleteCollectionFunc: method is nil but SourceCodeRepositoryInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockSourceCodeRepositoryInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockSourceCodeRepositoryInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedSourceCodeRepositoryInterface.DeleteCollectionCalls()) +func (mock *SourceCodeRepositoryInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockSourceCodeRepositoryInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockSourceCodeRepositoryInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *SourceCodeRepositoryInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("SourceCodeRepositoryInterfaceMock.DeleteNamespacedFunc: method is nil but SourceCodeRepositoryInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockSourceCodeRepositoryInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockSourceCodeRepositoryInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedSourceCodeRepositoryInterface.DeleteNamespacedCalls()) +func (mock *SourceCodeRepositoryInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockSourceCodeRepositoryInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockSourceCodeRepositoryInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *SourceCodeRepositoryInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.SourceCodeRepository, error) { + if mock.GetFunc == nil { + panic("SourceCodeRepositoryInterfaceMock.GetFunc: method is nil but SourceCodeRepositoryInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockSourceCodeRepositoryInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockSourceCodeRepositoryInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedSourceCodeRepositoryInterface.GetCalls()) +func (mock *SourceCodeRepositoryInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockSourceCodeRepositoryInterfaceMockGet.RLock() + calls = mock.calls.Get + lockSourceCodeRepositoryInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *SourceCodeRepositoryInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.SourceCodeRepository, error) { + if mock.GetNamespacedFunc == nil { + panic("SourceCodeRepositoryInterfaceMock.GetNamespacedFunc: method is nil but SourceCodeRepositoryInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockSourceCodeRepositoryInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockSourceCodeRepositoryInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedSourceCodeRepositoryInterface.GetNamespacedCalls()) +func (mock *SourceCodeRepositoryInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockSourceCodeRepositoryInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockSourceCodeRepositoryInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *SourceCodeRepositoryInterfaceMock) List(opts v1.ListOptions) (*v3.SourceCodeRepositoryList, error) { + if mock.ListFunc == nil { + panic("SourceCodeRepositoryInterfaceMock.ListFunc: method is nil but SourceCodeRepositoryInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockSourceCodeRepositoryInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockSourceCodeRepositoryInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedSourceCodeRepositoryInterface.ListCalls()) +func (mock *SourceCodeRepositoryInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockSourceCodeRepositoryInterfaceMockList.RLock() + calls = mock.calls.List + lockSourceCodeRepositoryInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *SourceCodeRepositoryInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("SourceCodeRepositoryInterfaceMock.ObjectClientFunc: method is nil but SourceCodeRepositoryInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockSourceCodeRepositoryInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockSourceCodeRepositoryInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedSourceCodeRepositoryInterface.ObjectClientCalls()) +func (mock *SourceCodeRepositoryInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockSourceCodeRepositoryInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockSourceCodeRepositoryInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *SourceCodeRepositoryInterfaceMock) Update(in1 *v3.SourceCodeRepository) (*v3.SourceCodeRepository, error) { + if mock.UpdateFunc == nil { + panic("SourceCodeRepositoryInterfaceMock.UpdateFunc: method is nil but SourceCodeRepositoryInterface.Update was just called") + } + callInfo := struct { + In1 *v3.SourceCodeRepository + }{ + In1: in1, + } + lockSourceCodeRepositoryInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockSourceCodeRepositoryInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedSourceCodeRepositoryInterface.UpdateCalls()) +func (mock *SourceCodeRepositoryInterfaceMock) UpdateCalls() []struct { + In1 *v3.SourceCodeRepository +} { + var calls []struct { + In1 *v3.SourceCodeRepository + } + lockSourceCodeRepositoryInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockSourceCodeRepositoryInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *SourceCodeRepositoryInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("SourceCodeRepositoryInterfaceMock.WatchFunc: method is nil but SourceCodeRepositoryInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockSourceCodeRepositoryInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockSourceCodeRepositoryInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedSourceCodeRepositoryInterface.WatchCalls()) +func (mock *SourceCodeRepositoryInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockSourceCodeRepositoryInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockSourceCodeRepositoryInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockSourceCodeRepositoriesGetterMockSourceCodeRepositories sync.RWMutex +) + +// Ensure, that SourceCodeRepositoriesGetterMock does implement SourceCodeRepositoriesGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.SourceCodeRepositoriesGetter = &SourceCodeRepositoriesGetterMock{} + +// SourceCodeRepositoriesGetterMock is a mock implementation of SourceCodeRepositoriesGetter. +// +// func TestSomethingThatUsesSourceCodeRepositoriesGetter(t *testing.T) { +// +// // make and configure a mocked SourceCodeRepositoriesGetter +// mockedSourceCodeRepositoriesGetter := &SourceCodeRepositoriesGetterMock{ +// SourceCodeRepositoriesFunc: func(namespace string) v3.SourceCodeRepositoryInterface { +// panic("mock out the SourceCodeRepositories method") +// }, +// } +// +// // use mockedSourceCodeRepositoriesGetter in code that requires SourceCodeRepositoriesGetter +// // and then make assertions. +// +// } +type SourceCodeRepositoriesGetterMock struct { + // SourceCodeRepositoriesFunc mocks the SourceCodeRepositories method. + SourceCodeRepositoriesFunc func(namespace string) v3.SourceCodeRepositoryInterface + + // calls tracks calls to the methods. + calls struct { + // SourceCodeRepositories holds details about calls to the SourceCodeRepositories method. + SourceCodeRepositories []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// SourceCodeRepositories calls SourceCodeRepositoriesFunc. +func (mock *SourceCodeRepositoriesGetterMock) SourceCodeRepositories(namespace string) v3.SourceCodeRepositoryInterface { + if mock.SourceCodeRepositoriesFunc == nil { + panic("SourceCodeRepositoriesGetterMock.SourceCodeRepositoriesFunc: method is nil but SourceCodeRepositoriesGetter.SourceCodeRepositories was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockSourceCodeRepositoriesGetterMockSourceCodeRepositories.Lock() + mock.calls.SourceCodeRepositories = append(mock.calls.SourceCodeRepositories, callInfo) + lockSourceCodeRepositoriesGetterMockSourceCodeRepositories.Unlock() + return mock.SourceCodeRepositoriesFunc(namespace) +} + +// SourceCodeRepositoriesCalls gets all the calls that were made to SourceCodeRepositories. +// Check the length with: +// len(mockedSourceCodeRepositoriesGetter.SourceCodeRepositoriesCalls()) +func (mock *SourceCodeRepositoriesGetterMock) SourceCodeRepositoriesCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockSourceCodeRepositoriesGetterMockSourceCodeRepositories.RLock() + calls = mock.calls.SourceCodeRepositories + lockSourceCodeRepositoriesGetterMockSourceCodeRepositories.RUnlock() + return calls +} diff --git a/apis/project.cattle.io/v3/fakes/zz_generated_ssh_auth_mock_test.go b/apis/project.cattle.io/v3/fakes/zz_generated_ssh_auth_mock_test.go new file mode 100644 index 00000000..3c465604 --- /dev/null +++ b/apis/project.cattle.io/v3/fakes/zz_generated_ssh_auth_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/project.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockSSHAuthListerMockGet sync.RWMutex + lockSSHAuthListerMockList sync.RWMutex +) + +// Ensure, that SSHAuthListerMock does implement SSHAuthLister. +// If this is not the case, regenerate this file with moq. +var _ v3.SSHAuthLister = &SSHAuthListerMock{} + +// SSHAuthListerMock is a mock implementation of SSHAuthLister. +// +// func TestSomethingThatUsesSSHAuthLister(t *testing.T) { +// +// // make and configure a mocked SSHAuthLister +// mockedSSHAuthLister := &SSHAuthListerMock{ +// GetFunc: func(namespace string, name string) (*v3.SSHAuth, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.SSHAuth, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedSSHAuthLister in code that requires SSHAuthLister +// // and then make assertions. +// +// } +type SSHAuthListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.SSHAuth, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.SSHAuth, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *SSHAuthListerMock) Get(namespace string, name string) (*v3.SSHAuth, error) { + if mock.GetFunc == nil { + panic("SSHAuthListerMock.GetFunc: method is nil but SSHAuthLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockSSHAuthListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockSSHAuthListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedSSHAuthLister.GetCalls()) +func (mock *SSHAuthListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockSSHAuthListerMockGet.RLock() + calls = mock.calls.Get + lockSSHAuthListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *SSHAuthListerMock) List(namespace string, selector labels.Selector) ([]*v3.SSHAuth, error) { + if mock.ListFunc == nil { + panic("SSHAuthListerMock.ListFunc: method is nil but SSHAuthLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockSSHAuthListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockSSHAuthListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedSSHAuthLister.ListCalls()) +func (mock *SSHAuthListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockSSHAuthListerMockList.RLock() + calls = mock.calls.List + lockSSHAuthListerMockList.RUnlock() + return calls +} + +var ( + lockSSHAuthControllerMockAddClusterScopedHandler sync.RWMutex + lockSSHAuthControllerMockAddHandler sync.RWMutex + lockSSHAuthControllerMockEnqueue sync.RWMutex + lockSSHAuthControllerMockGeneric sync.RWMutex + lockSSHAuthControllerMockInformer sync.RWMutex + lockSSHAuthControllerMockLister sync.RWMutex + lockSSHAuthControllerMockStart sync.RWMutex + lockSSHAuthControllerMockSync sync.RWMutex +) + +// Ensure, that SSHAuthControllerMock does implement SSHAuthController. +// If this is not the case, regenerate this file with moq. +var _ v3.SSHAuthController = &SSHAuthControllerMock{} + +// SSHAuthControllerMock is a mock implementation of SSHAuthController. +// +// func TestSomethingThatUsesSSHAuthController(t *testing.T) { +// +// // make and configure a mocked SSHAuthController +// mockedSSHAuthController := &SSHAuthControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.SSHAuthHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.SSHAuthHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.SSHAuthLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedSSHAuthController in code that requires SSHAuthController +// // and then make assertions. +// +// } +type SSHAuthControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.SSHAuthHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.SSHAuthHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.SSHAuthLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.SSHAuthHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.SSHAuthHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *SSHAuthControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.SSHAuthHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("SSHAuthControllerMock.AddClusterScopedHandlerFunc: method is nil but SSHAuthController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.SSHAuthHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockSSHAuthControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockSSHAuthControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedSSHAuthController.AddClusterScopedHandlerCalls()) +func (mock *SSHAuthControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.SSHAuthHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.SSHAuthHandlerFunc + } + lockSSHAuthControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockSSHAuthControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *SSHAuthControllerMock) AddHandler(ctx context.Context, name string, handler v3.SSHAuthHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("SSHAuthControllerMock.AddHandlerFunc: method is nil but SSHAuthController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.SSHAuthHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockSSHAuthControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockSSHAuthControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedSSHAuthController.AddHandlerCalls()) +func (mock *SSHAuthControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.SSHAuthHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.SSHAuthHandlerFunc + } + lockSSHAuthControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockSSHAuthControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *SSHAuthControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("SSHAuthControllerMock.EnqueueFunc: method is nil but SSHAuthController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockSSHAuthControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockSSHAuthControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedSSHAuthController.EnqueueCalls()) +func (mock *SSHAuthControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockSSHAuthControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockSSHAuthControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *SSHAuthControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("SSHAuthControllerMock.GenericFunc: method is nil but SSHAuthController.Generic was just called") + } + callInfo := struct { + }{} + lockSSHAuthControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockSSHAuthControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedSSHAuthController.GenericCalls()) +func (mock *SSHAuthControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockSSHAuthControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockSSHAuthControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *SSHAuthControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("SSHAuthControllerMock.InformerFunc: method is nil but SSHAuthController.Informer was just called") + } + callInfo := struct { + }{} + lockSSHAuthControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockSSHAuthControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedSSHAuthController.InformerCalls()) +func (mock *SSHAuthControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockSSHAuthControllerMockInformer.RLock() + calls = mock.calls.Informer + lockSSHAuthControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *SSHAuthControllerMock) Lister() v3.SSHAuthLister { + if mock.ListerFunc == nil { + panic("SSHAuthControllerMock.ListerFunc: method is nil but SSHAuthController.Lister was just called") + } + callInfo := struct { + }{} + lockSSHAuthControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockSSHAuthControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedSSHAuthController.ListerCalls()) +func (mock *SSHAuthControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockSSHAuthControllerMockLister.RLock() + calls = mock.calls.Lister + lockSSHAuthControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *SSHAuthControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("SSHAuthControllerMock.StartFunc: method is nil but SSHAuthController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockSSHAuthControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockSSHAuthControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedSSHAuthController.StartCalls()) +func (mock *SSHAuthControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockSSHAuthControllerMockStart.RLock() + calls = mock.calls.Start + lockSSHAuthControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *SSHAuthControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("SSHAuthControllerMock.SyncFunc: method is nil but SSHAuthController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockSSHAuthControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockSSHAuthControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedSSHAuthController.SyncCalls()) +func (mock *SSHAuthControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockSSHAuthControllerMockSync.RLock() + calls = mock.calls.Sync + lockSSHAuthControllerMockSync.RUnlock() + return calls +} + +var ( + lockSSHAuthInterfaceMockAddClusterScopedHandler sync.RWMutex + lockSSHAuthInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockSSHAuthInterfaceMockAddHandler sync.RWMutex + lockSSHAuthInterfaceMockAddLifecycle sync.RWMutex + lockSSHAuthInterfaceMockController sync.RWMutex + lockSSHAuthInterfaceMockCreate sync.RWMutex + lockSSHAuthInterfaceMockDelete sync.RWMutex + lockSSHAuthInterfaceMockDeleteCollection sync.RWMutex + lockSSHAuthInterfaceMockDeleteNamespaced sync.RWMutex + lockSSHAuthInterfaceMockGet sync.RWMutex + lockSSHAuthInterfaceMockGetNamespaced sync.RWMutex + lockSSHAuthInterfaceMockList sync.RWMutex + lockSSHAuthInterfaceMockObjectClient sync.RWMutex + lockSSHAuthInterfaceMockUpdate sync.RWMutex + lockSSHAuthInterfaceMockWatch sync.RWMutex +) + +// Ensure, that SSHAuthInterfaceMock does implement SSHAuthInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.SSHAuthInterface = &SSHAuthInterfaceMock{} + +// SSHAuthInterfaceMock is a mock implementation of SSHAuthInterface. +// +// func TestSomethingThatUsesSSHAuthInterface(t *testing.T) { +// +// // make and configure a mocked SSHAuthInterface +// mockedSSHAuthInterface := &SSHAuthInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.SSHAuthHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.SSHAuthLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.SSHAuthHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.SSHAuthLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.SSHAuthController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.SSHAuth) (*v3.SSHAuth, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.SSHAuth, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.SSHAuth, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.SSHAuthList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.SSHAuth) (*v3.SSHAuth, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedSSHAuthInterface in code that requires SSHAuthInterface +// // and then make assertions. +// +// } +type SSHAuthInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.SSHAuthHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.SSHAuthLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.SSHAuthHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.SSHAuthLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.SSHAuthController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.SSHAuth) (*v3.SSHAuth, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.SSHAuth, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.SSHAuth, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.SSHAuthList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.SSHAuth) (*v3.SSHAuth, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.SSHAuthHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.SSHAuthLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.SSHAuthHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.SSHAuthLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.SSHAuth + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.SSHAuth + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *SSHAuthInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.SSHAuthHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("SSHAuthInterfaceMock.AddClusterScopedHandlerFunc: method is nil but SSHAuthInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.SSHAuthHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockSSHAuthInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockSSHAuthInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedSSHAuthInterface.AddClusterScopedHandlerCalls()) +func (mock *SSHAuthInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.SSHAuthHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.SSHAuthHandlerFunc + } + lockSSHAuthInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockSSHAuthInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *SSHAuthInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.SSHAuthLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("SSHAuthInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but SSHAuthInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.SSHAuthLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockSSHAuthInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockSSHAuthInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedSSHAuthInterface.AddClusterScopedLifecycleCalls()) +func (mock *SSHAuthInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.SSHAuthLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.SSHAuthLifecycle + } + lockSSHAuthInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockSSHAuthInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *SSHAuthInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.SSHAuthHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("SSHAuthInterfaceMock.AddHandlerFunc: method is nil but SSHAuthInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.SSHAuthHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockSSHAuthInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockSSHAuthInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedSSHAuthInterface.AddHandlerCalls()) +func (mock *SSHAuthInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.SSHAuthHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.SSHAuthHandlerFunc + } + lockSSHAuthInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockSSHAuthInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *SSHAuthInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.SSHAuthLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("SSHAuthInterfaceMock.AddLifecycleFunc: method is nil but SSHAuthInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.SSHAuthLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockSSHAuthInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockSSHAuthInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedSSHAuthInterface.AddLifecycleCalls()) +func (mock *SSHAuthInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.SSHAuthLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.SSHAuthLifecycle + } + lockSSHAuthInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockSSHAuthInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *SSHAuthInterfaceMock) Controller() v3.SSHAuthController { + if mock.ControllerFunc == nil { + panic("SSHAuthInterfaceMock.ControllerFunc: method is nil but SSHAuthInterface.Controller was just called") + } + callInfo := struct { + }{} + lockSSHAuthInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockSSHAuthInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedSSHAuthInterface.ControllerCalls()) +func (mock *SSHAuthInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockSSHAuthInterfaceMockController.RLock() + calls = mock.calls.Controller + lockSSHAuthInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *SSHAuthInterfaceMock) Create(in1 *v3.SSHAuth) (*v3.SSHAuth, error) { + if mock.CreateFunc == nil { + panic("SSHAuthInterfaceMock.CreateFunc: method is nil but SSHAuthInterface.Create was just called") + } + callInfo := struct { + In1 *v3.SSHAuth + }{ + In1: in1, + } + lockSSHAuthInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockSSHAuthInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedSSHAuthInterface.CreateCalls()) +func (mock *SSHAuthInterfaceMock) CreateCalls() []struct { + In1 *v3.SSHAuth +} { + var calls []struct { + In1 *v3.SSHAuth + } + lockSSHAuthInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockSSHAuthInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *SSHAuthInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("SSHAuthInterfaceMock.DeleteFunc: method is nil but SSHAuthInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockSSHAuthInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockSSHAuthInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedSSHAuthInterface.DeleteCalls()) +func (mock *SSHAuthInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockSSHAuthInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockSSHAuthInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *SSHAuthInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("SSHAuthInterfaceMock.DeleteCollectionFunc: method is nil but SSHAuthInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockSSHAuthInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockSSHAuthInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedSSHAuthInterface.DeleteCollectionCalls()) +func (mock *SSHAuthInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockSSHAuthInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockSSHAuthInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *SSHAuthInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("SSHAuthInterfaceMock.DeleteNamespacedFunc: method is nil but SSHAuthInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockSSHAuthInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockSSHAuthInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedSSHAuthInterface.DeleteNamespacedCalls()) +func (mock *SSHAuthInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockSSHAuthInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockSSHAuthInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *SSHAuthInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.SSHAuth, error) { + if mock.GetFunc == nil { + panic("SSHAuthInterfaceMock.GetFunc: method is nil but SSHAuthInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockSSHAuthInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockSSHAuthInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedSSHAuthInterface.GetCalls()) +func (mock *SSHAuthInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockSSHAuthInterfaceMockGet.RLock() + calls = mock.calls.Get + lockSSHAuthInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *SSHAuthInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.SSHAuth, error) { + if mock.GetNamespacedFunc == nil { + panic("SSHAuthInterfaceMock.GetNamespacedFunc: method is nil but SSHAuthInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockSSHAuthInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockSSHAuthInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedSSHAuthInterface.GetNamespacedCalls()) +func (mock *SSHAuthInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockSSHAuthInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockSSHAuthInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *SSHAuthInterfaceMock) List(opts v1.ListOptions) (*v3.SSHAuthList, error) { + if mock.ListFunc == nil { + panic("SSHAuthInterfaceMock.ListFunc: method is nil but SSHAuthInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockSSHAuthInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockSSHAuthInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedSSHAuthInterface.ListCalls()) +func (mock *SSHAuthInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockSSHAuthInterfaceMockList.RLock() + calls = mock.calls.List + lockSSHAuthInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *SSHAuthInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("SSHAuthInterfaceMock.ObjectClientFunc: method is nil but SSHAuthInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockSSHAuthInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockSSHAuthInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedSSHAuthInterface.ObjectClientCalls()) +func (mock *SSHAuthInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockSSHAuthInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockSSHAuthInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *SSHAuthInterfaceMock) Update(in1 *v3.SSHAuth) (*v3.SSHAuth, error) { + if mock.UpdateFunc == nil { + panic("SSHAuthInterfaceMock.UpdateFunc: method is nil but SSHAuthInterface.Update was just called") + } + callInfo := struct { + In1 *v3.SSHAuth + }{ + In1: in1, + } + lockSSHAuthInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockSSHAuthInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedSSHAuthInterface.UpdateCalls()) +func (mock *SSHAuthInterfaceMock) UpdateCalls() []struct { + In1 *v3.SSHAuth +} { + var calls []struct { + In1 *v3.SSHAuth + } + lockSSHAuthInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockSSHAuthInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *SSHAuthInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("SSHAuthInterfaceMock.WatchFunc: method is nil but SSHAuthInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockSSHAuthInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockSSHAuthInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedSSHAuthInterface.WatchCalls()) +func (mock *SSHAuthInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockSSHAuthInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockSSHAuthInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockSSHAuthsGetterMockSSHAuths sync.RWMutex +) + +// Ensure, that SSHAuthsGetterMock does implement SSHAuthsGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.SSHAuthsGetter = &SSHAuthsGetterMock{} + +// SSHAuthsGetterMock is a mock implementation of SSHAuthsGetter. +// +// func TestSomethingThatUsesSSHAuthsGetter(t *testing.T) { +// +// // make and configure a mocked SSHAuthsGetter +// mockedSSHAuthsGetter := &SSHAuthsGetterMock{ +// SSHAuthsFunc: func(namespace string) v3.SSHAuthInterface { +// panic("mock out the SSHAuths method") +// }, +// } +// +// // use mockedSSHAuthsGetter in code that requires SSHAuthsGetter +// // and then make assertions. +// +// } +type SSHAuthsGetterMock struct { + // SSHAuthsFunc mocks the SSHAuths method. + SSHAuthsFunc func(namespace string) v3.SSHAuthInterface + + // calls tracks calls to the methods. + calls struct { + // SSHAuths holds details about calls to the SSHAuths method. + SSHAuths []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// SSHAuths calls SSHAuthsFunc. +func (mock *SSHAuthsGetterMock) SSHAuths(namespace string) v3.SSHAuthInterface { + if mock.SSHAuthsFunc == nil { + panic("SSHAuthsGetterMock.SSHAuthsFunc: method is nil but SSHAuthsGetter.SSHAuths was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockSSHAuthsGetterMockSSHAuths.Lock() + mock.calls.SSHAuths = append(mock.calls.SSHAuths, callInfo) + lockSSHAuthsGetterMockSSHAuths.Unlock() + return mock.SSHAuthsFunc(namespace) +} + +// SSHAuthsCalls gets all the calls that were made to SSHAuths. +// Check the length with: +// len(mockedSSHAuthsGetter.SSHAuthsCalls()) +func (mock *SSHAuthsGetterMock) SSHAuthsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockSSHAuthsGetterMockSSHAuths.RLock() + calls = mock.calls.SSHAuths + lockSSHAuthsGetterMockSSHAuths.RUnlock() + return calls +} diff --git a/apis/project.cattle.io/v3/fakes/zz_generated_workload_mock_test.go b/apis/project.cattle.io/v3/fakes/zz_generated_workload_mock_test.go new file mode 100644 index 00000000..ad0ff6d8 --- /dev/null +++ b/apis/project.cattle.io/v3/fakes/zz_generated_workload_mock_test.go @@ -0,0 +1,1356 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/project.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockWorkloadListerMockGet sync.RWMutex + lockWorkloadListerMockList sync.RWMutex +) + +// Ensure, that WorkloadListerMock does implement WorkloadLister. +// If this is not the case, regenerate this file with moq. +var _ v3.WorkloadLister = &WorkloadListerMock{} + +// WorkloadListerMock is a mock implementation of WorkloadLister. +// +// func TestSomethingThatUsesWorkloadLister(t *testing.T) { +// +// // make and configure a mocked WorkloadLister +// mockedWorkloadLister := &WorkloadListerMock{ +// GetFunc: func(namespace string, name string) (*v3.Workload, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.Workload, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedWorkloadLister in code that requires WorkloadLister +// // and then make assertions. +// +// } +type WorkloadListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.Workload, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.Workload, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *WorkloadListerMock) Get(namespace string, name string) (*v3.Workload, error) { + if mock.GetFunc == nil { + panic("WorkloadListerMock.GetFunc: method is nil but WorkloadLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockWorkloadListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockWorkloadListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedWorkloadLister.GetCalls()) +func (mock *WorkloadListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockWorkloadListerMockGet.RLock() + calls = mock.calls.Get + lockWorkloadListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *WorkloadListerMock) List(namespace string, selector labels.Selector) ([]*v3.Workload, error) { + if mock.ListFunc == nil { + panic("WorkloadListerMock.ListFunc: method is nil but WorkloadLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockWorkloadListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockWorkloadListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedWorkloadLister.ListCalls()) +func (mock *WorkloadListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockWorkloadListerMockList.RLock() + calls = mock.calls.List + lockWorkloadListerMockList.RUnlock() + return calls +} + +var ( + lockWorkloadControllerMockAddClusterScopedHandler sync.RWMutex + lockWorkloadControllerMockAddHandler sync.RWMutex + lockWorkloadControllerMockEnqueue sync.RWMutex + lockWorkloadControllerMockGeneric sync.RWMutex + lockWorkloadControllerMockInformer sync.RWMutex + lockWorkloadControllerMockLister sync.RWMutex + lockWorkloadControllerMockStart sync.RWMutex + lockWorkloadControllerMockSync sync.RWMutex +) + +// Ensure, that WorkloadControllerMock does implement WorkloadController. +// If this is not the case, regenerate this file with moq. +var _ v3.WorkloadController = &WorkloadControllerMock{} + +// WorkloadControllerMock is a mock implementation of WorkloadController. +// +// func TestSomethingThatUsesWorkloadController(t *testing.T) { +// +// // make and configure a mocked WorkloadController +// mockedWorkloadController := &WorkloadControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.WorkloadHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.WorkloadHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.WorkloadLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedWorkloadController in code that requires WorkloadController +// // and then make assertions. +// +// } +type WorkloadControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.WorkloadHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.WorkloadHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.WorkloadLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.WorkloadHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.WorkloadHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *WorkloadControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.WorkloadHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("WorkloadControllerMock.AddClusterScopedHandlerFunc: method is nil but WorkloadController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.WorkloadHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockWorkloadControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockWorkloadControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedWorkloadController.AddClusterScopedHandlerCalls()) +func (mock *WorkloadControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.WorkloadHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.WorkloadHandlerFunc + } + lockWorkloadControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockWorkloadControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *WorkloadControllerMock) AddHandler(ctx context.Context, name string, handler v3.WorkloadHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("WorkloadControllerMock.AddHandlerFunc: method is nil but WorkloadController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.WorkloadHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockWorkloadControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockWorkloadControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedWorkloadController.AddHandlerCalls()) +func (mock *WorkloadControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.WorkloadHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.WorkloadHandlerFunc + } + lockWorkloadControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockWorkloadControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *WorkloadControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("WorkloadControllerMock.EnqueueFunc: method is nil but WorkloadController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockWorkloadControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockWorkloadControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedWorkloadController.EnqueueCalls()) +func (mock *WorkloadControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockWorkloadControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockWorkloadControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *WorkloadControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("WorkloadControllerMock.GenericFunc: method is nil but WorkloadController.Generic was just called") + } + callInfo := struct { + }{} + lockWorkloadControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockWorkloadControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedWorkloadController.GenericCalls()) +func (mock *WorkloadControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockWorkloadControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockWorkloadControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *WorkloadControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("WorkloadControllerMock.InformerFunc: method is nil but WorkloadController.Informer was just called") + } + callInfo := struct { + }{} + lockWorkloadControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockWorkloadControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedWorkloadController.InformerCalls()) +func (mock *WorkloadControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockWorkloadControllerMockInformer.RLock() + calls = mock.calls.Informer + lockWorkloadControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *WorkloadControllerMock) Lister() v3.WorkloadLister { + if mock.ListerFunc == nil { + panic("WorkloadControllerMock.ListerFunc: method is nil but WorkloadController.Lister was just called") + } + callInfo := struct { + }{} + lockWorkloadControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockWorkloadControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedWorkloadController.ListerCalls()) +func (mock *WorkloadControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockWorkloadControllerMockLister.RLock() + calls = mock.calls.Lister + lockWorkloadControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *WorkloadControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("WorkloadControllerMock.StartFunc: method is nil but WorkloadController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockWorkloadControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockWorkloadControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedWorkloadController.StartCalls()) +func (mock *WorkloadControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockWorkloadControllerMockStart.RLock() + calls = mock.calls.Start + lockWorkloadControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *WorkloadControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("WorkloadControllerMock.SyncFunc: method is nil but WorkloadController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockWorkloadControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockWorkloadControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedWorkloadController.SyncCalls()) +func (mock *WorkloadControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockWorkloadControllerMockSync.RLock() + calls = mock.calls.Sync + lockWorkloadControllerMockSync.RUnlock() + return calls +} + +var ( + lockWorkloadInterfaceMockAddClusterScopedHandler sync.RWMutex + lockWorkloadInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockWorkloadInterfaceMockAddHandler sync.RWMutex + lockWorkloadInterfaceMockAddLifecycle sync.RWMutex + lockWorkloadInterfaceMockController sync.RWMutex + lockWorkloadInterfaceMockCreate sync.RWMutex + lockWorkloadInterfaceMockDelete sync.RWMutex + lockWorkloadInterfaceMockDeleteCollection sync.RWMutex + lockWorkloadInterfaceMockDeleteNamespaced sync.RWMutex + lockWorkloadInterfaceMockGet sync.RWMutex + lockWorkloadInterfaceMockGetNamespaced sync.RWMutex + lockWorkloadInterfaceMockList sync.RWMutex + lockWorkloadInterfaceMockObjectClient sync.RWMutex + lockWorkloadInterfaceMockUpdate sync.RWMutex + lockWorkloadInterfaceMockWatch sync.RWMutex +) + +// Ensure, that WorkloadInterfaceMock does implement WorkloadInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.WorkloadInterface = &WorkloadInterfaceMock{} + +// WorkloadInterfaceMock is a mock implementation of WorkloadInterface. +// +// func TestSomethingThatUsesWorkloadInterface(t *testing.T) { +// +// // make and configure a mocked WorkloadInterface +// mockedWorkloadInterface := &WorkloadInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.WorkloadHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.WorkloadLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.WorkloadHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.WorkloadLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.WorkloadController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.Workload) (*v3.Workload, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.Workload, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.Workload, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.WorkloadList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.Workload) (*v3.Workload, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedWorkloadInterface in code that requires WorkloadInterface +// // and then make assertions. +// +// } +type WorkloadInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.WorkloadHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.WorkloadLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.WorkloadHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.WorkloadLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.WorkloadController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.Workload) (*v3.Workload, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.Workload, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.Workload, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.WorkloadList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.Workload) (*v3.Workload, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.WorkloadHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.WorkloadLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.WorkloadHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.WorkloadLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.Workload + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.Workload + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *WorkloadInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.WorkloadHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("WorkloadInterfaceMock.AddClusterScopedHandlerFunc: method is nil but WorkloadInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.WorkloadHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockWorkloadInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockWorkloadInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedWorkloadInterface.AddClusterScopedHandlerCalls()) +func (mock *WorkloadInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.WorkloadHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.WorkloadHandlerFunc + } + lockWorkloadInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockWorkloadInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *WorkloadInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.WorkloadLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("WorkloadInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but WorkloadInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.WorkloadLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockWorkloadInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockWorkloadInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedWorkloadInterface.AddClusterScopedLifecycleCalls()) +func (mock *WorkloadInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.WorkloadLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.WorkloadLifecycle + } + lockWorkloadInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockWorkloadInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *WorkloadInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.WorkloadHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("WorkloadInterfaceMock.AddHandlerFunc: method is nil but WorkloadInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.WorkloadHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockWorkloadInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockWorkloadInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedWorkloadInterface.AddHandlerCalls()) +func (mock *WorkloadInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.WorkloadHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.WorkloadHandlerFunc + } + lockWorkloadInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockWorkloadInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *WorkloadInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.WorkloadLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("WorkloadInterfaceMock.AddLifecycleFunc: method is nil but WorkloadInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.WorkloadLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockWorkloadInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockWorkloadInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedWorkloadInterface.AddLifecycleCalls()) +func (mock *WorkloadInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.WorkloadLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.WorkloadLifecycle + } + lockWorkloadInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockWorkloadInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *WorkloadInterfaceMock) Controller() v3.WorkloadController { + if mock.ControllerFunc == nil { + panic("WorkloadInterfaceMock.ControllerFunc: method is nil but WorkloadInterface.Controller was just called") + } + callInfo := struct { + }{} + lockWorkloadInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockWorkloadInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedWorkloadInterface.ControllerCalls()) +func (mock *WorkloadInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockWorkloadInterfaceMockController.RLock() + calls = mock.calls.Controller + lockWorkloadInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *WorkloadInterfaceMock) Create(in1 *v3.Workload) (*v3.Workload, error) { + if mock.CreateFunc == nil { + panic("WorkloadInterfaceMock.CreateFunc: method is nil but WorkloadInterface.Create was just called") + } + callInfo := struct { + In1 *v3.Workload + }{ + In1: in1, + } + lockWorkloadInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockWorkloadInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedWorkloadInterface.CreateCalls()) +func (mock *WorkloadInterfaceMock) CreateCalls() []struct { + In1 *v3.Workload +} { + var calls []struct { + In1 *v3.Workload + } + lockWorkloadInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockWorkloadInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *WorkloadInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("WorkloadInterfaceMock.DeleteFunc: method is nil but WorkloadInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockWorkloadInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockWorkloadInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedWorkloadInterface.DeleteCalls()) +func (mock *WorkloadInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockWorkloadInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockWorkloadInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *WorkloadInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("WorkloadInterfaceMock.DeleteCollectionFunc: method is nil but WorkloadInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockWorkloadInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockWorkloadInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedWorkloadInterface.DeleteCollectionCalls()) +func (mock *WorkloadInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockWorkloadInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockWorkloadInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *WorkloadInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("WorkloadInterfaceMock.DeleteNamespacedFunc: method is nil but WorkloadInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockWorkloadInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockWorkloadInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedWorkloadInterface.DeleteNamespacedCalls()) +func (mock *WorkloadInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockWorkloadInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockWorkloadInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *WorkloadInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.Workload, error) { + if mock.GetFunc == nil { + panic("WorkloadInterfaceMock.GetFunc: method is nil but WorkloadInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockWorkloadInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockWorkloadInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedWorkloadInterface.GetCalls()) +func (mock *WorkloadInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockWorkloadInterfaceMockGet.RLock() + calls = mock.calls.Get + lockWorkloadInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *WorkloadInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.Workload, error) { + if mock.GetNamespacedFunc == nil { + panic("WorkloadInterfaceMock.GetNamespacedFunc: method is nil but WorkloadInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockWorkloadInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockWorkloadInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedWorkloadInterface.GetNamespacedCalls()) +func (mock *WorkloadInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockWorkloadInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockWorkloadInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *WorkloadInterfaceMock) List(opts v1.ListOptions) (*v3.WorkloadList, error) { + if mock.ListFunc == nil { + panic("WorkloadInterfaceMock.ListFunc: method is nil but WorkloadInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockWorkloadInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockWorkloadInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedWorkloadInterface.ListCalls()) +func (mock *WorkloadInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockWorkloadInterfaceMockList.RLock() + calls = mock.calls.List + lockWorkloadInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *WorkloadInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("WorkloadInterfaceMock.ObjectClientFunc: method is nil but WorkloadInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockWorkloadInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockWorkloadInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedWorkloadInterface.ObjectClientCalls()) +func (mock *WorkloadInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockWorkloadInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockWorkloadInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *WorkloadInterfaceMock) Update(in1 *v3.Workload) (*v3.Workload, error) { + if mock.UpdateFunc == nil { + panic("WorkloadInterfaceMock.UpdateFunc: method is nil but WorkloadInterface.Update was just called") + } + callInfo := struct { + In1 *v3.Workload + }{ + In1: in1, + } + lockWorkloadInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockWorkloadInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedWorkloadInterface.UpdateCalls()) +func (mock *WorkloadInterfaceMock) UpdateCalls() []struct { + In1 *v3.Workload +} { + var calls []struct { + In1 *v3.Workload + } + lockWorkloadInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockWorkloadInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *WorkloadInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("WorkloadInterfaceMock.WatchFunc: method is nil but WorkloadInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockWorkloadInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockWorkloadInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedWorkloadInterface.WatchCalls()) +func (mock *WorkloadInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockWorkloadInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockWorkloadInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockWorkloadsGetterMockWorkloads sync.RWMutex +) + +// Ensure, that WorkloadsGetterMock does implement WorkloadsGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.WorkloadsGetter = &WorkloadsGetterMock{} + +// WorkloadsGetterMock is a mock implementation of WorkloadsGetter. +// +// func TestSomethingThatUsesWorkloadsGetter(t *testing.T) { +// +// // make and configure a mocked WorkloadsGetter +// mockedWorkloadsGetter := &WorkloadsGetterMock{ +// WorkloadsFunc: func(namespace string) v3.WorkloadInterface { +// panic("mock out the Workloads method") +// }, +// } +// +// // use mockedWorkloadsGetter in code that requires WorkloadsGetter +// // and then make assertions. +// +// } +type WorkloadsGetterMock struct { + // WorkloadsFunc mocks the Workloads method. + WorkloadsFunc func(namespace string) v3.WorkloadInterface + + // calls tracks calls to the methods. + calls struct { + // Workloads holds details about calls to the Workloads method. + Workloads []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// Workloads calls WorkloadsFunc. +func (mock *WorkloadsGetterMock) Workloads(namespace string) v3.WorkloadInterface { + if mock.WorkloadsFunc == nil { + panic("WorkloadsGetterMock.WorkloadsFunc: method is nil but WorkloadsGetter.Workloads was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockWorkloadsGetterMockWorkloads.Lock() + mock.calls.Workloads = append(mock.calls.Workloads, callInfo) + lockWorkloadsGetterMockWorkloads.Unlock() + return mock.WorkloadsFunc(namespace) +} + +// WorkloadsCalls gets all the calls that were made to Workloads. +// Check the length with: +// len(mockedWorkloadsGetter.WorkloadsCalls()) +func (mock *WorkloadsGetterMock) WorkloadsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockWorkloadsGetterMockWorkloads.RLock() + calls = mock.calls.Workloads + lockWorkloadsGetterMockWorkloads.RUnlock() + return calls +} diff --git a/apis/project.cattle.io/v3/zz_generated_app_controller.go b/apis/project.cattle.io/v3/zz_generated_app_controller.go index 5b6b98b4..b6afbf05 100644 --- a/apis/project.cattle.io/v3/zz_generated_app_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_app_controller.go @@ -40,7 +40,7 @@ func NewApp(namespace, name string, obj App) *App { type AppList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []App + Items []App `json:"items"` } type AppHandlerFunc func(key string, obj *App) (runtime.Object, error) diff --git a/apis/project.cattle.io/v3/zz_generated_app_revision_controller.go b/apis/project.cattle.io/v3/zz_generated_app_revision_controller.go index 84c1413a..2f8c56c3 100644 --- a/apis/project.cattle.io/v3/zz_generated_app_revision_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_app_revision_controller.go @@ -40,7 +40,7 @@ func NewAppRevision(namespace, name string, obj AppRevision) *AppRevision { type AppRevisionList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []AppRevision + Items []AppRevision `json:"items"` } type AppRevisionHandlerFunc func(key string, obj *AppRevision) (runtime.Object, error) diff --git a/apis/project.cattle.io/v3/zz_generated_basic_auth_controller.go b/apis/project.cattle.io/v3/zz_generated_basic_auth_controller.go index c82ff1b6..8d185791 100644 --- a/apis/project.cattle.io/v3/zz_generated_basic_auth_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_basic_auth_controller.go @@ -40,7 +40,7 @@ func NewBasicAuth(namespace, name string, obj BasicAuth) *BasicAuth { type BasicAuthList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []BasicAuth + Items []BasicAuth `json:"items"` } type BasicAuthHandlerFunc func(key string, obj *BasicAuth) (runtime.Object, error) diff --git a/apis/project.cattle.io/v3/zz_generated_certificate_controller.go b/apis/project.cattle.io/v3/zz_generated_certificate_controller.go index 4cecf5e3..d0a22e6e 100644 --- a/apis/project.cattle.io/v3/zz_generated_certificate_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_certificate_controller.go @@ -40,7 +40,7 @@ func NewCertificate(namespace, name string, obj Certificate) *Certificate { type CertificateList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []Certificate + Items []Certificate `json:"items"` } type CertificateHandlerFunc func(key string, obj *Certificate) (runtime.Object, error) diff --git a/apis/project.cattle.io/v3/zz_generated_docker_credential_controller.go b/apis/project.cattle.io/v3/zz_generated_docker_credential_controller.go index 48bd6d97..08ab03d8 100644 --- a/apis/project.cattle.io/v3/zz_generated_docker_credential_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_docker_credential_controller.go @@ -40,7 +40,7 @@ func NewDockerCredential(namespace, name string, obj DockerCredential) *DockerCr type DockerCredentialList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []DockerCredential + Items []DockerCredential `json:"items"` } type DockerCredentialHandlerFunc func(key string, obj *DockerCredential) (runtime.Object, error) diff --git a/apis/project.cattle.io/v3/zz_generated_namespaced_basic_auth_controller.go b/apis/project.cattle.io/v3/zz_generated_namespaced_basic_auth_controller.go index ad94bc31..64ed4acc 100644 --- a/apis/project.cattle.io/v3/zz_generated_namespaced_basic_auth_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_namespaced_basic_auth_controller.go @@ -40,7 +40,7 @@ func NewNamespacedBasicAuth(namespace, name string, obj NamespacedBasicAuth) *Na type NamespacedBasicAuthList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []NamespacedBasicAuth + Items []NamespacedBasicAuth `json:"items"` } type NamespacedBasicAuthHandlerFunc func(key string, obj *NamespacedBasicAuth) (runtime.Object, error) diff --git a/apis/project.cattle.io/v3/zz_generated_namespaced_certificate_controller.go b/apis/project.cattle.io/v3/zz_generated_namespaced_certificate_controller.go index 063c4599..f796e36b 100644 --- a/apis/project.cattle.io/v3/zz_generated_namespaced_certificate_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_namespaced_certificate_controller.go @@ -40,7 +40,7 @@ func NewNamespacedCertificate(namespace, name string, obj NamespacedCertificate) type NamespacedCertificateList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []NamespacedCertificate + Items []NamespacedCertificate `json:"items"` } type NamespacedCertificateHandlerFunc func(key string, obj *NamespacedCertificate) (runtime.Object, error) diff --git a/apis/project.cattle.io/v3/zz_generated_namespaced_docker_credential_controller.go b/apis/project.cattle.io/v3/zz_generated_namespaced_docker_credential_controller.go index 21be57f1..51897b65 100644 --- a/apis/project.cattle.io/v3/zz_generated_namespaced_docker_credential_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_namespaced_docker_credential_controller.go @@ -40,7 +40,7 @@ func NewNamespacedDockerCredential(namespace, name string, obj NamespacedDockerC type NamespacedDockerCredentialList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []NamespacedDockerCredential + Items []NamespacedDockerCredential `json:"items"` } type NamespacedDockerCredentialHandlerFunc func(key string, obj *NamespacedDockerCredential) (runtime.Object, error) diff --git a/apis/project.cattle.io/v3/zz_generated_namespaced_service_account_token_controller.go b/apis/project.cattle.io/v3/zz_generated_namespaced_service_account_token_controller.go index 7c8604d2..16ea1f6c 100644 --- a/apis/project.cattle.io/v3/zz_generated_namespaced_service_account_token_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_namespaced_service_account_token_controller.go @@ -40,7 +40,7 @@ func NewNamespacedServiceAccountToken(namespace, name string, obj NamespacedServ type NamespacedServiceAccountTokenList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []NamespacedServiceAccountToken + Items []NamespacedServiceAccountToken `json:"items"` } type NamespacedServiceAccountTokenHandlerFunc func(key string, obj *NamespacedServiceAccountToken) (runtime.Object, error) diff --git a/apis/project.cattle.io/v3/zz_generated_namespaced_ssh_auth_controller.go b/apis/project.cattle.io/v3/zz_generated_namespaced_ssh_auth_controller.go index 6f2e2bc0..22279ecd 100644 --- a/apis/project.cattle.io/v3/zz_generated_namespaced_ssh_auth_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_namespaced_ssh_auth_controller.go @@ -40,7 +40,7 @@ func NewNamespacedSSHAuth(namespace, name string, obj NamespacedSSHAuth) *Namesp type NamespacedSSHAuthList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []NamespacedSSHAuth + Items []NamespacedSSHAuth `json:"items"` } type NamespacedSSHAuthHandlerFunc func(key string, obj *NamespacedSSHAuth) (runtime.Object, error) diff --git a/apis/project.cattle.io/v3/zz_generated_pipeline_controller.go b/apis/project.cattle.io/v3/zz_generated_pipeline_controller.go index 51123ec5..95f6991e 100644 --- a/apis/project.cattle.io/v3/zz_generated_pipeline_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_pipeline_controller.go @@ -40,7 +40,7 @@ func NewPipeline(namespace, name string, obj Pipeline) *Pipeline { type PipelineList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []Pipeline + Items []Pipeline `json:"items"` } type PipelineHandlerFunc func(key string, obj *Pipeline) (runtime.Object, error) diff --git a/apis/project.cattle.io/v3/zz_generated_pipeline_execution_controller.go b/apis/project.cattle.io/v3/zz_generated_pipeline_execution_controller.go index 589a97ea..54cba715 100644 --- a/apis/project.cattle.io/v3/zz_generated_pipeline_execution_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_pipeline_execution_controller.go @@ -40,7 +40,7 @@ func NewPipelineExecution(namespace, name string, obj PipelineExecution) *Pipeli type PipelineExecutionList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []PipelineExecution + Items []PipelineExecution `json:"items"` } type PipelineExecutionHandlerFunc func(key string, obj *PipelineExecution) (runtime.Object, error) diff --git a/apis/project.cattle.io/v3/zz_generated_pipeline_setting_controller.go b/apis/project.cattle.io/v3/zz_generated_pipeline_setting_controller.go index ec2a1156..888c7c96 100644 --- a/apis/project.cattle.io/v3/zz_generated_pipeline_setting_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_pipeline_setting_controller.go @@ -40,7 +40,7 @@ func NewPipelineSetting(namespace, name string, obj PipelineSetting) *PipelineSe type PipelineSettingList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []PipelineSetting + Items []PipelineSetting `json:"items"` } type PipelineSettingHandlerFunc func(key string, obj *PipelineSetting) (runtime.Object, error) diff --git a/apis/project.cattle.io/v3/zz_generated_scheme.go b/apis/project.cattle.io/v3/zz_generated_scheme.go index 6466758f..cbc29c95 100644 --- a/apis/project.cattle.io/v3/zz_generated_scheme.go +++ b/apis/project.cattle.io/v3/zz_generated_scheme.go @@ -1,6 +1,7 @@ package v3 import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) @@ -74,5 +75,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &SourceCodeRepository{}, &SourceCodeRepositoryList{}, ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil } diff --git a/apis/project.cattle.io/v3/zz_generated_service_account_token_controller.go b/apis/project.cattle.io/v3/zz_generated_service_account_token_controller.go index 4b759da2..89510655 100644 --- a/apis/project.cattle.io/v3/zz_generated_service_account_token_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_service_account_token_controller.go @@ -40,7 +40,7 @@ func NewServiceAccountToken(namespace, name string, obj ServiceAccountToken) *Se type ServiceAccountTokenList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []ServiceAccountToken + Items []ServiceAccountToken `json:"items"` } type ServiceAccountTokenHandlerFunc func(key string, obj *ServiceAccountToken) (runtime.Object, error) diff --git a/apis/project.cattle.io/v3/zz_generated_source_code_credential_controller.go b/apis/project.cattle.io/v3/zz_generated_source_code_credential_controller.go index 93d365e7..8090bf2f 100644 --- a/apis/project.cattle.io/v3/zz_generated_source_code_credential_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_source_code_credential_controller.go @@ -40,7 +40,7 @@ func NewSourceCodeCredential(namespace, name string, obj SourceCodeCredential) * type SourceCodeCredentialList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []SourceCodeCredential + Items []SourceCodeCredential `json:"items"` } type SourceCodeCredentialHandlerFunc func(key string, obj *SourceCodeCredential) (runtime.Object, error) diff --git a/apis/project.cattle.io/v3/zz_generated_source_code_provider_config_controller.go b/apis/project.cattle.io/v3/zz_generated_source_code_provider_config_controller.go index 4011aa78..bb23e6ee 100644 --- a/apis/project.cattle.io/v3/zz_generated_source_code_provider_config_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_source_code_provider_config_controller.go @@ -40,7 +40,7 @@ func NewSourceCodeProviderConfig(namespace, name string, obj SourceCodeProviderC type SourceCodeProviderConfigList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []SourceCodeProviderConfig + Items []SourceCodeProviderConfig `json:"items"` } type SourceCodeProviderConfigHandlerFunc func(key string, obj *SourceCodeProviderConfig) (runtime.Object, error) diff --git a/apis/project.cattle.io/v3/zz_generated_source_code_provider_controller.go b/apis/project.cattle.io/v3/zz_generated_source_code_provider_controller.go index af6a517d..b6e32b7c 100644 --- a/apis/project.cattle.io/v3/zz_generated_source_code_provider_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_source_code_provider_controller.go @@ -39,7 +39,7 @@ func NewSourceCodeProvider(namespace, name string, obj SourceCodeProvider) *Sour type SourceCodeProviderList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []SourceCodeProvider + Items []SourceCodeProvider `json:"items"` } type SourceCodeProviderHandlerFunc func(key string, obj *SourceCodeProvider) (runtime.Object, error) diff --git a/apis/project.cattle.io/v3/zz_generated_source_code_repository_controller.go b/apis/project.cattle.io/v3/zz_generated_source_code_repository_controller.go index d805d49e..15158413 100644 --- a/apis/project.cattle.io/v3/zz_generated_source_code_repository_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_source_code_repository_controller.go @@ -40,7 +40,7 @@ func NewSourceCodeRepository(namespace, name string, obj SourceCodeRepository) * type SourceCodeRepositoryList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []SourceCodeRepository + Items []SourceCodeRepository `json:"items"` } type SourceCodeRepositoryHandlerFunc func(key string, obj *SourceCodeRepository) (runtime.Object, error) diff --git a/apis/project.cattle.io/v3/zz_generated_ssh_auth_controller.go b/apis/project.cattle.io/v3/zz_generated_ssh_auth_controller.go index f9b0e9bc..54a74427 100644 --- a/apis/project.cattle.io/v3/zz_generated_ssh_auth_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_ssh_auth_controller.go @@ -40,7 +40,7 @@ func NewSSHAuth(namespace, name string, obj SSHAuth) *SSHAuth { type SSHAuthList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []SSHAuth + Items []SSHAuth `json:"items"` } type SSHAuthHandlerFunc func(key string, obj *SSHAuth) (runtime.Object, error) diff --git a/apis/project.cattle.io/v3/zz_generated_workload_controller.go b/apis/project.cattle.io/v3/zz_generated_workload_controller.go index 1979e395..df958e71 100644 --- a/apis/project.cattle.io/v3/zz_generated_workload_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_workload_controller.go @@ -40,7 +40,7 @@ func NewWorkload(namespace, name string, obj Workload) *Workload { type WorkloadList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []Workload + Items []Workload `json:"items"` } type WorkloadHandlerFunc func(key string, obj *Workload) (runtime.Object, error) diff --git a/apis/rbac.authorization.k8s.io/v1/fakes/zz_generated_cluster_role_binding_mock_test.go b/apis/rbac.authorization.k8s.io/v1/fakes/zz_generated_cluster_role_binding_mock_test.go new file mode 100644 index 00000000..92418c35 --- /dev/null +++ b/apis/rbac.authorization.k8s.io/v1/fakes/zz_generated_cluster_role_binding_mock_test.go @@ -0,0 +1,1357 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v1a "github.com/rancher/types/apis/rbac.authorization.k8s.io/v1" + v1 "k8s.io/api/rbac/v1" + v1b "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockClusterRoleBindingListerMockGet sync.RWMutex + lockClusterRoleBindingListerMockList sync.RWMutex +) + +// Ensure, that ClusterRoleBindingListerMock does implement ClusterRoleBindingLister. +// If this is not the case, regenerate this file with moq. +var _ v1a.ClusterRoleBindingLister = &ClusterRoleBindingListerMock{} + +// ClusterRoleBindingListerMock is a mock implementation of ClusterRoleBindingLister. +// +// func TestSomethingThatUsesClusterRoleBindingLister(t *testing.T) { +// +// // make and configure a mocked ClusterRoleBindingLister +// mockedClusterRoleBindingLister := &ClusterRoleBindingListerMock{ +// GetFunc: func(namespace string, name string) (*v1.ClusterRoleBinding, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v1.ClusterRoleBinding, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedClusterRoleBindingLister in code that requires ClusterRoleBindingLister +// // and then make assertions. +// +// } +type ClusterRoleBindingListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v1.ClusterRoleBinding, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v1.ClusterRoleBinding, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *ClusterRoleBindingListerMock) Get(namespace string, name string) (*v1.ClusterRoleBinding, error) { + if mock.GetFunc == nil { + panic("ClusterRoleBindingListerMock.GetFunc: method is nil but ClusterRoleBindingLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockClusterRoleBindingListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockClusterRoleBindingListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedClusterRoleBindingLister.GetCalls()) +func (mock *ClusterRoleBindingListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockClusterRoleBindingListerMockGet.RLock() + calls = mock.calls.Get + lockClusterRoleBindingListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ClusterRoleBindingListerMock) List(namespace string, selector labels.Selector) ([]*v1.ClusterRoleBinding, error) { + if mock.ListFunc == nil { + panic("ClusterRoleBindingListerMock.ListFunc: method is nil but ClusterRoleBindingLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockClusterRoleBindingListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockClusterRoleBindingListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedClusterRoleBindingLister.ListCalls()) +func (mock *ClusterRoleBindingListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockClusterRoleBindingListerMockList.RLock() + calls = mock.calls.List + lockClusterRoleBindingListerMockList.RUnlock() + return calls +} + +var ( + lockClusterRoleBindingControllerMockAddClusterScopedHandler sync.RWMutex + lockClusterRoleBindingControllerMockAddHandler sync.RWMutex + lockClusterRoleBindingControllerMockEnqueue sync.RWMutex + lockClusterRoleBindingControllerMockGeneric sync.RWMutex + lockClusterRoleBindingControllerMockInformer sync.RWMutex + lockClusterRoleBindingControllerMockLister sync.RWMutex + lockClusterRoleBindingControllerMockStart sync.RWMutex + lockClusterRoleBindingControllerMockSync sync.RWMutex +) + +// Ensure, that ClusterRoleBindingControllerMock does implement ClusterRoleBindingController. +// If this is not the case, regenerate this file with moq. +var _ v1a.ClusterRoleBindingController = &ClusterRoleBindingControllerMock{} + +// ClusterRoleBindingControllerMock is a mock implementation of ClusterRoleBindingController. +// +// func TestSomethingThatUsesClusterRoleBindingController(t *testing.T) { +// +// // make and configure a mocked ClusterRoleBindingController +// mockedClusterRoleBindingController := &ClusterRoleBindingControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v1a.ClusterRoleBindingHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v1a.ClusterRoleBindingHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v1a.ClusterRoleBindingLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedClusterRoleBindingController in code that requires ClusterRoleBindingController +// // and then make assertions. +// +// } +type ClusterRoleBindingControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v1a.ClusterRoleBindingHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v1a.ClusterRoleBindingHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v1a.ClusterRoleBindingLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v1a.ClusterRoleBindingHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v1a.ClusterRoleBindingHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ClusterRoleBindingControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v1a.ClusterRoleBindingHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ClusterRoleBindingControllerMock.AddClusterScopedHandlerFunc: method is nil but ClusterRoleBindingController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.ClusterRoleBindingHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockClusterRoleBindingControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockClusterRoleBindingControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedClusterRoleBindingController.AddClusterScopedHandlerCalls()) +func (mock *ClusterRoleBindingControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.ClusterRoleBindingHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.ClusterRoleBindingHandlerFunc + } + lockClusterRoleBindingControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockClusterRoleBindingControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ClusterRoleBindingControllerMock) AddHandler(ctx context.Context, name string, handler v1a.ClusterRoleBindingHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ClusterRoleBindingControllerMock.AddHandlerFunc: method is nil but ClusterRoleBindingController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v1a.ClusterRoleBindingHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockClusterRoleBindingControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockClusterRoleBindingControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedClusterRoleBindingController.AddHandlerCalls()) +func (mock *ClusterRoleBindingControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v1a.ClusterRoleBindingHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v1a.ClusterRoleBindingHandlerFunc + } + lockClusterRoleBindingControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockClusterRoleBindingControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *ClusterRoleBindingControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("ClusterRoleBindingControllerMock.EnqueueFunc: method is nil but ClusterRoleBindingController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockClusterRoleBindingControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockClusterRoleBindingControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedClusterRoleBindingController.EnqueueCalls()) +func (mock *ClusterRoleBindingControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockClusterRoleBindingControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockClusterRoleBindingControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *ClusterRoleBindingControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("ClusterRoleBindingControllerMock.GenericFunc: method is nil but ClusterRoleBindingController.Generic was just called") + } + callInfo := struct { + }{} + lockClusterRoleBindingControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockClusterRoleBindingControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedClusterRoleBindingController.GenericCalls()) +func (mock *ClusterRoleBindingControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockClusterRoleBindingControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockClusterRoleBindingControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *ClusterRoleBindingControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("ClusterRoleBindingControllerMock.InformerFunc: method is nil but ClusterRoleBindingController.Informer was just called") + } + callInfo := struct { + }{} + lockClusterRoleBindingControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockClusterRoleBindingControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedClusterRoleBindingController.InformerCalls()) +func (mock *ClusterRoleBindingControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockClusterRoleBindingControllerMockInformer.RLock() + calls = mock.calls.Informer + lockClusterRoleBindingControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *ClusterRoleBindingControllerMock) Lister() v1a.ClusterRoleBindingLister { + if mock.ListerFunc == nil { + panic("ClusterRoleBindingControllerMock.ListerFunc: method is nil but ClusterRoleBindingController.Lister was just called") + } + callInfo := struct { + }{} + lockClusterRoleBindingControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockClusterRoleBindingControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedClusterRoleBindingController.ListerCalls()) +func (mock *ClusterRoleBindingControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockClusterRoleBindingControllerMockLister.RLock() + calls = mock.calls.Lister + lockClusterRoleBindingControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *ClusterRoleBindingControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("ClusterRoleBindingControllerMock.StartFunc: method is nil but ClusterRoleBindingController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockClusterRoleBindingControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockClusterRoleBindingControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedClusterRoleBindingController.StartCalls()) +func (mock *ClusterRoleBindingControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockClusterRoleBindingControllerMockStart.RLock() + calls = mock.calls.Start + lockClusterRoleBindingControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *ClusterRoleBindingControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("ClusterRoleBindingControllerMock.SyncFunc: method is nil but ClusterRoleBindingController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockClusterRoleBindingControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockClusterRoleBindingControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedClusterRoleBindingController.SyncCalls()) +func (mock *ClusterRoleBindingControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockClusterRoleBindingControllerMockSync.RLock() + calls = mock.calls.Sync + lockClusterRoleBindingControllerMockSync.RUnlock() + return calls +} + +var ( + lockClusterRoleBindingInterfaceMockAddClusterScopedHandler sync.RWMutex + lockClusterRoleBindingInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockClusterRoleBindingInterfaceMockAddHandler sync.RWMutex + lockClusterRoleBindingInterfaceMockAddLifecycle sync.RWMutex + lockClusterRoleBindingInterfaceMockController sync.RWMutex + lockClusterRoleBindingInterfaceMockCreate sync.RWMutex + lockClusterRoleBindingInterfaceMockDelete sync.RWMutex + lockClusterRoleBindingInterfaceMockDeleteCollection sync.RWMutex + lockClusterRoleBindingInterfaceMockDeleteNamespaced sync.RWMutex + lockClusterRoleBindingInterfaceMockGet sync.RWMutex + lockClusterRoleBindingInterfaceMockGetNamespaced sync.RWMutex + lockClusterRoleBindingInterfaceMockList sync.RWMutex + lockClusterRoleBindingInterfaceMockObjectClient sync.RWMutex + lockClusterRoleBindingInterfaceMockUpdate sync.RWMutex + lockClusterRoleBindingInterfaceMockWatch sync.RWMutex +) + +// Ensure, that ClusterRoleBindingInterfaceMock does implement ClusterRoleBindingInterface. +// If this is not the case, regenerate this file with moq. +var _ v1a.ClusterRoleBindingInterface = &ClusterRoleBindingInterfaceMock{} + +// ClusterRoleBindingInterfaceMock is a mock implementation of ClusterRoleBindingInterface. +// +// func TestSomethingThatUsesClusterRoleBindingInterface(t *testing.T) { +// +// // make and configure a mocked ClusterRoleBindingInterface +// mockedClusterRoleBindingInterface := &ClusterRoleBindingInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v1a.ClusterRoleBindingHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v1a.ClusterRoleBindingLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v1a.ClusterRoleBindingHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v1a.ClusterRoleBindingLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v1a.ClusterRoleBindingController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v1.ClusterRoleBinding) (*v1.ClusterRoleBinding, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1b.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1b.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1b.GetOptions) (*v1.ClusterRoleBinding, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.ClusterRoleBinding, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1b.ListOptions) (*v1a.ClusterRoleBindingList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v1.ClusterRoleBinding) (*v1.ClusterRoleBinding, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1b.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedClusterRoleBindingInterface in code that requires ClusterRoleBindingInterface +// // and then make assertions. +// +// } +type ClusterRoleBindingInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v1a.ClusterRoleBindingHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v1a.ClusterRoleBindingLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v1a.ClusterRoleBindingHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v1a.ClusterRoleBindingLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v1a.ClusterRoleBindingController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v1.ClusterRoleBinding) (*v1.ClusterRoleBinding, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1b.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1b.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1b.GetOptions) (*v1.ClusterRoleBinding, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.ClusterRoleBinding, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1b.ListOptions) (*v1a.ClusterRoleBindingList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v1.ClusterRoleBinding) (*v1.ClusterRoleBinding, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1b.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v1a.ClusterRoleBindingHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v1a.ClusterRoleBindingLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v1a.ClusterRoleBindingHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v1a.ClusterRoleBindingLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v1.ClusterRoleBinding + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1b.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1b.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1b.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1b.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1b.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1b.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1b.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v1.ClusterRoleBinding + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1b.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ClusterRoleBindingInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v1a.ClusterRoleBindingHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ClusterRoleBindingInterfaceMock.AddClusterScopedHandlerFunc: method is nil but ClusterRoleBindingInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.ClusterRoleBindingHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockClusterRoleBindingInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockClusterRoleBindingInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedClusterRoleBindingInterface.AddClusterScopedHandlerCalls()) +func (mock *ClusterRoleBindingInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.ClusterRoleBindingHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.ClusterRoleBindingHandlerFunc + } + lockClusterRoleBindingInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockClusterRoleBindingInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *ClusterRoleBindingInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v1a.ClusterRoleBindingLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("ClusterRoleBindingInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but ClusterRoleBindingInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.ClusterRoleBindingLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockClusterRoleBindingInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockClusterRoleBindingInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedClusterRoleBindingInterface.AddClusterScopedLifecycleCalls()) +func (mock *ClusterRoleBindingInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.ClusterRoleBindingLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.ClusterRoleBindingLifecycle + } + lockClusterRoleBindingInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockClusterRoleBindingInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ClusterRoleBindingInterfaceMock) AddHandler(ctx context.Context, name string, sync v1a.ClusterRoleBindingHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ClusterRoleBindingInterfaceMock.AddHandlerFunc: method is nil but ClusterRoleBindingInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v1a.ClusterRoleBindingHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockClusterRoleBindingInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockClusterRoleBindingInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedClusterRoleBindingInterface.AddHandlerCalls()) +func (mock *ClusterRoleBindingInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v1a.ClusterRoleBindingHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v1a.ClusterRoleBindingHandlerFunc + } + lockClusterRoleBindingInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockClusterRoleBindingInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *ClusterRoleBindingInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v1a.ClusterRoleBindingLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("ClusterRoleBindingInterfaceMock.AddLifecycleFunc: method is nil but ClusterRoleBindingInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v1a.ClusterRoleBindingLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockClusterRoleBindingInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockClusterRoleBindingInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedClusterRoleBindingInterface.AddLifecycleCalls()) +func (mock *ClusterRoleBindingInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v1a.ClusterRoleBindingLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v1a.ClusterRoleBindingLifecycle + } + lockClusterRoleBindingInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockClusterRoleBindingInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *ClusterRoleBindingInterfaceMock) Controller() v1a.ClusterRoleBindingController { + if mock.ControllerFunc == nil { + panic("ClusterRoleBindingInterfaceMock.ControllerFunc: method is nil but ClusterRoleBindingInterface.Controller was just called") + } + callInfo := struct { + }{} + lockClusterRoleBindingInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockClusterRoleBindingInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedClusterRoleBindingInterface.ControllerCalls()) +func (mock *ClusterRoleBindingInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockClusterRoleBindingInterfaceMockController.RLock() + calls = mock.calls.Controller + lockClusterRoleBindingInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *ClusterRoleBindingInterfaceMock) Create(in1 *v1.ClusterRoleBinding) (*v1.ClusterRoleBinding, error) { + if mock.CreateFunc == nil { + panic("ClusterRoleBindingInterfaceMock.CreateFunc: method is nil but ClusterRoleBindingInterface.Create was just called") + } + callInfo := struct { + In1 *v1.ClusterRoleBinding + }{ + In1: in1, + } + lockClusterRoleBindingInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockClusterRoleBindingInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedClusterRoleBindingInterface.CreateCalls()) +func (mock *ClusterRoleBindingInterfaceMock) CreateCalls() []struct { + In1 *v1.ClusterRoleBinding +} { + var calls []struct { + In1 *v1.ClusterRoleBinding + } + lockClusterRoleBindingInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockClusterRoleBindingInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *ClusterRoleBindingInterfaceMock) Delete(name string, options *v1b.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("ClusterRoleBindingInterfaceMock.DeleteFunc: method is nil but ClusterRoleBindingInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1b.DeleteOptions + }{ + Name: name, + Options: options, + } + lockClusterRoleBindingInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockClusterRoleBindingInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedClusterRoleBindingInterface.DeleteCalls()) +func (mock *ClusterRoleBindingInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1b.DeleteOptions +} { + var calls []struct { + Name string + Options *v1b.DeleteOptions + } + lockClusterRoleBindingInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockClusterRoleBindingInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *ClusterRoleBindingInterfaceMock) DeleteCollection(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("ClusterRoleBindingInterfaceMock.DeleteCollectionFunc: method is nil but ClusterRoleBindingInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockClusterRoleBindingInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockClusterRoleBindingInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedClusterRoleBindingInterface.DeleteCollectionCalls()) +func (mock *ClusterRoleBindingInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions +} { + var calls []struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions + } + lockClusterRoleBindingInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockClusterRoleBindingInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *ClusterRoleBindingInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1b.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("ClusterRoleBindingInterfaceMock.DeleteNamespacedFunc: method is nil but ClusterRoleBindingInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1b.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockClusterRoleBindingInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockClusterRoleBindingInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedClusterRoleBindingInterface.DeleteNamespacedCalls()) +func (mock *ClusterRoleBindingInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1b.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1b.DeleteOptions + } + lockClusterRoleBindingInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockClusterRoleBindingInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *ClusterRoleBindingInterfaceMock) Get(name string, opts v1b.GetOptions) (*v1.ClusterRoleBinding, error) { + if mock.GetFunc == nil { + panic("ClusterRoleBindingInterfaceMock.GetFunc: method is nil but ClusterRoleBindingInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1b.GetOptions + }{ + Name: name, + Opts: opts, + } + lockClusterRoleBindingInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockClusterRoleBindingInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedClusterRoleBindingInterface.GetCalls()) +func (mock *ClusterRoleBindingInterfaceMock) GetCalls() []struct { + Name string + Opts v1b.GetOptions +} { + var calls []struct { + Name string + Opts v1b.GetOptions + } + lockClusterRoleBindingInterfaceMockGet.RLock() + calls = mock.calls.Get + lockClusterRoleBindingInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *ClusterRoleBindingInterfaceMock) GetNamespaced(namespace string, name string, opts v1b.GetOptions) (*v1.ClusterRoleBinding, error) { + if mock.GetNamespacedFunc == nil { + panic("ClusterRoleBindingInterfaceMock.GetNamespacedFunc: method is nil but ClusterRoleBindingInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1b.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockClusterRoleBindingInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockClusterRoleBindingInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedClusterRoleBindingInterface.GetNamespacedCalls()) +func (mock *ClusterRoleBindingInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1b.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1b.GetOptions + } + lockClusterRoleBindingInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockClusterRoleBindingInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ClusterRoleBindingInterfaceMock) List(opts v1b.ListOptions) (*v1a.ClusterRoleBindingList, error) { + if mock.ListFunc == nil { + panic("ClusterRoleBindingInterfaceMock.ListFunc: method is nil but ClusterRoleBindingInterface.List was just called") + } + callInfo := struct { + Opts v1b.ListOptions + }{ + Opts: opts, + } + lockClusterRoleBindingInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockClusterRoleBindingInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedClusterRoleBindingInterface.ListCalls()) +func (mock *ClusterRoleBindingInterfaceMock) ListCalls() []struct { + Opts v1b.ListOptions +} { + var calls []struct { + Opts v1b.ListOptions + } + lockClusterRoleBindingInterfaceMockList.RLock() + calls = mock.calls.List + lockClusterRoleBindingInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *ClusterRoleBindingInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("ClusterRoleBindingInterfaceMock.ObjectClientFunc: method is nil but ClusterRoleBindingInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockClusterRoleBindingInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockClusterRoleBindingInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedClusterRoleBindingInterface.ObjectClientCalls()) +func (mock *ClusterRoleBindingInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockClusterRoleBindingInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockClusterRoleBindingInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *ClusterRoleBindingInterfaceMock) Update(in1 *v1.ClusterRoleBinding) (*v1.ClusterRoleBinding, error) { + if mock.UpdateFunc == nil { + panic("ClusterRoleBindingInterfaceMock.UpdateFunc: method is nil but ClusterRoleBindingInterface.Update was just called") + } + callInfo := struct { + In1 *v1.ClusterRoleBinding + }{ + In1: in1, + } + lockClusterRoleBindingInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockClusterRoleBindingInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedClusterRoleBindingInterface.UpdateCalls()) +func (mock *ClusterRoleBindingInterfaceMock) UpdateCalls() []struct { + In1 *v1.ClusterRoleBinding +} { + var calls []struct { + In1 *v1.ClusterRoleBinding + } + lockClusterRoleBindingInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockClusterRoleBindingInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *ClusterRoleBindingInterfaceMock) Watch(opts v1b.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("ClusterRoleBindingInterfaceMock.WatchFunc: method is nil but ClusterRoleBindingInterface.Watch was just called") + } + callInfo := struct { + Opts v1b.ListOptions + }{ + Opts: opts, + } + lockClusterRoleBindingInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockClusterRoleBindingInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedClusterRoleBindingInterface.WatchCalls()) +func (mock *ClusterRoleBindingInterfaceMock) WatchCalls() []struct { + Opts v1b.ListOptions +} { + var calls []struct { + Opts v1b.ListOptions + } + lockClusterRoleBindingInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockClusterRoleBindingInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockClusterRoleBindingsGetterMockClusterRoleBindings sync.RWMutex +) + +// Ensure, that ClusterRoleBindingsGetterMock does implement ClusterRoleBindingsGetter. +// If this is not the case, regenerate this file with moq. +var _ v1a.ClusterRoleBindingsGetter = &ClusterRoleBindingsGetterMock{} + +// ClusterRoleBindingsGetterMock is a mock implementation of ClusterRoleBindingsGetter. +// +// func TestSomethingThatUsesClusterRoleBindingsGetter(t *testing.T) { +// +// // make and configure a mocked ClusterRoleBindingsGetter +// mockedClusterRoleBindingsGetter := &ClusterRoleBindingsGetterMock{ +// ClusterRoleBindingsFunc: func(namespace string) v1a.ClusterRoleBindingInterface { +// panic("mock out the ClusterRoleBindings method") +// }, +// } +// +// // use mockedClusterRoleBindingsGetter in code that requires ClusterRoleBindingsGetter +// // and then make assertions. +// +// } +type ClusterRoleBindingsGetterMock struct { + // ClusterRoleBindingsFunc mocks the ClusterRoleBindings method. + ClusterRoleBindingsFunc func(namespace string) v1a.ClusterRoleBindingInterface + + // calls tracks calls to the methods. + calls struct { + // ClusterRoleBindings holds details about calls to the ClusterRoleBindings method. + ClusterRoleBindings []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// ClusterRoleBindings calls ClusterRoleBindingsFunc. +func (mock *ClusterRoleBindingsGetterMock) ClusterRoleBindings(namespace string) v1a.ClusterRoleBindingInterface { + if mock.ClusterRoleBindingsFunc == nil { + panic("ClusterRoleBindingsGetterMock.ClusterRoleBindingsFunc: method is nil but ClusterRoleBindingsGetter.ClusterRoleBindings was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockClusterRoleBindingsGetterMockClusterRoleBindings.Lock() + mock.calls.ClusterRoleBindings = append(mock.calls.ClusterRoleBindings, callInfo) + lockClusterRoleBindingsGetterMockClusterRoleBindings.Unlock() + return mock.ClusterRoleBindingsFunc(namespace) +} + +// ClusterRoleBindingsCalls gets all the calls that were made to ClusterRoleBindings. +// Check the length with: +// len(mockedClusterRoleBindingsGetter.ClusterRoleBindingsCalls()) +func (mock *ClusterRoleBindingsGetterMock) ClusterRoleBindingsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockClusterRoleBindingsGetterMockClusterRoleBindings.RLock() + calls = mock.calls.ClusterRoleBindings + lockClusterRoleBindingsGetterMockClusterRoleBindings.RUnlock() + return calls +} diff --git a/apis/rbac.authorization.k8s.io/v1/fakes/zz_generated_cluster_role_mock_test.go b/apis/rbac.authorization.k8s.io/v1/fakes/zz_generated_cluster_role_mock_test.go new file mode 100644 index 00000000..05518d6d --- /dev/null +++ b/apis/rbac.authorization.k8s.io/v1/fakes/zz_generated_cluster_role_mock_test.go @@ -0,0 +1,1357 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v1a "github.com/rancher/types/apis/rbac.authorization.k8s.io/v1" + v1 "k8s.io/api/rbac/v1" + v1b "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockClusterRoleListerMockGet sync.RWMutex + lockClusterRoleListerMockList sync.RWMutex +) + +// Ensure, that ClusterRoleListerMock does implement ClusterRoleLister. +// If this is not the case, regenerate this file with moq. +var _ v1a.ClusterRoleLister = &ClusterRoleListerMock{} + +// ClusterRoleListerMock is a mock implementation of ClusterRoleLister. +// +// func TestSomethingThatUsesClusterRoleLister(t *testing.T) { +// +// // make and configure a mocked ClusterRoleLister +// mockedClusterRoleLister := &ClusterRoleListerMock{ +// GetFunc: func(namespace string, name string) (*v1.ClusterRole, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v1.ClusterRole, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedClusterRoleLister in code that requires ClusterRoleLister +// // and then make assertions. +// +// } +type ClusterRoleListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v1.ClusterRole, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v1.ClusterRole, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *ClusterRoleListerMock) Get(namespace string, name string) (*v1.ClusterRole, error) { + if mock.GetFunc == nil { + panic("ClusterRoleListerMock.GetFunc: method is nil but ClusterRoleLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockClusterRoleListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockClusterRoleListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedClusterRoleLister.GetCalls()) +func (mock *ClusterRoleListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockClusterRoleListerMockGet.RLock() + calls = mock.calls.Get + lockClusterRoleListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ClusterRoleListerMock) List(namespace string, selector labels.Selector) ([]*v1.ClusterRole, error) { + if mock.ListFunc == nil { + panic("ClusterRoleListerMock.ListFunc: method is nil but ClusterRoleLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockClusterRoleListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockClusterRoleListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedClusterRoleLister.ListCalls()) +func (mock *ClusterRoleListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockClusterRoleListerMockList.RLock() + calls = mock.calls.List + lockClusterRoleListerMockList.RUnlock() + return calls +} + +var ( + lockClusterRoleControllerMockAddClusterScopedHandler sync.RWMutex + lockClusterRoleControllerMockAddHandler sync.RWMutex + lockClusterRoleControllerMockEnqueue sync.RWMutex + lockClusterRoleControllerMockGeneric sync.RWMutex + lockClusterRoleControllerMockInformer sync.RWMutex + lockClusterRoleControllerMockLister sync.RWMutex + lockClusterRoleControllerMockStart sync.RWMutex + lockClusterRoleControllerMockSync sync.RWMutex +) + +// Ensure, that ClusterRoleControllerMock does implement ClusterRoleController. +// If this is not the case, regenerate this file with moq. +var _ v1a.ClusterRoleController = &ClusterRoleControllerMock{} + +// ClusterRoleControllerMock is a mock implementation of ClusterRoleController. +// +// func TestSomethingThatUsesClusterRoleController(t *testing.T) { +// +// // make and configure a mocked ClusterRoleController +// mockedClusterRoleController := &ClusterRoleControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v1a.ClusterRoleHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v1a.ClusterRoleHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v1a.ClusterRoleLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedClusterRoleController in code that requires ClusterRoleController +// // and then make assertions. +// +// } +type ClusterRoleControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v1a.ClusterRoleHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v1a.ClusterRoleHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v1a.ClusterRoleLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v1a.ClusterRoleHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v1a.ClusterRoleHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ClusterRoleControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v1a.ClusterRoleHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ClusterRoleControllerMock.AddClusterScopedHandlerFunc: method is nil but ClusterRoleController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.ClusterRoleHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockClusterRoleControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockClusterRoleControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedClusterRoleController.AddClusterScopedHandlerCalls()) +func (mock *ClusterRoleControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.ClusterRoleHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.ClusterRoleHandlerFunc + } + lockClusterRoleControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockClusterRoleControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ClusterRoleControllerMock) AddHandler(ctx context.Context, name string, handler v1a.ClusterRoleHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ClusterRoleControllerMock.AddHandlerFunc: method is nil but ClusterRoleController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v1a.ClusterRoleHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockClusterRoleControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockClusterRoleControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedClusterRoleController.AddHandlerCalls()) +func (mock *ClusterRoleControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v1a.ClusterRoleHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v1a.ClusterRoleHandlerFunc + } + lockClusterRoleControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockClusterRoleControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *ClusterRoleControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("ClusterRoleControllerMock.EnqueueFunc: method is nil but ClusterRoleController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockClusterRoleControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockClusterRoleControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedClusterRoleController.EnqueueCalls()) +func (mock *ClusterRoleControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockClusterRoleControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockClusterRoleControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *ClusterRoleControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("ClusterRoleControllerMock.GenericFunc: method is nil but ClusterRoleController.Generic was just called") + } + callInfo := struct { + }{} + lockClusterRoleControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockClusterRoleControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedClusterRoleController.GenericCalls()) +func (mock *ClusterRoleControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockClusterRoleControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockClusterRoleControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *ClusterRoleControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("ClusterRoleControllerMock.InformerFunc: method is nil but ClusterRoleController.Informer was just called") + } + callInfo := struct { + }{} + lockClusterRoleControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockClusterRoleControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedClusterRoleController.InformerCalls()) +func (mock *ClusterRoleControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockClusterRoleControllerMockInformer.RLock() + calls = mock.calls.Informer + lockClusterRoleControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *ClusterRoleControllerMock) Lister() v1a.ClusterRoleLister { + if mock.ListerFunc == nil { + panic("ClusterRoleControllerMock.ListerFunc: method is nil but ClusterRoleController.Lister was just called") + } + callInfo := struct { + }{} + lockClusterRoleControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockClusterRoleControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedClusterRoleController.ListerCalls()) +func (mock *ClusterRoleControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockClusterRoleControllerMockLister.RLock() + calls = mock.calls.Lister + lockClusterRoleControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *ClusterRoleControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("ClusterRoleControllerMock.StartFunc: method is nil but ClusterRoleController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockClusterRoleControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockClusterRoleControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedClusterRoleController.StartCalls()) +func (mock *ClusterRoleControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockClusterRoleControllerMockStart.RLock() + calls = mock.calls.Start + lockClusterRoleControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *ClusterRoleControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("ClusterRoleControllerMock.SyncFunc: method is nil but ClusterRoleController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockClusterRoleControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockClusterRoleControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedClusterRoleController.SyncCalls()) +func (mock *ClusterRoleControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockClusterRoleControllerMockSync.RLock() + calls = mock.calls.Sync + lockClusterRoleControllerMockSync.RUnlock() + return calls +} + +var ( + lockClusterRoleInterfaceMockAddClusterScopedHandler sync.RWMutex + lockClusterRoleInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockClusterRoleInterfaceMockAddHandler sync.RWMutex + lockClusterRoleInterfaceMockAddLifecycle sync.RWMutex + lockClusterRoleInterfaceMockController sync.RWMutex + lockClusterRoleInterfaceMockCreate sync.RWMutex + lockClusterRoleInterfaceMockDelete sync.RWMutex + lockClusterRoleInterfaceMockDeleteCollection sync.RWMutex + lockClusterRoleInterfaceMockDeleteNamespaced sync.RWMutex + lockClusterRoleInterfaceMockGet sync.RWMutex + lockClusterRoleInterfaceMockGetNamespaced sync.RWMutex + lockClusterRoleInterfaceMockList sync.RWMutex + lockClusterRoleInterfaceMockObjectClient sync.RWMutex + lockClusterRoleInterfaceMockUpdate sync.RWMutex + lockClusterRoleInterfaceMockWatch sync.RWMutex +) + +// Ensure, that ClusterRoleInterfaceMock does implement ClusterRoleInterface. +// If this is not the case, regenerate this file with moq. +var _ v1a.ClusterRoleInterface = &ClusterRoleInterfaceMock{} + +// ClusterRoleInterfaceMock is a mock implementation of ClusterRoleInterface. +// +// func TestSomethingThatUsesClusterRoleInterface(t *testing.T) { +// +// // make and configure a mocked ClusterRoleInterface +// mockedClusterRoleInterface := &ClusterRoleInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v1a.ClusterRoleHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v1a.ClusterRoleLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v1a.ClusterRoleHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v1a.ClusterRoleLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v1a.ClusterRoleController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v1.ClusterRole) (*v1.ClusterRole, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1b.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1b.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1b.GetOptions) (*v1.ClusterRole, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.ClusterRole, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1b.ListOptions) (*v1a.ClusterRoleList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v1.ClusterRole) (*v1.ClusterRole, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1b.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedClusterRoleInterface in code that requires ClusterRoleInterface +// // and then make assertions. +// +// } +type ClusterRoleInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v1a.ClusterRoleHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v1a.ClusterRoleLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v1a.ClusterRoleHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v1a.ClusterRoleLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v1a.ClusterRoleController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v1.ClusterRole) (*v1.ClusterRole, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1b.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1b.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1b.GetOptions) (*v1.ClusterRole, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.ClusterRole, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1b.ListOptions) (*v1a.ClusterRoleList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v1.ClusterRole) (*v1.ClusterRole, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1b.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v1a.ClusterRoleHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v1a.ClusterRoleLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v1a.ClusterRoleHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v1a.ClusterRoleLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v1.ClusterRole + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1b.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1b.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1b.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1b.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1b.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1b.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1b.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v1.ClusterRole + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1b.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *ClusterRoleInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v1a.ClusterRoleHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("ClusterRoleInterfaceMock.AddClusterScopedHandlerFunc: method is nil but ClusterRoleInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.ClusterRoleHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockClusterRoleInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockClusterRoleInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedClusterRoleInterface.AddClusterScopedHandlerCalls()) +func (mock *ClusterRoleInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.ClusterRoleHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.ClusterRoleHandlerFunc + } + lockClusterRoleInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockClusterRoleInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *ClusterRoleInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v1a.ClusterRoleLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("ClusterRoleInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but ClusterRoleInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.ClusterRoleLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockClusterRoleInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockClusterRoleInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedClusterRoleInterface.AddClusterScopedLifecycleCalls()) +func (mock *ClusterRoleInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.ClusterRoleLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.ClusterRoleLifecycle + } + lockClusterRoleInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockClusterRoleInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *ClusterRoleInterfaceMock) AddHandler(ctx context.Context, name string, sync v1a.ClusterRoleHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("ClusterRoleInterfaceMock.AddHandlerFunc: method is nil but ClusterRoleInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v1a.ClusterRoleHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockClusterRoleInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockClusterRoleInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedClusterRoleInterface.AddHandlerCalls()) +func (mock *ClusterRoleInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v1a.ClusterRoleHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v1a.ClusterRoleHandlerFunc + } + lockClusterRoleInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockClusterRoleInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *ClusterRoleInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v1a.ClusterRoleLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("ClusterRoleInterfaceMock.AddLifecycleFunc: method is nil but ClusterRoleInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v1a.ClusterRoleLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockClusterRoleInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockClusterRoleInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedClusterRoleInterface.AddLifecycleCalls()) +func (mock *ClusterRoleInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v1a.ClusterRoleLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v1a.ClusterRoleLifecycle + } + lockClusterRoleInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockClusterRoleInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *ClusterRoleInterfaceMock) Controller() v1a.ClusterRoleController { + if mock.ControllerFunc == nil { + panic("ClusterRoleInterfaceMock.ControllerFunc: method is nil but ClusterRoleInterface.Controller was just called") + } + callInfo := struct { + }{} + lockClusterRoleInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockClusterRoleInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedClusterRoleInterface.ControllerCalls()) +func (mock *ClusterRoleInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockClusterRoleInterfaceMockController.RLock() + calls = mock.calls.Controller + lockClusterRoleInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *ClusterRoleInterfaceMock) Create(in1 *v1.ClusterRole) (*v1.ClusterRole, error) { + if mock.CreateFunc == nil { + panic("ClusterRoleInterfaceMock.CreateFunc: method is nil but ClusterRoleInterface.Create was just called") + } + callInfo := struct { + In1 *v1.ClusterRole + }{ + In1: in1, + } + lockClusterRoleInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockClusterRoleInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedClusterRoleInterface.CreateCalls()) +func (mock *ClusterRoleInterfaceMock) CreateCalls() []struct { + In1 *v1.ClusterRole +} { + var calls []struct { + In1 *v1.ClusterRole + } + lockClusterRoleInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockClusterRoleInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *ClusterRoleInterfaceMock) Delete(name string, options *v1b.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("ClusterRoleInterfaceMock.DeleteFunc: method is nil but ClusterRoleInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1b.DeleteOptions + }{ + Name: name, + Options: options, + } + lockClusterRoleInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockClusterRoleInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedClusterRoleInterface.DeleteCalls()) +func (mock *ClusterRoleInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1b.DeleteOptions +} { + var calls []struct { + Name string + Options *v1b.DeleteOptions + } + lockClusterRoleInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockClusterRoleInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *ClusterRoleInterfaceMock) DeleteCollection(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("ClusterRoleInterfaceMock.DeleteCollectionFunc: method is nil but ClusterRoleInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockClusterRoleInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockClusterRoleInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedClusterRoleInterface.DeleteCollectionCalls()) +func (mock *ClusterRoleInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions +} { + var calls []struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions + } + lockClusterRoleInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockClusterRoleInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *ClusterRoleInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1b.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("ClusterRoleInterfaceMock.DeleteNamespacedFunc: method is nil but ClusterRoleInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1b.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockClusterRoleInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockClusterRoleInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedClusterRoleInterface.DeleteNamespacedCalls()) +func (mock *ClusterRoleInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1b.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1b.DeleteOptions + } + lockClusterRoleInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockClusterRoleInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *ClusterRoleInterfaceMock) Get(name string, opts v1b.GetOptions) (*v1.ClusterRole, error) { + if mock.GetFunc == nil { + panic("ClusterRoleInterfaceMock.GetFunc: method is nil but ClusterRoleInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1b.GetOptions + }{ + Name: name, + Opts: opts, + } + lockClusterRoleInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockClusterRoleInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedClusterRoleInterface.GetCalls()) +func (mock *ClusterRoleInterfaceMock) GetCalls() []struct { + Name string + Opts v1b.GetOptions +} { + var calls []struct { + Name string + Opts v1b.GetOptions + } + lockClusterRoleInterfaceMockGet.RLock() + calls = mock.calls.Get + lockClusterRoleInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *ClusterRoleInterfaceMock) GetNamespaced(namespace string, name string, opts v1b.GetOptions) (*v1.ClusterRole, error) { + if mock.GetNamespacedFunc == nil { + panic("ClusterRoleInterfaceMock.GetNamespacedFunc: method is nil but ClusterRoleInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1b.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockClusterRoleInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockClusterRoleInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedClusterRoleInterface.GetNamespacedCalls()) +func (mock *ClusterRoleInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1b.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1b.GetOptions + } + lockClusterRoleInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockClusterRoleInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *ClusterRoleInterfaceMock) List(opts v1b.ListOptions) (*v1a.ClusterRoleList, error) { + if mock.ListFunc == nil { + panic("ClusterRoleInterfaceMock.ListFunc: method is nil but ClusterRoleInterface.List was just called") + } + callInfo := struct { + Opts v1b.ListOptions + }{ + Opts: opts, + } + lockClusterRoleInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockClusterRoleInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedClusterRoleInterface.ListCalls()) +func (mock *ClusterRoleInterfaceMock) ListCalls() []struct { + Opts v1b.ListOptions +} { + var calls []struct { + Opts v1b.ListOptions + } + lockClusterRoleInterfaceMockList.RLock() + calls = mock.calls.List + lockClusterRoleInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *ClusterRoleInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("ClusterRoleInterfaceMock.ObjectClientFunc: method is nil but ClusterRoleInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockClusterRoleInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockClusterRoleInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedClusterRoleInterface.ObjectClientCalls()) +func (mock *ClusterRoleInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockClusterRoleInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockClusterRoleInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *ClusterRoleInterfaceMock) Update(in1 *v1.ClusterRole) (*v1.ClusterRole, error) { + if mock.UpdateFunc == nil { + panic("ClusterRoleInterfaceMock.UpdateFunc: method is nil but ClusterRoleInterface.Update was just called") + } + callInfo := struct { + In1 *v1.ClusterRole + }{ + In1: in1, + } + lockClusterRoleInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockClusterRoleInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedClusterRoleInterface.UpdateCalls()) +func (mock *ClusterRoleInterfaceMock) UpdateCalls() []struct { + In1 *v1.ClusterRole +} { + var calls []struct { + In1 *v1.ClusterRole + } + lockClusterRoleInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockClusterRoleInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *ClusterRoleInterfaceMock) Watch(opts v1b.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("ClusterRoleInterfaceMock.WatchFunc: method is nil but ClusterRoleInterface.Watch was just called") + } + callInfo := struct { + Opts v1b.ListOptions + }{ + Opts: opts, + } + lockClusterRoleInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockClusterRoleInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedClusterRoleInterface.WatchCalls()) +func (mock *ClusterRoleInterfaceMock) WatchCalls() []struct { + Opts v1b.ListOptions +} { + var calls []struct { + Opts v1b.ListOptions + } + lockClusterRoleInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockClusterRoleInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockClusterRolesGetterMockClusterRoles sync.RWMutex +) + +// Ensure, that ClusterRolesGetterMock does implement ClusterRolesGetter. +// If this is not the case, regenerate this file with moq. +var _ v1a.ClusterRolesGetter = &ClusterRolesGetterMock{} + +// ClusterRolesGetterMock is a mock implementation of ClusterRolesGetter. +// +// func TestSomethingThatUsesClusterRolesGetter(t *testing.T) { +// +// // make and configure a mocked ClusterRolesGetter +// mockedClusterRolesGetter := &ClusterRolesGetterMock{ +// ClusterRolesFunc: func(namespace string) v1a.ClusterRoleInterface { +// panic("mock out the ClusterRoles method") +// }, +// } +// +// // use mockedClusterRolesGetter in code that requires ClusterRolesGetter +// // and then make assertions. +// +// } +type ClusterRolesGetterMock struct { + // ClusterRolesFunc mocks the ClusterRoles method. + ClusterRolesFunc func(namespace string) v1a.ClusterRoleInterface + + // calls tracks calls to the methods. + calls struct { + // ClusterRoles holds details about calls to the ClusterRoles method. + ClusterRoles []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// ClusterRoles calls ClusterRolesFunc. +func (mock *ClusterRolesGetterMock) ClusterRoles(namespace string) v1a.ClusterRoleInterface { + if mock.ClusterRolesFunc == nil { + panic("ClusterRolesGetterMock.ClusterRolesFunc: method is nil but ClusterRolesGetter.ClusterRoles was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockClusterRolesGetterMockClusterRoles.Lock() + mock.calls.ClusterRoles = append(mock.calls.ClusterRoles, callInfo) + lockClusterRolesGetterMockClusterRoles.Unlock() + return mock.ClusterRolesFunc(namespace) +} + +// ClusterRolesCalls gets all the calls that were made to ClusterRoles. +// Check the length with: +// len(mockedClusterRolesGetter.ClusterRolesCalls()) +func (mock *ClusterRolesGetterMock) ClusterRolesCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockClusterRolesGetterMockClusterRoles.RLock() + calls = mock.calls.ClusterRoles + lockClusterRolesGetterMockClusterRoles.RUnlock() + return calls +} diff --git a/apis/rbac.authorization.k8s.io/v1/fakes/zz_generated_role_binding_mock_test.go b/apis/rbac.authorization.k8s.io/v1/fakes/zz_generated_role_binding_mock_test.go new file mode 100644 index 00000000..9ef1ea34 --- /dev/null +++ b/apis/rbac.authorization.k8s.io/v1/fakes/zz_generated_role_binding_mock_test.go @@ -0,0 +1,1357 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v1a "github.com/rancher/types/apis/rbac.authorization.k8s.io/v1" + v1 "k8s.io/api/rbac/v1" + v1b "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockRoleBindingListerMockGet sync.RWMutex + lockRoleBindingListerMockList sync.RWMutex +) + +// Ensure, that RoleBindingListerMock does implement RoleBindingLister. +// If this is not the case, regenerate this file with moq. +var _ v1a.RoleBindingLister = &RoleBindingListerMock{} + +// RoleBindingListerMock is a mock implementation of RoleBindingLister. +// +// func TestSomethingThatUsesRoleBindingLister(t *testing.T) { +// +// // make and configure a mocked RoleBindingLister +// mockedRoleBindingLister := &RoleBindingListerMock{ +// GetFunc: func(namespace string, name string) (*v1.RoleBinding, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v1.RoleBinding, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedRoleBindingLister in code that requires RoleBindingLister +// // and then make assertions. +// +// } +type RoleBindingListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v1.RoleBinding, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v1.RoleBinding, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *RoleBindingListerMock) Get(namespace string, name string) (*v1.RoleBinding, error) { + if mock.GetFunc == nil { + panic("RoleBindingListerMock.GetFunc: method is nil but RoleBindingLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockRoleBindingListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockRoleBindingListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedRoleBindingLister.GetCalls()) +func (mock *RoleBindingListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockRoleBindingListerMockGet.RLock() + calls = mock.calls.Get + lockRoleBindingListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *RoleBindingListerMock) List(namespace string, selector labels.Selector) ([]*v1.RoleBinding, error) { + if mock.ListFunc == nil { + panic("RoleBindingListerMock.ListFunc: method is nil but RoleBindingLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockRoleBindingListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockRoleBindingListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedRoleBindingLister.ListCalls()) +func (mock *RoleBindingListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockRoleBindingListerMockList.RLock() + calls = mock.calls.List + lockRoleBindingListerMockList.RUnlock() + return calls +} + +var ( + lockRoleBindingControllerMockAddClusterScopedHandler sync.RWMutex + lockRoleBindingControllerMockAddHandler sync.RWMutex + lockRoleBindingControllerMockEnqueue sync.RWMutex + lockRoleBindingControllerMockGeneric sync.RWMutex + lockRoleBindingControllerMockInformer sync.RWMutex + lockRoleBindingControllerMockLister sync.RWMutex + lockRoleBindingControllerMockStart sync.RWMutex + lockRoleBindingControllerMockSync sync.RWMutex +) + +// Ensure, that RoleBindingControllerMock does implement RoleBindingController. +// If this is not the case, regenerate this file with moq. +var _ v1a.RoleBindingController = &RoleBindingControllerMock{} + +// RoleBindingControllerMock is a mock implementation of RoleBindingController. +// +// func TestSomethingThatUsesRoleBindingController(t *testing.T) { +// +// // make and configure a mocked RoleBindingController +// mockedRoleBindingController := &RoleBindingControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v1a.RoleBindingHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v1a.RoleBindingHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v1a.RoleBindingLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedRoleBindingController in code that requires RoleBindingController +// // and then make assertions. +// +// } +type RoleBindingControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v1a.RoleBindingHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v1a.RoleBindingHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v1a.RoleBindingLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v1a.RoleBindingHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v1a.RoleBindingHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *RoleBindingControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v1a.RoleBindingHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("RoleBindingControllerMock.AddClusterScopedHandlerFunc: method is nil but RoleBindingController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.RoleBindingHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockRoleBindingControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockRoleBindingControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedRoleBindingController.AddClusterScopedHandlerCalls()) +func (mock *RoleBindingControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.RoleBindingHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.RoleBindingHandlerFunc + } + lockRoleBindingControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockRoleBindingControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *RoleBindingControllerMock) AddHandler(ctx context.Context, name string, handler v1a.RoleBindingHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("RoleBindingControllerMock.AddHandlerFunc: method is nil but RoleBindingController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v1a.RoleBindingHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockRoleBindingControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockRoleBindingControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedRoleBindingController.AddHandlerCalls()) +func (mock *RoleBindingControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v1a.RoleBindingHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v1a.RoleBindingHandlerFunc + } + lockRoleBindingControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockRoleBindingControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *RoleBindingControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("RoleBindingControllerMock.EnqueueFunc: method is nil but RoleBindingController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockRoleBindingControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockRoleBindingControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedRoleBindingController.EnqueueCalls()) +func (mock *RoleBindingControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockRoleBindingControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockRoleBindingControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *RoleBindingControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("RoleBindingControllerMock.GenericFunc: method is nil but RoleBindingController.Generic was just called") + } + callInfo := struct { + }{} + lockRoleBindingControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockRoleBindingControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedRoleBindingController.GenericCalls()) +func (mock *RoleBindingControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockRoleBindingControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockRoleBindingControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *RoleBindingControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("RoleBindingControllerMock.InformerFunc: method is nil but RoleBindingController.Informer was just called") + } + callInfo := struct { + }{} + lockRoleBindingControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockRoleBindingControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedRoleBindingController.InformerCalls()) +func (mock *RoleBindingControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockRoleBindingControllerMockInformer.RLock() + calls = mock.calls.Informer + lockRoleBindingControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *RoleBindingControllerMock) Lister() v1a.RoleBindingLister { + if mock.ListerFunc == nil { + panic("RoleBindingControllerMock.ListerFunc: method is nil but RoleBindingController.Lister was just called") + } + callInfo := struct { + }{} + lockRoleBindingControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockRoleBindingControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedRoleBindingController.ListerCalls()) +func (mock *RoleBindingControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockRoleBindingControllerMockLister.RLock() + calls = mock.calls.Lister + lockRoleBindingControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *RoleBindingControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("RoleBindingControllerMock.StartFunc: method is nil but RoleBindingController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockRoleBindingControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockRoleBindingControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedRoleBindingController.StartCalls()) +func (mock *RoleBindingControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockRoleBindingControllerMockStart.RLock() + calls = mock.calls.Start + lockRoleBindingControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *RoleBindingControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("RoleBindingControllerMock.SyncFunc: method is nil but RoleBindingController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockRoleBindingControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockRoleBindingControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedRoleBindingController.SyncCalls()) +func (mock *RoleBindingControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockRoleBindingControllerMockSync.RLock() + calls = mock.calls.Sync + lockRoleBindingControllerMockSync.RUnlock() + return calls +} + +var ( + lockRoleBindingInterfaceMockAddClusterScopedHandler sync.RWMutex + lockRoleBindingInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockRoleBindingInterfaceMockAddHandler sync.RWMutex + lockRoleBindingInterfaceMockAddLifecycle sync.RWMutex + lockRoleBindingInterfaceMockController sync.RWMutex + lockRoleBindingInterfaceMockCreate sync.RWMutex + lockRoleBindingInterfaceMockDelete sync.RWMutex + lockRoleBindingInterfaceMockDeleteCollection sync.RWMutex + lockRoleBindingInterfaceMockDeleteNamespaced sync.RWMutex + lockRoleBindingInterfaceMockGet sync.RWMutex + lockRoleBindingInterfaceMockGetNamespaced sync.RWMutex + lockRoleBindingInterfaceMockList sync.RWMutex + lockRoleBindingInterfaceMockObjectClient sync.RWMutex + lockRoleBindingInterfaceMockUpdate sync.RWMutex + lockRoleBindingInterfaceMockWatch sync.RWMutex +) + +// Ensure, that RoleBindingInterfaceMock does implement RoleBindingInterface. +// If this is not the case, regenerate this file with moq. +var _ v1a.RoleBindingInterface = &RoleBindingInterfaceMock{} + +// RoleBindingInterfaceMock is a mock implementation of RoleBindingInterface. +// +// func TestSomethingThatUsesRoleBindingInterface(t *testing.T) { +// +// // make and configure a mocked RoleBindingInterface +// mockedRoleBindingInterface := &RoleBindingInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v1a.RoleBindingHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v1a.RoleBindingLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v1a.RoleBindingHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v1a.RoleBindingLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v1a.RoleBindingController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v1.RoleBinding) (*v1.RoleBinding, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1b.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1b.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1b.GetOptions) (*v1.RoleBinding, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.RoleBinding, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1b.ListOptions) (*v1a.RoleBindingList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v1.RoleBinding) (*v1.RoleBinding, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1b.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedRoleBindingInterface in code that requires RoleBindingInterface +// // and then make assertions. +// +// } +type RoleBindingInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v1a.RoleBindingHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v1a.RoleBindingLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v1a.RoleBindingHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v1a.RoleBindingLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v1a.RoleBindingController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v1.RoleBinding) (*v1.RoleBinding, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1b.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1b.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1b.GetOptions) (*v1.RoleBinding, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.RoleBinding, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1b.ListOptions) (*v1a.RoleBindingList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v1.RoleBinding) (*v1.RoleBinding, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1b.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v1a.RoleBindingHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v1a.RoleBindingLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v1a.RoleBindingHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v1a.RoleBindingLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v1.RoleBinding + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1b.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1b.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1b.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1b.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1b.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1b.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1b.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v1.RoleBinding + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1b.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *RoleBindingInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v1a.RoleBindingHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("RoleBindingInterfaceMock.AddClusterScopedHandlerFunc: method is nil but RoleBindingInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.RoleBindingHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockRoleBindingInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockRoleBindingInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedRoleBindingInterface.AddClusterScopedHandlerCalls()) +func (mock *RoleBindingInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.RoleBindingHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.RoleBindingHandlerFunc + } + lockRoleBindingInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockRoleBindingInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *RoleBindingInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v1a.RoleBindingLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("RoleBindingInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but RoleBindingInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.RoleBindingLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockRoleBindingInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockRoleBindingInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedRoleBindingInterface.AddClusterScopedLifecycleCalls()) +func (mock *RoleBindingInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.RoleBindingLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.RoleBindingLifecycle + } + lockRoleBindingInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockRoleBindingInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *RoleBindingInterfaceMock) AddHandler(ctx context.Context, name string, sync v1a.RoleBindingHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("RoleBindingInterfaceMock.AddHandlerFunc: method is nil but RoleBindingInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v1a.RoleBindingHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockRoleBindingInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockRoleBindingInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedRoleBindingInterface.AddHandlerCalls()) +func (mock *RoleBindingInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v1a.RoleBindingHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v1a.RoleBindingHandlerFunc + } + lockRoleBindingInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockRoleBindingInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *RoleBindingInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v1a.RoleBindingLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("RoleBindingInterfaceMock.AddLifecycleFunc: method is nil but RoleBindingInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v1a.RoleBindingLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockRoleBindingInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockRoleBindingInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedRoleBindingInterface.AddLifecycleCalls()) +func (mock *RoleBindingInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v1a.RoleBindingLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v1a.RoleBindingLifecycle + } + lockRoleBindingInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockRoleBindingInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *RoleBindingInterfaceMock) Controller() v1a.RoleBindingController { + if mock.ControllerFunc == nil { + panic("RoleBindingInterfaceMock.ControllerFunc: method is nil but RoleBindingInterface.Controller was just called") + } + callInfo := struct { + }{} + lockRoleBindingInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockRoleBindingInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedRoleBindingInterface.ControllerCalls()) +func (mock *RoleBindingInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockRoleBindingInterfaceMockController.RLock() + calls = mock.calls.Controller + lockRoleBindingInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *RoleBindingInterfaceMock) Create(in1 *v1.RoleBinding) (*v1.RoleBinding, error) { + if mock.CreateFunc == nil { + panic("RoleBindingInterfaceMock.CreateFunc: method is nil but RoleBindingInterface.Create was just called") + } + callInfo := struct { + In1 *v1.RoleBinding + }{ + In1: in1, + } + lockRoleBindingInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockRoleBindingInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedRoleBindingInterface.CreateCalls()) +func (mock *RoleBindingInterfaceMock) CreateCalls() []struct { + In1 *v1.RoleBinding +} { + var calls []struct { + In1 *v1.RoleBinding + } + lockRoleBindingInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockRoleBindingInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *RoleBindingInterfaceMock) Delete(name string, options *v1b.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("RoleBindingInterfaceMock.DeleteFunc: method is nil but RoleBindingInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1b.DeleteOptions + }{ + Name: name, + Options: options, + } + lockRoleBindingInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockRoleBindingInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedRoleBindingInterface.DeleteCalls()) +func (mock *RoleBindingInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1b.DeleteOptions +} { + var calls []struct { + Name string + Options *v1b.DeleteOptions + } + lockRoleBindingInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockRoleBindingInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *RoleBindingInterfaceMock) DeleteCollection(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("RoleBindingInterfaceMock.DeleteCollectionFunc: method is nil but RoleBindingInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockRoleBindingInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockRoleBindingInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedRoleBindingInterface.DeleteCollectionCalls()) +func (mock *RoleBindingInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions +} { + var calls []struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions + } + lockRoleBindingInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockRoleBindingInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *RoleBindingInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1b.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("RoleBindingInterfaceMock.DeleteNamespacedFunc: method is nil but RoleBindingInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1b.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockRoleBindingInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockRoleBindingInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedRoleBindingInterface.DeleteNamespacedCalls()) +func (mock *RoleBindingInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1b.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1b.DeleteOptions + } + lockRoleBindingInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockRoleBindingInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *RoleBindingInterfaceMock) Get(name string, opts v1b.GetOptions) (*v1.RoleBinding, error) { + if mock.GetFunc == nil { + panic("RoleBindingInterfaceMock.GetFunc: method is nil but RoleBindingInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1b.GetOptions + }{ + Name: name, + Opts: opts, + } + lockRoleBindingInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockRoleBindingInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedRoleBindingInterface.GetCalls()) +func (mock *RoleBindingInterfaceMock) GetCalls() []struct { + Name string + Opts v1b.GetOptions +} { + var calls []struct { + Name string + Opts v1b.GetOptions + } + lockRoleBindingInterfaceMockGet.RLock() + calls = mock.calls.Get + lockRoleBindingInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *RoleBindingInterfaceMock) GetNamespaced(namespace string, name string, opts v1b.GetOptions) (*v1.RoleBinding, error) { + if mock.GetNamespacedFunc == nil { + panic("RoleBindingInterfaceMock.GetNamespacedFunc: method is nil but RoleBindingInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1b.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockRoleBindingInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockRoleBindingInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedRoleBindingInterface.GetNamespacedCalls()) +func (mock *RoleBindingInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1b.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1b.GetOptions + } + lockRoleBindingInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockRoleBindingInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *RoleBindingInterfaceMock) List(opts v1b.ListOptions) (*v1a.RoleBindingList, error) { + if mock.ListFunc == nil { + panic("RoleBindingInterfaceMock.ListFunc: method is nil but RoleBindingInterface.List was just called") + } + callInfo := struct { + Opts v1b.ListOptions + }{ + Opts: opts, + } + lockRoleBindingInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockRoleBindingInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedRoleBindingInterface.ListCalls()) +func (mock *RoleBindingInterfaceMock) ListCalls() []struct { + Opts v1b.ListOptions +} { + var calls []struct { + Opts v1b.ListOptions + } + lockRoleBindingInterfaceMockList.RLock() + calls = mock.calls.List + lockRoleBindingInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *RoleBindingInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("RoleBindingInterfaceMock.ObjectClientFunc: method is nil but RoleBindingInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockRoleBindingInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockRoleBindingInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedRoleBindingInterface.ObjectClientCalls()) +func (mock *RoleBindingInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockRoleBindingInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockRoleBindingInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *RoleBindingInterfaceMock) Update(in1 *v1.RoleBinding) (*v1.RoleBinding, error) { + if mock.UpdateFunc == nil { + panic("RoleBindingInterfaceMock.UpdateFunc: method is nil but RoleBindingInterface.Update was just called") + } + callInfo := struct { + In1 *v1.RoleBinding + }{ + In1: in1, + } + lockRoleBindingInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockRoleBindingInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedRoleBindingInterface.UpdateCalls()) +func (mock *RoleBindingInterfaceMock) UpdateCalls() []struct { + In1 *v1.RoleBinding +} { + var calls []struct { + In1 *v1.RoleBinding + } + lockRoleBindingInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockRoleBindingInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *RoleBindingInterfaceMock) Watch(opts v1b.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("RoleBindingInterfaceMock.WatchFunc: method is nil but RoleBindingInterface.Watch was just called") + } + callInfo := struct { + Opts v1b.ListOptions + }{ + Opts: opts, + } + lockRoleBindingInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockRoleBindingInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedRoleBindingInterface.WatchCalls()) +func (mock *RoleBindingInterfaceMock) WatchCalls() []struct { + Opts v1b.ListOptions +} { + var calls []struct { + Opts v1b.ListOptions + } + lockRoleBindingInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockRoleBindingInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockRoleBindingsGetterMockRoleBindings sync.RWMutex +) + +// Ensure, that RoleBindingsGetterMock does implement RoleBindingsGetter. +// If this is not the case, regenerate this file with moq. +var _ v1a.RoleBindingsGetter = &RoleBindingsGetterMock{} + +// RoleBindingsGetterMock is a mock implementation of RoleBindingsGetter. +// +// func TestSomethingThatUsesRoleBindingsGetter(t *testing.T) { +// +// // make and configure a mocked RoleBindingsGetter +// mockedRoleBindingsGetter := &RoleBindingsGetterMock{ +// RoleBindingsFunc: func(namespace string) v1a.RoleBindingInterface { +// panic("mock out the RoleBindings method") +// }, +// } +// +// // use mockedRoleBindingsGetter in code that requires RoleBindingsGetter +// // and then make assertions. +// +// } +type RoleBindingsGetterMock struct { + // RoleBindingsFunc mocks the RoleBindings method. + RoleBindingsFunc func(namespace string) v1a.RoleBindingInterface + + // calls tracks calls to the methods. + calls struct { + // RoleBindings holds details about calls to the RoleBindings method. + RoleBindings []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// RoleBindings calls RoleBindingsFunc. +func (mock *RoleBindingsGetterMock) RoleBindings(namespace string) v1a.RoleBindingInterface { + if mock.RoleBindingsFunc == nil { + panic("RoleBindingsGetterMock.RoleBindingsFunc: method is nil but RoleBindingsGetter.RoleBindings was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockRoleBindingsGetterMockRoleBindings.Lock() + mock.calls.RoleBindings = append(mock.calls.RoleBindings, callInfo) + lockRoleBindingsGetterMockRoleBindings.Unlock() + return mock.RoleBindingsFunc(namespace) +} + +// RoleBindingsCalls gets all the calls that were made to RoleBindings. +// Check the length with: +// len(mockedRoleBindingsGetter.RoleBindingsCalls()) +func (mock *RoleBindingsGetterMock) RoleBindingsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockRoleBindingsGetterMockRoleBindings.RLock() + calls = mock.calls.RoleBindings + lockRoleBindingsGetterMockRoleBindings.RUnlock() + return calls +} diff --git a/apis/rbac.authorization.k8s.io/v1/fakes/zz_generated_role_mock_test.go b/apis/rbac.authorization.k8s.io/v1/fakes/zz_generated_role_mock_test.go new file mode 100644 index 00000000..258be3fc --- /dev/null +++ b/apis/rbac.authorization.k8s.io/v1/fakes/zz_generated_role_mock_test.go @@ -0,0 +1,1357 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v1a "github.com/rancher/types/apis/rbac.authorization.k8s.io/v1" + v1 "k8s.io/api/rbac/v1" + v1b "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockRoleListerMockGet sync.RWMutex + lockRoleListerMockList sync.RWMutex +) + +// Ensure, that RoleListerMock does implement RoleLister. +// If this is not the case, regenerate this file with moq. +var _ v1a.RoleLister = &RoleListerMock{} + +// RoleListerMock is a mock implementation of RoleLister. +// +// func TestSomethingThatUsesRoleLister(t *testing.T) { +// +// // make and configure a mocked RoleLister +// mockedRoleLister := &RoleListerMock{ +// GetFunc: func(namespace string, name string) (*v1.Role, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v1.Role, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedRoleLister in code that requires RoleLister +// // and then make assertions. +// +// } +type RoleListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v1.Role, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v1.Role, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *RoleListerMock) Get(namespace string, name string) (*v1.Role, error) { + if mock.GetFunc == nil { + panic("RoleListerMock.GetFunc: method is nil but RoleLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockRoleListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockRoleListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedRoleLister.GetCalls()) +func (mock *RoleListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockRoleListerMockGet.RLock() + calls = mock.calls.Get + lockRoleListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *RoleListerMock) List(namespace string, selector labels.Selector) ([]*v1.Role, error) { + if mock.ListFunc == nil { + panic("RoleListerMock.ListFunc: method is nil but RoleLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockRoleListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockRoleListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedRoleLister.ListCalls()) +func (mock *RoleListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockRoleListerMockList.RLock() + calls = mock.calls.List + lockRoleListerMockList.RUnlock() + return calls +} + +var ( + lockRoleControllerMockAddClusterScopedHandler sync.RWMutex + lockRoleControllerMockAddHandler sync.RWMutex + lockRoleControllerMockEnqueue sync.RWMutex + lockRoleControllerMockGeneric sync.RWMutex + lockRoleControllerMockInformer sync.RWMutex + lockRoleControllerMockLister sync.RWMutex + lockRoleControllerMockStart sync.RWMutex + lockRoleControllerMockSync sync.RWMutex +) + +// Ensure, that RoleControllerMock does implement RoleController. +// If this is not the case, regenerate this file with moq. +var _ v1a.RoleController = &RoleControllerMock{} + +// RoleControllerMock is a mock implementation of RoleController. +// +// func TestSomethingThatUsesRoleController(t *testing.T) { +// +// // make and configure a mocked RoleController +// mockedRoleController := &RoleControllerMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v1a.RoleHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v1a.RoleHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v1a.RoleLister { +// panic("mock out the Lister method") +// }, +// StartFunc: func(ctx context.Context, threadiness int) error { +// panic("mock out the Start method") +// }, +// SyncFunc: func(ctx context.Context) error { +// panic("mock out the Sync method") +// }, +// } +// +// // use mockedRoleController in code that requires RoleController +// // and then make assertions. +// +// } +type RoleControllerMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v1a.RoleHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v1a.RoleHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v1a.RoleLister + + // StartFunc mocks the Start method. + StartFunc func(ctx context.Context, threadiness int) error + + // SyncFunc mocks the Sync method. + SyncFunc func(ctx context.Context) error + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v1a.RoleHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v1a.RoleHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []struct { + } + // Lister holds details about calls to the Lister method. + Lister []struct { + } + // Start holds details about calls to the Start method. + Start []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Threadiness is the threadiness argument value. + Threadiness int + } + // Sync holds details about calls to the Sync method. + Sync []struct { + // Ctx is the ctx argument value. + Ctx context.Context + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *RoleControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v1a.RoleHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("RoleControllerMock.AddClusterScopedHandlerFunc: method is nil but RoleController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.RoleHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockRoleControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockRoleControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedRoleController.AddClusterScopedHandlerCalls()) +func (mock *RoleControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.RoleHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v1a.RoleHandlerFunc + } + lockRoleControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockRoleControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *RoleControllerMock) AddHandler(ctx context.Context, name string, handler v1a.RoleHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("RoleControllerMock.AddHandlerFunc: method is nil but RoleController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v1a.RoleHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockRoleControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockRoleControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedRoleController.AddHandlerCalls()) +func (mock *RoleControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v1a.RoleHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v1a.RoleHandlerFunc + } + lockRoleControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockRoleControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *RoleControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("RoleControllerMock.EnqueueFunc: method is nil but RoleController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockRoleControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockRoleControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedRoleController.EnqueueCalls()) +func (mock *RoleControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockRoleControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockRoleControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *RoleControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("RoleControllerMock.GenericFunc: method is nil but RoleController.Generic was just called") + } + callInfo := struct { + }{} + lockRoleControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockRoleControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedRoleController.GenericCalls()) +func (mock *RoleControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockRoleControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockRoleControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *RoleControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("RoleControllerMock.InformerFunc: method is nil but RoleController.Informer was just called") + } + callInfo := struct { + }{} + lockRoleControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockRoleControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedRoleController.InformerCalls()) +func (mock *RoleControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockRoleControllerMockInformer.RLock() + calls = mock.calls.Informer + lockRoleControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *RoleControllerMock) Lister() v1a.RoleLister { + if mock.ListerFunc == nil { + panic("RoleControllerMock.ListerFunc: method is nil but RoleController.Lister was just called") + } + callInfo := struct { + }{} + lockRoleControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockRoleControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedRoleController.ListerCalls()) +func (mock *RoleControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockRoleControllerMockLister.RLock() + calls = mock.calls.Lister + lockRoleControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *RoleControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("RoleControllerMock.StartFunc: method is nil but RoleController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockRoleControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockRoleControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedRoleController.StartCalls()) +func (mock *RoleControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockRoleControllerMockStart.RLock() + calls = mock.calls.Start + lockRoleControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *RoleControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("RoleControllerMock.SyncFunc: method is nil but RoleController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockRoleControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockRoleControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedRoleController.SyncCalls()) +func (mock *RoleControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockRoleControllerMockSync.RLock() + calls = mock.calls.Sync + lockRoleControllerMockSync.RUnlock() + return calls +} + +var ( + lockRoleInterfaceMockAddClusterScopedHandler sync.RWMutex + lockRoleInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockRoleInterfaceMockAddHandler sync.RWMutex + lockRoleInterfaceMockAddLifecycle sync.RWMutex + lockRoleInterfaceMockController sync.RWMutex + lockRoleInterfaceMockCreate sync.RWMutex + lockRoleInterfaceMockDelete sync.RWMutex + lockRoleInterfaceMockDeleteCollection sync.RWMutex + lockRoleInterfaceMockDeleteNamespaced sync.RWMutex + lockRoleInterfaceMockGet sync.RWMutex + lockRoleInterfaceMockGetNamespaced sync.RWMutex + lockRoleInterfaceMockList sync.RWMutex + lockRoleInterfaceMockObjectClient sync.RWMutex + lockRoleInterfaceMockUpdate sync.RWMutex + lockRoleInterfaceMockWatch sync.RWMutex +) + +// Ensure, that RoleInterfaceMock does implement RoleInterface. +// If this is not the case, regenerate this file with moq. +var _ v1a.RoleInterface = &RoleInterfaceMock{} + +// RoleInterfaceMock is a mock implementation of RoleInterface. +// +// func TestSomethingThatUsesRoleInterface(t *testing.T) { +// +// // make and configure a mocked RoleInterface +// mockedRoleInterface := &RoleInterfaceMock{ +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v1a.RoleHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v1a.RoleLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v1a.RoleHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v1a.RoleLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v1a.RoleController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v1.Role) (*v1.Role, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1b.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1b.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1b.GetOptions) (*v1.Role, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.Role, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1b.ListOptions) (*v1a.RoleList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v1.Role) (*v1.Role, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1b.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedRoleInterface in code that requires RoleInterface +// // and then make assertions. +// +// } +type RoleInterfaceMock struct { + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v1a.RoleHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v1a.RoleLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v1a.RoleHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v1a.RoleLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v1a.RoleController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v1.Role) (*v1.Role, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1b.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1b.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1b.GetOptions) (*v1.Role, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.Role, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1b.ListOptions) (*v1a.RoleList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v1.Role) (*v1.Role, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1b.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v1a.RoleHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v1a.RoleLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v1a.RoleHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v1a.RoleLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v1.Role + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1b.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1b.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1b.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1b.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1b.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1b.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1b.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v1.Role + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1b.ListOptions + } + } +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *RoleInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v1a.RoleHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("RoleInterfaceMock.AddClusterScopedHandlerFunc: method is nil but RoleInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.RoleHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockRoleInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockRoleInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedRoleInterface.AddClusterScopedHandlerCalls()) +func (mock *RoleInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.RoleHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v1a.RoleHandlerFunc + } + lockRoleInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockRoleInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *RoleInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v1a.RoleLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("RoleInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but RoleInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.RoleLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockRoleInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockRoleInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedRoleInterface.AddClusterScopedLifecycleCalls()) +func (mock *RoleInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.RoleLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v1a.RoleLifecycle + } + lockRoleInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockRoleInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *RoleInterfaceMock) AddHandler(ctx context.Context, name string, sync v1a.RoleHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("RoleInterfaceMock.AddHandlerFunc: method is nil but RoleInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v1a.RoleHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockRoleInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockRoleInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedRoleInterface.AddHandlerCalls()) +func (mock *RoleInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v1a.RoleHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v1a.RoleHandlerFunc + } + lockRoleInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockRoleInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *RoleInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v1a.RoleLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("RoleInterfaceMock.AddLifecycleFunc: method is nil but RoleInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v1a.RoleLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockRoleInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockRoleInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedRoleInterface.AddLifecycleCalls()) +func (mock *RoleInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v1a.RoleLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v1a.RoleLifecycle + } + lockRoleInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockRoleInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *RoleInterfaceMock) Controller() v1a.RoleController { + if mock.ControllerFunc == nil { + panic("RoleInterfaceMock.ControllerFunc: method is nil but RoleInterface.Controller was just called") + } + callInfo := struct { + }{} + lockRoleInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockRoleInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedRoleInterface.ControllerCalls()) +func (mock *RoleInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockRoleInterfaceMockController.RLock() + calls = mock.calls.Controller + lockRoleInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *RoleInterfaceMock) Create(in1 *v1.Role) (*v1.Role, error) { + if mock.CreateFunc == nil { + panic("RoleInterfaceMock.CreateFunc: method is nil but RoleInterface.Create was just called") + } + callInfo := struct { + In1 *v1.Role + }{ + In1: in1, + } + lockRoleInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockRoleInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedRoleInterface.CreateCalls()) +func (mock *RoleInterfaceMock) CreateCalls() []struct { + In1 *v1.Role +} { + var calls []struct { + In1 *v1.Role + } + lockRoleInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockRoleInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *RoleInterfaceMock) Delete(name string, options *v1b.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("RoleInterfaceMock.DeleteFunc: method is nil but RoleInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1b.DeleteOptions + }{ + Name: name, + Options: options, + } + lockRoleInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockRoleInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedRoleInterface.DeleteCalls()) +func (mock *RoleInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1b.DeleteOptions +} { + var calls []struct { + Name string + Options *v1b.DeleteOptions + } + lockRoleInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockRoleInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *RoleInterfaceMock) DeleteCollection(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("RoleInterfaceMock.DeleteCollectionFunc: method is nil but RoleInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockRoleInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockRoleInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedRoleInterface.DeleteCollectionCalls()) +func (mock *RoleInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions +} { + var calls []struct { + DeleteOpts *v1b.DeleteOptions + ListOpts v1b.ListOptions + } + lockRoleInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockRoleInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *RoleInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1b.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("RoleInterfaceMock.DeleteNamespacedFunc: method is nil but RoleInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1b.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockRoleInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockRoleInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedRoleInterface.DeleteNamespacedCalls()) +func (mock *RoleInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1b.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1b.DeleteOptions + } + lockRoleInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockRoleInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *RoleInterfaceMock) Get(name string, opts v1b.GetOptions) (*v1.Role, error) { + if mock.GetFunc == nil { + panic("RoleInterfaceMock.GetFunc: method is nil but RoleInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1b.GetOptions + }{ + Name: name, + Opts: opts, + } + lockRoleInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockRoleInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedRoleInterface.GetCalls()) +func (mock *RoleInterfaceMock) GetCalls() []struct { + Name string + Opts v1b.GetOptions +} { + var calls []struct { + Name string + Opts v1b.GetOptions + } + lockRoleInterfaceMockGet.RLock() + calls = mock.calls.Get + lockRoleInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *RoleInterfaceMock) GetNamespaced(namespace string, name string, opts v1b.GetOptions) (*v1.Role, error) { + if mock.GetNamespacedFunc == nil { + panic("RoleInterfaceMock.GetNamespacedFunc: method is nil but RoleInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1b.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockRoleInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockRoleInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedRoleInterface.GetNamespacedCalls()) +func (mock *RoleInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1b.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1b.GetOptions + } + lockRoleInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockRoleInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *RoleInterfaceMock) List(opts v1b.ListOptions) (*v1a.RoleList, error) { + if mock.ListFunc == nil { + panic("RoleInterfaceMock.ListFunc: method is nil but RoleInterface.List was just called") + } + callInfo := struct { + Opts v1b.ListOptions + }{ + Opts: opts, + } + lockRoleInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockRoleInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedRoleInterface.ListCalls()) +func (mock *RoleInterfaceMock) ListCalls() []struct { + Opts v1b.ListOptions +} { + var calls []struct { + Opts v1b.ListOptions + } + lockRoleInterfaceMockList.RLock() + calls = mock.calls.List + lockRoleInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *RoleInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("RoleInterfaceMock.ObjectClientFunc: method is nil but RoleInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockRoleInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockRoleInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedRoleInterface.ObjectClientCalls()) +func (mock *RoleInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockRoleInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockRoleInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *RoleInterfaceMock) Update(in1 *v1.Role) (*v1.Role, error) { + if mock.UpdateFunc == nil { + panic("RoleInterfaceMock.UpdateFunc: method is nil but RoleInterface.Update was just called") + } + callInfo := struct { + In1 *v1.Role + }{ + In1: in1, + } + lockRoleInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockRoleInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedRoleInterface.UpdateCalls()) +func (mock *RoleInterfaceMock) UpdateCalls() []struct { + In1 *v1.Role +} { + var calls []struct { + In1 *v1.Role + } + lockRoleInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockRoleInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *RoleInterfaceMock) Watch(opts v1b.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("RoleInterfaceMock.WatchFunc: method is nil but RoleInterface.Watch was just called") + } + callInfo := struct { + Opts v1b.ListOptions + }{ + Opts: opts, + } + lockRoleInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockRoleInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedRoleInterface.WatchCalls()) +func (mock *RoleInterfaceMock) WatchCalls() []struct { + Opts v1b.ListOptions +} { + var calls []struct { + Opts v1b.ListOptions + } + lockRoleInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockRoleInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockRolesGetterMockRoles sync.RWMutex +) + +// Ensure, that RolesGetterMock does implement RolesGetter. +// If this is not the case, regenerate this file with moq. +var _ v1a.RolesGetter = &RolesGetterMock{} + +// RolesGetterMock is a mock implementation of RolesGetter. +// +// func TestSomethingThatUsesRolesGetter(t *testing.T) { +// +// // make and configure a mocked RolesGetter +// mockedRolesGetter := &RolesGetterMock{ +// RolesFunc: func(namespace string) v1a.RoleInterface { +// panic("mock out the Roles method") +// }, +// } +// +// // use mockedRolesGetter in code that requires RolesGetter +// // and then make assertions. +// +// } +type RolesGetterMock struct { + // RolesFunc mocks the Roles method. + RolesFunc func(namespace string) v1a.RoleInterface + + // calls tracks calls to the methods. + calls struct { + // Roles holds details about calls to the Roles method. + Roles []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// Roles calls RolesFunc. +func (mock *RolesGetterMock) Roles(namespace string) v1a.RoleInterface { + if mock.RolesFunc == nil { + panic("RolesGetterMock.RolesFunc: method is nil but RolesGetter.Roles was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockRolesGetterMockRoles.Lock() + mock.calls.Roles = append(mock.calls.Roles, callInfo) + lockRolesGetterMockRoles.Unlock() + return mock.RolesFunc(namespace) +} + +// RolesCalls gets all the calls that were made to Roles. +// Check the length with: +// len(mockedRolesGetter.RolesCalls()) +func (mock *RolesGetterMock) RolesCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockRolesGetterMockRoles.RLock() + calls = mock.calls.Roles + lockRolesGetterMockRoles.RUnlock() + return calls +} diff --git a/apis/rbac.authorization.k8s.io/v1/zz_generated_cluster_role_binding_controller.go b/apis/rbac.authorization.k8s.io/v1/zz_generated_cluster_role_binding_controller.go index bd9da873..e6bad8c4 100644 --- a/apis/rbac.authorization.k8s.io/v1/zz_generated_cluster_role_binding_controller.go +++ b/apis/rbac.authorization.k8s.io/v1/zz_generated_cluster_role_binding_controller.go @@ -40,7 +40,7 @@ func NewClusterRoleBinding(namespace, name string, obj v1.ClusterRoleBinding) *v type ClusterRoleBindingList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.ClusterRoleBinding + Items []v1.ClusterRoleBinding `json:"items"` } type ClusterRoleBindingHandlerFunc func(key string, obj *v1.ClusterRoleBinding) (runtime.Object, error) diff --git a/apis/rbac.authorization.k8s.io/v1/zz_generated_cluster_role_controller.go b/apis/rbac.authorization.k8s.io/v1/zz_generated_cluster_role_controller.go index 7dd3ef61..fdc6fe00 100644 --- a/apis/rbac.authorization.k8s.io/v1/zz_generated_cluster_role_controller.go +++ b/apis/rbac.authorization.k8s.io/v1/zz_generated_cluster_role_controller.go @@ -40,7 +40,7 @@ func NewClusterRole(namespace, name string, obj v1.ClusterRole) *v1.ClusterRole type ClusterRoleList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.ClusterRole + Items []v1.ClusterRole `json:"items"` } type ClusterRoleHandlerFunc func(key string, obj *v1.ClusterRole) (runtime.Object, error) diff --git a/apis/rbac.authorization.k8s.io/v1/zz_generated_role_binding_controller.go b/apis/rbac.authorization.k8s.io/v1/zz_generated_role_binding_controller.go index 74374a35..14f36006 100644 --- a/apis/rbac.authorization.k8s.io/v1/zz_generated_role_binding_controller.go +++ b/apis/rbac.authorization.k8s.io/v1/zz_generated_role_binding_controller.go @@ -41,7 +41,7 @@ func NewRoleBinding(namespace, name string, obj v1.RoleBinding) *v1.RoleBinding type RoleBindingList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.RoleBinding + Items []v1.RoleBinding `json:"items"` } type RoleBindingHandlerFunc func(key string, obj *v1.RoleBinding) (runtime.Object, error) diff --git a/apis/rbac.authorization.k8s.io/v1/zz_generated_role_controller.go b/apis/rbac.authorization.k8s.io/v1/zz_generated_role_controller.go index 22257f10..2199199b 100644 --- a/apis/rbac.authorization.k8s.io/v1/zz_generated_role_controller.go +++ b/apis/rbac.authorization.k8s.io/v1/zz_generated_role_controller.go @@ -41,7 +41,7 @@ func NewRole(namespace, name string, obj v1.Role) *v1.Role { type RoleList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.Role + Items []v1.Role `json:"items"` } type RoleHandlerFunc func(key string, obj *v1.Role) (runtime.Object, error) diff --git a/apis/rbac.authorization.k8s.io/v1/zz_generated_scheme.go b/apis/rbac.authorization.k8s.io/v1/zz_generated_scheme.go index 1c7b90a8..3f9ba918 100644 --- a/apis/rbac.authorization.k8s.io/v1/zz_generated_scheme.go +++ b/apis/rbac.authorization.k8s.io/v1/zz_generated_scheme.go @@ -1,6 +1,7 @@ package v1 import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) @@ -38,5 +39,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &RoleBindingList{}, &RoleList{}, ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil }