From 5b39733baf6d375377c6eaf73d752493050baa7f Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Fri, 24 Feb 2023 16:28:26 -0800 Subject: [PATCH 01/15] First pass at getting to ginkgo v2 - panic occuring because of mismatch ginkgo versions due to ginkgo v1 being needed by code.cloudfoundry.org/cfnetworking-cli-api - code.cloudfoundry.org/cfnetworking-cli-api is archived and hasn't been maintained for quite awhile - the error shows as /Users/moleske/workspace/cli/util/clissh/clissh.test flag redefined: ginkgo.seed panic: /Users/moleske/workspace/cli/util/clissh/clissh.test flag redefined: ginkgo.seed goroutine 1 [running]: flag.(*FlagSet).Var(0x14000116120, {0x1049bcdf8, 0x104c3e280}, {0x1400011d020, 0xb}, {0x104842d23, 0x2a}) /opt/homebrew/Cellar/go/1.20.1/libexec/src/flag/flag.go:982 +0x2a4 flag.(*FlagSet).Int64Var(...) /opt/homebrew/Cellar/go/1.20.1/libexec/src/flag/flag.go:769 github.com/onsi/ginkgo/config.Flags(0x1049370c0?, {0x10482abdb?, 0x104843acb?}, 0x1) /Users/moleske/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/config/config.go:75 +0xe4 github.com/onsi/ginkgo.init.0() /Users/moleske/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/ginkgo_dsl.go:53 +0x34 Ginkgo ran 20 suites in 10.659707541s Test Suite Failed make: *** [units-non-plugin] Error 1 --- actor/actionerror/actionerror_suite_test.go | 2 +- actor/actionerror/duplicate_service_error_test.go | 2 +- actor/actionerror/duplicate_service_plan_error_test.go | 2 +- actor/actionerror/enrich_api_errors_test.go | 2 +- actor/actionerror/package_not_found_in_app_error_test.go | 2 +- actor/actionerror/route_not_found_error_test.go | 2 +- actor/actionerror/service_not_found_error_test.go | 2 +- actor/actionerror/service_plan_not_found_error_test.go | 2 +- actor/actionerror/space_not_found_error_test.go | 2 +- actor/cfnetworkingaction/cfnetworkingaction_suite_test.go | 2 +- actor/cfnetworkingaction/policy_test.go | 2 +- actor/pluginaction/checksum_test.go | 2 +- actor/pluginaction/install_test.go | 2 +- actor/pluginaction/install_unix_test.go | 2 +- actor/pluginaction/install_windows_test.go | 2 +- actor/pluginaction/list_test.go | 2 +- actor/pluginaction/plugin_info_test.go | 2 +- actor/pluginaction/plugin_repository_test.go | 2 +- actor/pluginaction/pluginaction_suite_test.go | 2 +- actor/pluginaction/uninstall_test.go | 2 +- actor/sharedaction/auth_test.go | 2 +- actor/sharedaction/check_target_test.go | 3 +-- actor/sharedaction/help_test.go | 2 +- actor/sharedaction/is_org_targeted_test.go | 2 +- actor/sharedaction/is_space_targeted_test.go | 2 +- actor/sharedaction/logging_test.go | 2 +- actor/sharedaction/resource_darwin_test.go | 2 +- actor/sharedaction/resource_linux_test.go | 2 +- actor/sharedaction/resource_test.go | 2 +- actor/sharedaction/resource_unix_test.go | 2 +- actor/sharedaction/resource_windows_test.go | 2 +- actor/sharedaction/sharedaction_suite_test.go | 2 +- actor/sharedaction/ssh_test.go | 2 +- actor/v7action/application_feature_test.go | 2 +- actor/v7action/application_manifest_test.go | 2 +- actor/v7action/application_summary_test.go | 4 ++-- actor/v7action/application_test.go | 2 +- actor/v7action/auth_test.go | 2 +- actor/v7action/build_test.go | 2 +- actor/v7action/buildpack_test.go | 2 +- actor/v7action/buildpack_unix_test.go | 2 +- actor/v7action/buildpack_windows_test.go | 2 +- actor/v7action/curl_test.go | 2 +- actor/v7action/deployment_test.go | 2 +- actor/v7action/domain_test.go | 2 +- actor/v7action/droplet_test.go | 2 +- actor/v7action/environment_variable_test.go | 2 +- actor/v7action/event_test.go | 2 +- actor/v7action/feature_flag_test.go | 2 +- actor/v7action/info_test.go | 2 +- actor/v7action/isolation_segment_test.go | 2 +- actor/v7action/job_test.go | 2 +- actor/v7action/k8s_auth_test.go | 2 +- actor/v7action/label_test.go | 2 +- actor/v7action/logging_test.go | 2 +- actor/v7action/marketplace_test.go | 2 +- actor/v7action/organization_quota_test.go | 2 +- actor/v7action/organization_summary_test.go | 2 +- actor/v7action/organization_test.go | 2 +- actor/v7action/package_test.go | 3 +-- actor/v7action/process_health_check_test.go | 2 +- actor/v7action/process_instance_test.go | 2 +- actor/v7action/process_summary_test.go | 2 +- actor/v7action/process_test.go | 2 +- actor/v7action/resource_match_test.go | 2 +- actor/v7action/revisions_test.go | 2 +- actor/v7action/role_test.go | 2 +- actor/v7action/route_binding_test.go | 2 +- actor/v7action/route_test.go | 2 +- actor/v7action/router_group_test.go | 2 +- actor/v7action/security_group_test.go | 2 +- actor/v7action/service_access_test.go | 2 +- actor/v7action/service_app_binding_test.go | 2 +- actor/v7action/service_broker_test.go | 2 +- actor/v7action/service_instance_details_test.go | 2 +- actor/v7action/service_instance_list_test.go | 2 +- actor/v7action/service_instance_sharing_test.go | 2 +- actor/v7action/service_instance_test.go | 2 +- actor/v7action/service_key_test.go | 2 +- actor/v7action/service_offering_test.go | 4 ++-- actor/v7action/service_plan_test.go | 2 +- actor/v7action/space_feature_test.go | 2 +- actor/v7action/space_manifest_test.go | 2 +- actor/v7action/space_quota_test.go | 2 +- actor/v7action/space_test.go | 2 +- actor/v7action/ssh_test.go | 2 +- actor/v7action/stack_test.go | 2 +- actor/v7action/target_test.go | 2 +- actor/v7action/task_test.go | 2 +- actor/v7action/token_test.go | 2 +- actor/v7action/user_test.go | 2 +- actor/v7action/v7action_suite_test.go | 2 +- actor/v7action/version_test.go | 2 +- actor/v7pushaction/actor_test.go | 2 +- actor/v7pushaction/actualize_test.go | 2 +- .../v7pushaction/create_bits_package_for_application_test.go | 2 +- actor/v7pushaction/create_deployment_for_push_plan_test.go | 2 +- .../create_docker_package_for_application_test.go | 2 +- actor/v7pushaction/create_droplet_for_application_test.go | 2 +- actor/v7pushaction/create_push_plans_test.go | 2 +- actor/v7pushaction/handle_app_name_override_test.go | 2 +- actor/v7pushaction/handle_app_path_override_test.go | 2 +- actor/v7pushaction/handle_buildpacks_override_test.go | 2 +- actor/v7pushaction/handle_default_route_override_test.go | 2 +- actor/v7pushaction/handle_disk_override_test.go | 2 +- actor/v7pushaction/handle_docker_image_override_test.go | 2 +- actor/v7pushaction/handle_docker_username_override_test.go | 2 +- actor/v7pushaction/handle_droplet_path_override_test.go | 2 +- actor/v7pushaction/handle_flag_overrides_test.go | 2 +- .../handle_health_check_endpoint_override_test.go | 2 +- .../handle_health_check_timeout_override_test.go | 2 +- actor/v7pushaction/handle_health_check_type_override_test.go | 2 +- actor/v7pushaction/handle_instances_override_test.go | 2 +- actor/v7pushaction/handle_log_rate_limit_override_test.go | 2 +- actor/v7pushaction/handle_memory_override_test.go | 2 +- actor/v7pushaction/handle_no_route_override_test.go | 2 +- actor/v7pushaction/handle_random_route_override_test.go | 2 +- actor/v7pushaction/handle_stack_override_test.go | 2 +- actor/v7pushaction/handle_start_command_override_test.go | 2 +- actor/v7pushaction/handle_strategy_override_test.go | 2 +- actor/v7pushaction/handle_task_override_test.go | 2 +- actor/v7pushaction/resource_match_test.go | 2 +- actor/v7pushaction/restart_application_test.go | 2 +- actor/v7pushaction/sequence_test.go | 2 +- .../v7pushaction/set_default_bits_path_for_push_plan_test.go | 2 +- actor/v7pushaction/set_droplet_for_application_test.go | 2 +- actor/v7pushaction/setup_all_resources_for_push_plan_test.go | 2 +- .../setup_deployment_strategy_for_push_plan_test.go | 2 +- actor/v7pushaction/setup_droplet_path_for_push_plan_test.go | 2 +- actor/v7pushaction/setup_no_start_for_push_plan_test.go | 2 +- actor/v7pushaction/setup_no_wait_for_push_plan_test.go | 2 +- actor/v7pushaction/setup_task_app_for_push_plan_test.go | 2 +- actor/v7pushaction/stage_package_for_application_test.go | 2 +- actor/v7pushaction/stop_application_test.go | 2 +- actor/v7pushaction/v7pushaction_suite_test.go | 2 +- actor/versioncheck/minimum_version_check_test.go | 2 +- actor/versioncheck/versioncheck_suite_test.go | 2 +- api/cloudcontroller/ccerror/ccerror_suite_test.go | 2 +- api/cloudcontroller/ccerror/multi_error_test.go | 2 +- .../ccerror/service_offering_name_ambiguity_error_test.go | 2 +- .../ccerror/service_offering_not_found_error_test.go | 2 +- .../ccerror/v2_unexpected_response_error_test.go | 2 +- .../ccerror/v3_unexpected_response_error_test.go | 2 +- api/cloudcontroller/ccv3/application_feature_test.go | 2 +- api/cloudcontroller/ccv3/application_test.go | 2 +- api/cloudcontroller/ccv3/build_test.go | 2 +- api/cloudcontroller/ccv3/buildpack_test.go | 2 +- api/cloudcontroller/ccv3/ccv3_suite_test.go | 2 +- api/cloudcontroller/ccv3/client_test.go | 2 +- api/cloudcontroller/ccv3/deployment_test.go | 2 +- api/cloudcontroller/ccv3/domain_test.go | 2 +- api/cloudcontroller/ccv3/droplet_test.go | 2 +- api/cloudcontroller/ccv3/environment_test.go | 2 +- api/cloudcontroller/ccv3/environment_variables_test.go | 2 +- api/cloudcontroller/ccv3/errors_test.go | 2 +- api/cloudcontroller/ccv3/event_test.go | 2 +- api/cloudcontroller/ccv3/feature_flag_test.go | 2 +- api/cloudcontroller/ccv3/info_test.go | 2 +- api/cloudcontroller/ccv3/internal/internal_suite_test.go | 2 +- api/cloudcontroller/ccv3/internal/routing_test.go | 2 +- api/cloudcontroller/ccv3/isolation_segment_test.go | 2 +- api/cloudcontroller/ccv3/job_test.go | 4 ++-- api/cloudcontroller/ccv3/job_url_test.go | 2 +- api/cloudcontroller/ccv3/manifest_test.go | 2 +- api/cloudcontroller/ccv3/metadata_test.go | 2 +- api/cloudcontroller/ccv3/organization_quota_test.go | 2 +- api/cloudcontroller/ccv3/organization_test.go | 2 +- api/cloudcontroller/ccv3/package_test.go | 2 +- api/cloudcontroller/ccv3/paginated_resources_test.go | 2 +- api/cloudcontroller/ccv3/process_instance_test.go | 2 +- api/cloudcontroller/ccv3/process_test.go | 2 +- api/cloudcontroller/ccv3/query_test.go | 2 +- api/cloudcontroller/ccv3/relationship_list_test.go | 2 +- api/cloudcontroller/ccv3/relationship_test.go | 2 +- api/cloudcontroller/ccv3/requester_test.go | 2 +- api/cloudcontroller/ccv3/resource_test.go | 2 +- api/cloudcontroller/ccv3/revisions_test.go | 2 +- api/cloudcontroller/ccv3/role_test.go | 2 +- api/cloudcontroller/ccv3/route_binding_test.go | 2 +- api/cloudcontroller/ccv3/route_test.go | 2 +- api/cloudcontroller/ccv3/security_group_test.go | 2 +- api/cloudcontroller/ccv3/service_broker_test.go | 2 +- api/cloudcontroller/ccv3/service_credential_binding_test.go | 2 +- api/cloudcontroller/ccv3/service_instance_test.go | 2 +- api/cloudcontroller/ccv3/service_offering_test.go | 2 +- api/cloudcontroller/ccv3/service_plan_test.go | 2 +- api/cloudcontroller/ccv3/service_plan_visibility_test.go | 4 ++-- api/cloudcontroller/ccv3/sidecar_test.go | 2 +- api/cloudcontroller/ccv3/space_feature_test.go | 2 +- api/cloudcontroller/ccv3/space_quota_test.go | 2 +- api/cloudcontroller/ccv3/space_test.go | 2 +- api/cloudcontroller/ccv3/stack_test.go | 2 +- api/cloudcontroller/ccv3/target_test.go | 2 +- api/cloudcontroller/ccv3/task_test.go | 2 +- api/cloudcontroller/ccv3/user_test.go | 2 +- api/cloudcontroller/ccv3/v2_formatted_resource_test.go | 2 +- api/cloudcontroller/cloud_controller_connection_test.go | 2 +- api/cloudcontroller/cloudcontroller_suite_test.go | 2 +- .../wrapper/kubernetes_authentication_test.go | 2 +- api/cloudcontroller/wrapper/request_logger_test.go | 2 +- api/cloudcontroller/wrapper/retry_request_test.go | 4 ++-- api/cloudcontroller/wrapper/uaa_authentication_test.go | 2 +- api/cloudcontroller/wrapper/wrapper_suite_test.go | 2 +- api/plugin/client_test.go | 2 +- api/plugin/download_plugin_test.go | 2 +- api/plugin/plugin_connection_test.go | 2 +- api/plugin/plugin_repository_test.go | 2 +- api/plugin/plugin_suite_test.go | 2 +- api/plugin/wrapper/request_logger_test.go | 2 +- api/plugin/wrapper/retry_request_test.go | 4 ++-- api/plugin/wrapper/wrapper_suite_test.go | 2 +- api/router/router_group_test.go | 2 +- api/router/router_suite_test.go | 2 +- api/router/wrapper/error_wrapper_test.go | 2 +- api/router/wrapper/request_logger_test.go | 2 +- api/router/wrapper/uaa_authentication_test.go | 2 +- api/router/wrapper/wrapper_suite_test.go | 2 +- api/shared/shared_suite_test.go | 2 +- api/shared/wrap_for_cf_on_k8s_test.go | 2 +- api/uaa/auth_test.go | 2 +- api/uaa/client_test.go | 2 +- api/uaa/error_converter_test.go | 2 +- api/uaa/info_test.go | 2 +- api/uaa/internal/internal_suite_test.go | 2 +- api/uaa/internal/routing_test.go | 2 +- api/uaa/noaabridge/noaabridge_suite_test.go | 2 +- api/uaa/noaabridge/token_refresher_test.go | 2 +- api/uaa/prompts_test.go | 2 +- api/uaa/refresh_token_test.go | 2 +- api/uaa/resources_test.go | 2 +- api/uaa/ssh_test.go | 2 +- api/uaa/uaa_connection_test.go | 2 +- api/uaa/uaa_suite_test.go | 2 +- api/uaa/user_test.go | 2 +- api/uaa/version_test.go | 2 +- api/uaa/wrapper/request_logger_test.go | 2 +- api/uaa/wrapper/retry_request_test.go | 4 ++-- api/uaa/wrapper/uaa_authentication_test.go | 2 +- api/uaa/wrapper/wrapper_suite_test.go | 2 +- cf/actors/actors_suite_test.go | 2 +- cf/actors/brokerbuilder/broker_builder_suite_test.go | 2 +- cf/actors/brokerbuilder/broker_builder_test.go | 2 +- cf/actors/planbuilder/plan_builder_suite_test.go | 2 +- cf/actors/planbuilder/plan_builder_test.go | 2 +- cf/actors/pluginrepo/plugin_repo_suite_test.go | 2 +- cf/actors/pluginrepo/plugin_repo_test.go | 2 +- cf/actors/push_test.go | 2 +- cf/actors/routes_test.go | 2 +- cf/actors/servicebuilder/service_builder_suite_test.go | 2 +- cf/actors/servicebuilder/service_builder_test.go | 2 +- cf/actors/services_plans_test.go | 2 +- cf/actors/services_test.go | 2 +- cf/api/api_suite_test.go | 2 +- cf/api/app_summary_test.go | 2 +- cf/api/appevents/app_events_suite_test.go | 2 +- cf/api/appevents/app_events_test.go | 2 +- cf/api/appfiles/app_files_suite_test.go | 2 +- cf/api/appfiles/app_files_test.go | 2 +- cf/api/appinstances/app_instances_suite_test.go | 2 +- cf/api/appinstances/app_instances_test.go | 2 +- cf/api/applicationbits/application_bits_suite_test.go | 2 +- cf/api/applicationbits/application_bits_test.go | 2 +- cf/api/applications/applications_suite_test.go | 2 +- cf/api/applications/applications_test.go | 2 +- cf/api/authentication/authentication_suite_test.go | 2 +- cf/api/authentication/authentication_test.go | 2 +- cf/api/buildpack_bits_test.go | 2 +- cf/api/buildpacks_test.go | 2 +- cf/api/clients_test.go | 2 +- .../copy_application_source_suite_test.go | 2 +- cf/api/copyapplicationsource/copy_application_source_test.go | 2 +- cf/api/curl_test.go | 2 +- cf/api/domains_test.go | 2 +- cf/api/endpoints_test.go | 2 +- .../environment_variable_groups_suite_test.go | 2 +- .../environment_variable_groups_test.go | 2 +- cf/api/featureflags/feature_flags_suite_test.go | 2 +- cf/api/featureflags/feature_flags_test.go | 2 +- cf/api/logs/log_cache_message_test.go | 2 +- cf/api/logs/log_cache_repository_test.go | 2 +- cf/api/logs/logs_suite_test.go | 2 +- cf/api/organizations/organizations_suite_test.go | 2 +- cf/api/organizations/organizations_test.go | 2 +- cf/api/password/password_suite_test.go | 2 +- cf/api/password/password_test.go | 2 +- cf/api/quotas/quotas_suite_test.go | 2 +- cf/api/quotas/quotas_test.go | 2 +- cf/api/resources/applications_test.go | 2 +- cf/api/resources/events_test.go | 2 +- cf/api/resources/quotas_test.go | 2 +- cf/api/resources/resources_test.go | 2 +- cf/api/resources/service_instances_test.go | 2 +- cf/api/resources/service_keys_test.go | 2 +- cf/api/route_service_binding_repository_test.go | 2 +- cf/api/routes_test.go | 2 +- cf/api/routing_api_test.go | 2 +- cf/api/securitygroups/defaults/running/running_suite_test.go | 2 +- cf/api/securitygroups/defaults/running/running_test.go | 2 +- cf/api/securitygroups/defaults/staging/staging_suite_test.go | 2 +- cf/api/securitygroups/defaults/staging/staging_test.go | 2 +- cf/api/securitygroups/security_groups_suite_test.go | 2 +- cf/api/securitygroups/security_groups_test.go | 2 +- cf/api/securitygroups/spaces/space_binder_test.go | 2 +- cf/api/securitygroups/spaces/suite_test.go | 2 +- cf/api/service_auth_tokens_test.go | 2 +- cf/api/service_bindings_test.go | 2 +- cf/api/service_brokers_test.go | 2 +- cf/api/service_keys_test.go | 2 +- cf/api/service_plan_test.go | 2 +- cf/api/service_plan_visibility_test.go | 2 +- cf/api/service_summary_test.go | 2 +- cf/api/services_test.go | 2 +- cf/api/spacequotas/space_quotas_suite_test.go | 2 +- cf/api/spacequotas/space_quotas_test.go | 2 +- cf/api/spaces/spaces_suite_test.go | 2 +- cf/api/spaces/spaces_test.go | 2 +- cf/api/stacks/stacks_suite_test.go | 2 +- cf/api/stacks/stacks_test.go | 2 +- cf/api/user_provided_service_instances_test.go | 2 +- cf/api/users_test.go | 2 +- cf/appfiles/app_files_suite_test.go | 2 +- cf/appfiles/app_files_test.go | 2 +- cf/appfiles/cf_ignore_test.go | 2 +- cf/appfiles/zipper_test.go | 2 +- cf/commandregistry/command_registry_suite_test.go | 2 +- cf/commandregistry/dependency_test.go | 2 +- cf/commandregistry/registry_test.go | 2 +- cf/commands/api_test.go | 2 +- cf/commands/application/app_test.go | 2 +- cf/commands/application/application_suite_test.go | 2 +- cf/commands/application/apps_test.go | 2 +- cf/commands/application/copy_source_test.go | 2 +- cf/commands/application/delete_test.go | 2 +- cf/commands/application/disable_ssh_test.go | 2 +- cf/commands/application/enable_ssh_test.go | 2 +- cf/commands/application/env_test.go | 2 +- cf/commands/application/events_test.go | 2 +- cf/commands/application/files_test.go | 2 +- cf/commands/application/get_health_check_test.go | 2 +- cf/commands/application/logs_test.go | 2 +- cf/commands/application/push_test.go | 2 +- cf/commands/application/rename_test.go | 2 +- cf/commands/application/restage_test.go | 2 +- cf/commands/application/restart_app_instance_test.go | 2 +- cf/commands/application/restart_test.go | 2 +- cf/commands/application/scale_test.go | 2 +- cf/commands/application/set_env_test.go | 2 +- cf/commands/application/set_health_check_test.go | 2 +- cf/commands/application/ssh_enabled_test.go | 2 +- cf/commands/application/ssh_test.go | 2 +- cf/commands/application/start_test.go | 2 +- cf/commands/application/stop_test.go | 2 +- cf/commands/application/unset_env_test.go | 2 +- cf/commands/auth_test.go | 2 +- cf/commands/buildpack/buildpack_suite_test.go | 2 +- cf/commands/buildpack/buildpacks_test.go | 2 +- cf/commands/buildpack/create_buildpack_test.go | 2 +- cf/commands/buildpack/delete_buildpack_test.go | 2 +- cf/commands/buildpack/rename_buildpack_test.go | 2 +- cf/commands/buildpack/update_buildpack_test.go | 2 +- cf/commands/commands_suite_test.go | 2 +- cf/commands/config_test.go | 2 +- cf/commands/create_app_manifest_test.go | 2 +- cf/commands/curl_test.go | 2 +- cf/commands/domain/create_domain_test.go | 2 +- cf/commands/domain/create_shared_domain_test.go | 2 +- cf/commands/domain/delete_domain_test.go | 2 +- cf/commands/domain/delete_shared_domain_test.go | 2 +- cf/commands/domain/domain_suite_test.go | 2 +- cf/commands/domain/domains_test.go | 2 +- .../environmentvariablegroup_suite_test.go | 2 +- .../running_environment_variable_group_test.go | 2 +- .../set_running_environment_variable_group_test.go | 2 +- .../set_staging_environment_variable_group_test.go | 2 +- .../staging_environment_variable_group_test.go | 2 +- cf/commands/featureflag/disable_feature_flag_test.go | 2 +- cf/commands/featureflag/enable_feature_flag_test.go | 2 +- cf/commands/featureflag/feature_flag_test.go | 2 +- cf/commands/featureflag/feature_flags_test.go | 2 +- cf/commands/featureflag/featureflag_suite_test.go | 2 +- cf/commands/help_test.go | 2 +- cf/commands/login_test.go | 2 +- cf/commands/logout_test.go | 2 +- cf/commands/oauth_token_test.go | 2 +- cf/commands/organization/create_org_test.go | 2 +- cf/commands/organization/delete_org_test.go | 2 +- cf/commands/organization/org_test.go | 2 +- cf/commands/organization/organization_suite_test.go | 2 +- cf/commands/organization/orgs_test.go | 2 +- cf/commands/organization/rename_org_test.go | 2 +- cf/commands/organization/set_quota_test.go | 2 +- cf/commands/passwd_test.go | 2 +- cf/commands/plugin/install_plugin_test.go | 2 +- cf/commands/plugin/plugin_suite_test.go | 2 +- cf/commands/plugin/plugins_test.go | 2 +- cf/commands/plugin/uninstall_plugin_test.go | 2 +- cf/commands/pluginrepo/add_plugin_repo_test.go | 2 +- cf/commands/pluginrepo/list_plugin_repos_test.go | 2 +- cf/commands/pluginrepo/plugin_repo_suite_test.go | 2 +- cf/commands/pluginrepo/remove_plugin_repo_test.go | 2 +- cf/commands/pluginrepo/repo_plugins_test.go | 2 +- cf/commands/quota/create_quota_test.go | 2 +- cf/commands/quota/delete_quota_test.go | 2 +- cf/commands/quota/quota_suite_test.go | 2 +- cf/commands/quota/quota_test.go | 2 +- cf/commands/quota/quotas_test.go | 2 +- cf/commands/quota/update_quota_test.go | 2 +- cf/commands/route/check_route_test.go | 2 +- cf/commands/route/create_route_test.go | 2 +- cf/commands/route/delete_orphaned_routes_test.go | 2 +- cf/commands/route/delete_route_test.go | 2 +- cf/commands/route/map_route_test.go | 2 +- cf/commands/route/route_suite_test.go | 2 +- cf/commands/route/routes_test.go | 2 +- cf/commands/route/unmap_route_test.go | 2 +- cf/commands/routergroups/router_groups_test.go | 2 +- cf/commands/routergroups/routergroups_suite_test.go | 2 +- .../securitygroup/bind_running_security_group_test.go | 2 +- cf/commands/securitygroup/bind_security_group_test.go | 2 +- .../securitygroup/bind_staging_security_group_test.go | 2 +- cf/commands/securitygroup/create_security_group_test.go | 2 +- cf/commands/securitygroup/delete_security_group_test.go | 2 +- cf/commands/securitygroup/running_security_groups_test.go | 2 +- cf/commands/securitygroup/security_group_test.go | 2 +- cf/commands/securitygroup/security_groups_test.go | 2 +- cf/commands/securitygroup/staging_security_groups_test.go | 2 +- cf/commands/securitygroup/suite_test.go | 2 +- .../securitygroup/unbind_running_security_group_test.go | 2 +- cf/commands/securitygroup/unbind_security_group_test.go | 2 +- .../securitygroup/unbind_staging_security_group_test.go | 2 +- cf/commands/securitygroup/update_security_group_test.go | 2 +- cf/commands/service/bind_route_service_test.go | 2 +- cf/commands/service/bind_service_test.go | 2 +- cf/commands/service/create_service_test.go | 2 +- cf/commands/service/create_user_provided_service_test.go | 2 +- cf/commands/service/delete_service_test.go | 2 +- cf/commands/service/marketplace_test.go | 2 +- cf/commands/service/migrate_service_instances_test.go | 2 +- cf/commands/service/purge_service_instance_test.go | 2 +- cf/commands/service/purge_service_offering_test.go | 2 +- cf/commands/service/rename_service_test.go | 2 +- cf/commands/service/service_suite_test.go | 2 +- cf/commands/service/service_test.go | 2 +- cf/commands/service/services_test.go | 2 +- cf/commands/service/unbind_route_service_test.go | 2 +- cf/commands/service/unbind_service_test.go | 2 +- cf/commands/service/update_service_test.go | 2 +- cf/commands/service/update_user_provided_service_test.go | 2 +- cf/commands/serviceaccess/disable_service_access_test.go | 2 +- cf/commands/serviceaccess/enable_service_access_test.go | 2 +- cf/commands/serviceaccess/service_access_test.go | 2 +- cf/commands/serviceaccess/serviceaccess_suite_test.go | 2 +- .../serviceauthtoken/create_service_auth_token_test.go | 2 +- .../serviceauthtoken/delete_service_auth_token_test.go | 2 +- cf/commands/serviceauthtoken/service_auth_tokens_test.go | 2 +- cf/commands/serviceauthtoken/serviceauthtoken_suite_test.go | 2 +- .../serviceauthtoken/update_service_auth_token_test.go | 2 +- cf/commands/servicebroker/create_service_broker_test.go | 2 +- cf/commands/servicebroker/delete_service_broker_test.go | 2 +- cf/commands/servicebroker/rename_service_broker_test.go | 2 +- cf/commands/servicebroker/service_brokers_test.go | 2 +- cf/commands/servicebroker/servicebroker_suite_test.go | 2 +- cf/commands/servicebroker/update_service_broker_test.go | 2 +- cf/commands/servicekey/create_service_key_test.go | 2 +- cf/commands/servicekey/delete_service_key_test.go | 2 +- cf/commands/servicekey/service_key_test.go | 2 +- cf/commands/servicekey/service_keys_test.go | 2 +- cf/commands/servicekey/servicekey_suite_test.go | 2 +- cf/commands/space/allow_space_ssh_test.go | 2 +- cf/commands/space/create_space_test.go | 2 +- cf/commands/space/delete_space_test.go | 2 +- cf/commands/space/disallow_space_ssh_test.go | 2 +- cf/commands/space/rename_space_test.go | 2 +- cf/commands/space/space_ssh_allowed_test.go | 2 +- cf/commands/space/space_suite_test.go | 2 +- cf/commands/space/space_test.go | 2 +- cf/commands/space/spaces_test.go | 2 +- cf/commands/spacequota/create_space_quota_test.go | 2 +- cf/commands/spacequota/delete_space_quota_test.go | 2 +- cf/commands/spacequota/set_space_quota_test.go | 2 +- cf/commands/spacequota/space_quota_test.go | 2 +- cf/commands/spacequota/space_quotas_test.go | 2 +- cf/commands/spacequota/spacequota_suite_test.go | 2 +- cf/commands/spacequota/unset_space_quota_test.go | 2 +- cf/commands/spacequota/update_space_quota_test.go | 4 ++-- cf/commands/ssh_code_test.go | 2 +- cf/commands/stack_test.go | 2 +- cf/commands/stacks_test.go | 2 +- cf/commands/target_test.go | 2 +- cf/commands/user/create_user_test.go | 2 +- cf/commands/user/delete_user_test.go | 2 +- cf/commands/user/org_users_test.go | 2 +- cf/commands/user/set_org_role_test.go | 2 +- cf/commands/user/set_space_role_test.go | 2 +- cf/commands/user/space_users_test.go | 2 +- cf/commands/user/unset_org_role_test.go | 2 +- cf/commands/user/unset_space_role_test.go | 2 +- cf/commands/user/user_suite_test.go | 2 +- cf/commands/version_test.go | 2 +- cf/commandsloader/commands_loader_suite_test.go | 2 +- cf/commandsloader/commands_loader_test.go | 2 +- cf/configuration/config_disk_persistor_test.go | 2 +- cf/configuration/configuration_suite_test.go | 2 +- cf/configuration/coreconfig/access_token_test.go | 2 +- cf/configuration/coreconfig/api_config_refresher_test.go | 2 +- cf/configuration/coreconfig/config_data_test.go | 2 +- cf/configuration/coreconfig/config_repository_test.go | 2 +- cf/configuration/coreconfig/core_config_suite_test.go | 2 +- cf/configuration/pluginconfig/plugin_config_test.go | 2 +- cf/configuration/pluginconfig/plugin_suite_test.go | 2 +- cf/flagcontext/flag_content_helper_test.go | 2 +- cf/flagcontext/util_suite_test.go | 2 +- cf/flags/flag_constructor_test.go | 2 +- cf/flags/flags_suite_test.go | 2 +- cf/flags/flags_test.go | 2 +- cf/flags/flags_usage_test.go | 2 +- cf/formatters/bools_test.go | 2 +- cf/formatters/bytes_test.go | 2 +- cf/formatters/formatters_suite_test.go | 2 +- cf/formatters/memoryLimit_test.go | 2 +- cf/help/help_suite_test.go | 2 +- cf/help/help_test.go | 2 +- cf/i18n/i18n_suite_test.go | 2 +- cf/i18n/locale_test.go | 2 +- cf/manifest/generate_manifest_test.go | 2 +- cf/manifest/manifest_disk_repository_test.go | 2 +- cf/manifest/manifest_suite_test.go | 2 +- cf/manifest/manifest_test.go | 2 +- cf/models/application_test.go | 2 +- cf/models/domain_test.go | 2 +- cf/models/models_suite_test.go | 2 +- cf/models/route_summary_test.go | 2 +- cf/models/route_test.go | 2 +- cf/models/service_instance_test.go | 2 +- cf/models/service_plan_test.go | 2 +- cf/net/cloud_controller_gateway_test.go | 2 +- cf/net/gateway_test.go | 2 +- cf/net/http_client_test.go | 2 +- cf/net/net_suite_test.go | 2 +- cf/net/progress_reader_test.go | 2 +- cf/net/request_dumper_test.go | 2 +- cf/net/routing_api_gateway_test.go | 2 +- cf/net/uaa_gateway_test.go | 2 +- cf/net/warnings_collector_test.go | 2 +- cf/requirements/api_endpoint_test.go | 2 +- cf/requirements/application_test.go | 2 +- cf/requirements/buildpack_test.go | 2 +- cf/requirements/config_refreshing_requirement_test.go | 2 +- cf/requirements/dea_application_test.go | 2 +- cf/requirements/domain_test.go | 2 +- cf/requirements/login_test.go | 2 +- cf/requirements/max_api_version_test.go | 2 +- cf/requirements/min_api_version_test.go | 2 +- cf/requirements/number_arguments_test.go | 2 +- cf/requirements/organization_test.go | 2 +- cf/requirements/requirements_suite_test.go | 2 +- cf/requirements/requirements_test.go | 2 +- cf/requirements/service_instance_test.go | 2 +- cf/requirements/space_test.go | 2 +- cf/requirements/targeted_organization_test.go | 2 +- cf/requirements/targeted_space_test.go | 2 +- cf/requirements/unsupported_legacy_flag_test.go | 2 +- cf/requirements/usage_requirement_test.go | 2 +- cf/requirements/user_test.go | 2 +- cf/ssh/options/options_suite_test.go | 2 +- cf/ssh/options/ssh_options_test.go | 2 +- cf/ssh/ssh_suite_test.go | 2 +- cf/ssh/ssh_test.go | 2 +- cf/ssh/terminal/helper_test.go | 2 +- cf/ssh/terminal/terminal_suite_test.go | 2 +- cf/terminal/color_test.go | 2 +- cf/terminal/table_test.go | 2 +- cf/terminal/tee_printer_test.go | 2 +- cf/terminal/terminal_suite_test.go | 2 +- cf/terminal/ui_test.go | 2 +- cf/trace/combined_printer_test.go | 2 +- cf/trace/logger_provider_test.go | 2 +- cf/trace/trace_suite_test.go | 2 +- cf/trace/trace_test.go | 2 +- cf/uihelpers/tags_parser_test.go | 2 +- cf/uihelpers/ui_helpers_suite_test.go | 2 +- cf/util/downloader/file_download_test.go | 2 +- cf/util/downloader/fileutils_suite_test.go | 2 +- cf/util/glob/glob_test.go | 2 +- cf/util/json/json_parser_test.go | 2 +- cf/util/json/json_suite_test.go | 2 +- cf/util/spellcheck/spellcheck_suite_test.go | 2 +- cf/util/spellcheck/spellcheck_test.go | 2 +- cf/util/testhelpers/io/io_test.go | 2 +- cf/util/testhelpers/io/suite_test.go | 2 +- cf/util/testhelpers/matchers/be_in_display_order_test.go | 2 +- cf/util/testhelpers/matchers/contain_element_times_test.go | 2 +- .../testhelpers/matchers/contain_elements_in_order_test.go | 2 +- cf/util/testhelpers/matchers/have_type_of_test.go | 2 +- cf/util/testhelpers/matchers/match_func_name_test.go | 2 +- cf/util/testhelpers/matchers/match_path_test.go | 2 +- cf/util/testhelpers/matchers/matchers_suite_test.go | 2 +- cf/util/testhelpers/net/request_matcher.go | 2 +- cf/util/testhelpers/net/server.go | 2 +- command/api_version_warning_test.go | 2 +- command/command_suite_test.go | 2 +- command/common/command_list_v7_test.go | 2 +- command/common/common_suite_test.go | 2 +- command/common/install_plugin_command_test.go | 2 +- command/common/install_plugin_from_repo_command_test.go | 4 ++-- command/common/internal/help_all_display_test.go | 2 +- command/common/internal/internal_suite_test.go | 2 +- command/common/version_command_test.go | 2 +- command/flag/app_type_test.go | 3 +-- command/flag/binding_name_test.go | 2 +- command/flag/buildpack_test.go | 2 +- command/flag/bytes_with_unlimited_test.go | 2 +- command/flag/color_test.go | 3 +-- command/flag/command_test.go | 2 +- command/flag/credentials_or_json_test.go | 4 ++-- command/flag/deployment_strategy_test.go | 3 +-- command/flag/docker_test.go | 2 +- command/flag/droplet_test.go | 2 +- command/flag/environment_variable_test.go | 2 +- command/flag/flag_suite_test.go | 2 +- command/flag/health_check_type_test.go | 3 +-- command/flag/health_check_type_with_deprecated_value_test.go | 3 +-- command/flag/instances_test.go | 2 +- command/flag/integer_limit_test.go | 2 +- command/flag/locale_test.go | 3 +-- command/flag/megabytes_test.go | 2 +- command/flag/megabytes_with_unlimited_test.go | 2 +- command/flag/network_port_test.go | 3 +-- command/flag/network_protocol_test.go | 3 +-- command/flag/optional_string_test.go | 2 +- command/flag/org_role_test.go | 3 +-- command/flag/path_test.go | 2 +- command/flag/port_test.go | 2 +- command/flag/positive_integer_test.go | 2 +- command/flag/revision_test.go | 2 +- command/flag/route_path_test.go | 2 +- command/flag/security_group_lifecycle_test.go | 3 +-- command/flag/space_role_test.go | 3 +-- command/flag/ssh_port_forwarding_test.go | 4 ++-- command/flag/tags_test.go | 2 +- command/flag/timeout_test.go | 2 +- command/flag/trimmed_string_test.go | 2 +- command/minimum_version_check_test.go | 2 +- command/plugin/add_plugin_repo_command_test.go | 2 +- command/plugin/plugin_suite_test.go | 2 +- command/plugin/plugins_command_test.go | 2 +- command/plugin/uninstall_plugin_command_test.go | 2 +- .../translatableerror/convert_to_translatable_error_test.go | 4 ++-- .../minimum_cf_api_version_not_met_error_test.go | 2 +- .../minimum_cli_version_not_met_error_test.go | 2 +- .../minimum_uaa_api_version_not_met_error_test.go | 2 +- command/translatableerror/missing_credential_error_test.go | 2 +- .../service_instance_not_shareable_error_test.go | 2 +- .../translatableerror/service_plan_not_found_error_test.go | 2 +- command/translatableerror/staging_timeout_error_test.go | 2 +- command/translatableerror/tip_decorator_error_test.go | 2 +- command/translatableerror/translatableerror_suite_test.go | 2 +- command/translatableerror/translate_test.go | 3 +-- command/translatableerror/unauthorized_error_test.go | 3 +-- command/v7/add_network_policy_command_test.go | 2 +- command/v7/allow_space_ssh_command_test.go | 2 +- command/v7/api_command_test.go | 2 +- command/v7/app_command_test.go | 2 +- command/v7/apply_manifest_command_test.go | 2 +- command/v7/apps_command_test.go | 2 +- command/v7/auth_command_test.go | 2 +- command/v7/bind_route_service_command_test.go | 2 +- command/v7/bind_running_security_group_command_test.go | 2 +- command/v7/bind_security_group_command_test.go | 2 +- command/v7/bind_service_command_test.go | 2 +- command/v7/bind_staging_security_group_command_test.go | 2 +- command/v7/buildpacks_command_test.go | 2 +- command/v7/cancel_deployment_command_test.go | 2 +- command/v7/check_route_command_test.go | 2 +- command/v7/config_command_test.go | 2 +- command/v7/copy_source_command_test.go | 2 +- command/v7/create_app_command_test.go | 2 +- command/v7/create_app_manifest_command_test.go | 2 +- command/v7/create_buildpack_command_test.go | 2 +- command/v7/create_isolation_segment_command_test.go | 2 +- command/v7/create_org_command_test.go | 2 +- command/v7/create_org_quota_command_test.go | 2 +- command/v7/create_package_command_test.go | 2 +- command/v7/create_private_domain_command_test.go | 2 +- command/v7/create_route_command_test.go | 2 +- command/v7/create_security_group_command_test.go | 2 +- command/v7/create_service_broker_command_test.go | 2 +- command/v7/create_service_command_test.go | 2 +- command/v7/create_service_key_command_test.go | 2 +- command/v7/create_shared_domain_command_test.go | 2 +- command/v7/create_space_command_test.go | 2 +- command/v7/create_space_quota_command_test.go | 2 +- command/v7/create_user_command_test.go | 2 +- command/v7/create_user_provided_service_command_test.go | 2 +- command/v7/curl_command_test.go | 2 +- command/v7/delete_buildpack_command_test.go | 2 +- command/v7/delete_command_test.go | 2 +- command/v7/delete_isolation_segment_command_test.go | 2 +- command/v7/delete_org_command_test.go | 2 +- command/v7/delete_org_quota_command_test.go | 2 +- command/v7/delete_orphaned_routes_command_test.go | 2 +- command/v7/delete_private_domain_command_test.go | 2 +- command/v7/delete_route_command_test.go | 2 +- command/v7/delete_security_group_command_test.go | 2 +- command/v7/delete_service_broker_command_test.go | 2 +- command/v7/delete_service_command_test.go | 2 +- command/v7/delete_service_key_command_test.go | 2 +- command/v7/delete_shared_domain_command_test.go | 2 +- command/v7/delete_space_command_test.go | 2 +- command/v7/delete_space_quota_command_test.go | 2 +- command/v7/delete_user_command_test.go | 2 +- command/v7/disable_feature_flag_command_test.go | 2 +- command/v7/disable_org_isolation_command_test.go | 2 +- command/v7/disable_service_access_command_test.go | 4 ++-- command/v7/disable_ssh_command_test.go | 2 +- command/v7/disallow_space_ssh_command_test.go | 2 +- command/v7/docker_password_getter_test.go | 2 +- command/v7/domains_command_test.go | 2 +- command/v7/download_droplet_command_test.go | 2 +- command/v7/droplets_command_test.go | 2 +- command/v7/enable_feature_flag_command_test.go | 2 +- command/v7/enable_org_isolation_command_test.go | 2 +- command/v7/enable_service_access_command_test.go | 4 ++-- command/v7/enable_ssh_command_test.go | 2 +- command/v7/env_command_test.go | 2 +- command/v7/events_command_test.go | 2 +- command/v7/feature_flag_command_test.go | 2 +- command/v7/feature_flags_command_test.go | 2 +- command/v7/get_health_check_command_test.go | 2 +- command/v7/isolation_segments_command_test.go | 2 +- command/v7/label_updater_test.go | 4 ++-- command/v7/labels_command_test.go | 4 ++-- command/v7/login_command_test.go | 2 +- command/v7/logout_command_test.go | 2 +- command/v7/logs_command_test.go | 2 +- command/v7/map_route_command_test.go | 2 +- command/v7/marketplace_command_test.go | 4 ++-- command/v7/move_route_command_test.go | 2 +- command/v7/network_policies_command_test.go | 2 +- command/v7/oauth_token_command_test.go | 2 +- command/v7/org_command_test.go | 2 +- command/v7/org_quota_command_test.go | 2 +- command/v7/org_quotas_command_test.go | 2 +- command/v7/org_users_command_test.go | 2 +- command/v7/orgs_command_test.go | 2 +- command/v7/packages_command_test.go | 2 +- command/v7/passwd_command_test.go | 2 +- command/v7/purge_service_instance_command_test.go | 2 +- command/v7/purge_service_offering_command_test.go | 2 +- command/v7/push_command_test.go | 4 ++-- command/v7/remove_network_policy_command_test.go | 2 +- command/v7/rename_command_test.go | 2 +- command/v7/rename_org_command_test.go | 2 +- command/v7/rename_service_broker_command_test.go | 2 +- command/v7/rename_service_command_test.go | 2 +- command/v7/rename_space_command_test.go | 2 +- .../v7/reset_org_default_isolation_segment_command_test.go | 2 +- command/v7/reset_space_isolation_segment_command_test.go | 2 +- command/v7/restage_command_test.go | 2 +- command/v7/restart_app_instance_command_test.go | 2 +- command/v7/restart_command_test.go | 2 +- command/v7/revision_command_test.go | 2 +- command/v7/revisions_command_test.go | 2 +- command/v7/rollback_command_test.go | 2 +- command/v7/route_command_test.go | 2 +- command/v7/router_groups_command_test.go | 2 +- command/v7/routes_command_test.go | 2 +- command/v7/run_task_command_test.go | 2 +- .../v7/running_environment_variable_group_command_test.go | 2 +- command/v7/running_security_groups_command_test.go | 2 +- command/v7/scale_command_test.go | 2 +- command/v7/security_group_command_test.go | 2 +- command/v7/security_groups_command_test.go | 2 +- command/v7/service_access_command_test.go | 4 ++-- command/v7/service_brokers_command_test.go | 2 +- command/v7/service_command_test.go | 2 +- command/v7/service_key_command_test.go | 2 +- command/v7/service_keys_command_test.go | 2 +- command/v7/services_command_test.go | 2 +- command/v7/set_droplet_command_test.go | 2 +- command/v7/set_env_command_test.go | 2 +- command/v7/set_health_check_command_test.go | 2 +- command/v7/set_label_command_test.go | 2 +- command/v7/set_org_default_isolation_segment_command_test.go | 2 +- command/v7/set_org_quota_command_test.go | 2 +- command/v7/set_org_role_command_test.go | 2 +- .../set_running_environment_variable_group_command_test.go | 2 +- command/v7/set_space_isolation_segment_command_test.go | 2 +- command/v7/set_space_quota_command_test.go | 2 +- command/v7/set_space_role_command_test.go | 2 +- .../set_staging_environment_variable_group_command_test.go | 2 +- command/v7/share_private_domain_command_test.go | 2 +- command/v7/share_route_command_test.go | 2 +- command/v7/share_service_command_test.go | 2 +- command/v7/shared/app_stager_test.go | 2 +- command/v7/shared/app_summary_displayer_test.go | 2 +- command/v7/shared/manifest_diff_displayer_test.go | 2 +- command/v7/shared/new_clients_test.go | 2 +- command/v7/shared/new_networking_client_test.go | 2 +- command/v7/shared/shared_suite_test.go | 2 +- command/v7/shared/v3_poll_stage_test.go | 2 +- command/v7/shared/version_checker_test.go | 2 +- command/v7/space_command_test.go | 2 +- command/v7/space_quota_command_test.go | 2 +- command/v7/space_quotas_command_test.go | 2 +- command/v7/space_ssh_allowed_command_test.go | 2 +- command/v7/space_users_command_test.go | 2 +- command/v7/spaces_command_test.go | 2 +- command/v7/ssh_code_command_test.go | 2 +- command/v7/ssh_command_test.go | 4 ++-- command/v7/ssh_enabled_command_test.go | 2 +- command/v7/stack_command_test.go | 2 +- command/v7/stacks_command_test.go | 2 +- command/v7/stage_package_command_test.go | 2 +- .../v7/staging_environment_variable_group_command_test.go | 2 +- command/v7/staging_security_groups_command_test.go | 2 +- command/v7/start_command_test.go | 2 +- command/v7/stop_command_test.go | 2 +- command/v7/target_command_test.go | 2 +- command/v7/tasks_command_test.go | 2 +- command/v7/terminate_task_command_test.go | 2 +- command/v7/unbind_route_service_command_test.go | 2 +- command/v7/unbind_running_group_command_test.go | 2 +- command/v7/unbind_security_group_test.go | 2 +- command/v7/unbind_service_command_test.go | 2 +- command/v7/unbind_staging_security_group_command_test.go | 2 +- command/v7/unmap_route_command_test.go | 2 +- command/v7/unset_env_command_test.go | 2 +- command/v7/unset_label_command_test.go | 2 +- command/v7/unset_org_role_command_test.go | 2 +- command/v7/unset_space_quota_command_test.go | 2 +- command/v7/unset_space_role_command_test.go | 2 +- command/v7/unshare_private_domain_command_test.go | 2 +- command/v7/unshare_route_command_test.go | 2 +- command/v7/unshare_service_command_test.go | 2 +- command/v7/update_buildpack_command_test.go | 2 +- command/v7/update_destination_command_test.go | 2 +- command/v7/update_org_quota_command_test.go | 2 +- command/v7/update_security_group_command_test.go | 2 +- command/v7/update_service_broker_command_test.go | 2 +- command/v7/update_service_command_test.go | 2 +- command/v7/update_space_quota_command_test.go | 2 +- command/v7/update_user_provided_service_command_test.go | 2 +- command/v7/upgrade_service_command_test.go | 2 +- command/v7/v7_suite_test.go | 2 +- go.mod | 5 ++++- go.sum | 1 + .../assets/hydrabroker/database/database_suite_test.go | 3 --- integration/assets/hydrabroker/database/database_test.go | 2 -- .../integrationtest/integrationtest_suite_test.go | 3 --- .../hydrabroker/integrationtest/integrationtest_test.go | 3 --- integration/assets/hydrabroker/store/bindings_test.go | 2 -- integration/assets/hydrabroker/store/brokers_test.go | 3 --- integration/assets/hydrabroker/store/instances_test.go | 5 +---- integration/assets/hydrabroker/store/store_suite_test.go | 3 --- integration/helpers/app_instance_table_test.go | 2 +- integration/helpers/app_test.go | 2 +- integration/helpers/client_credentials.go | 2 +- integration/helpers/command.go | 2 +- integration/helpers/commonisolated/common_isolated_setup.go | 2 +- integration/helpers/config.go | 2 +- integration/helpers/docker.go | 2 +- integration/helpers/environment.go | 2 +- integration/helpers/helpers_suite_test.go | 2 +- integration/helpers/isolation_segment.go | 2 +- integration/helpers/login.go | 2 +- integration/helpers/os.go | 2 +- integration/helpers/servicebrokerstub/app_deploy.go | 2 +- integration/helpers/version.go | 2 +- integration/helpers/version_v7.go | 2 +- integration/shared/experimental/experimental_suite_test.go | 2 +- integration/shared/global/global_suite_test.go | 2 +- .../running_environment_variable_group_command_test.go | 2 +- .../staging_environment_variable_group_command_test.go | 2 +- integration/shared/isolated/apps_command_test.go | 2 +- integration/shared/isolated/config_test.go | 2 +- integration/shared/isolated/error_handling_test.go | 2 +- integration/shared/isolated/internationalization_test.go | 3 +-- integration/shared/isolated/logs_command_test.go | 2 +- .../shared/isolated/restart_app_instance_command_test.go | 2 +- integration/shared/isolated/spaces_command_test.go | 2 +- integration/shared/isolated/version_command_test.go | 3 +-- integration/shared/performance/performance_suite_test.go | 2 +- integration/shared/plugin/add_plugin_repo_test.go | 2 +- integration/shared/plugin/api_test.go | 2 +- integration/shared/plugin/help_test.go | 3 +-- integration/shared/plugin/install_plugin_command_test.go | 2 +- .../shared/plugin/install_plugin_command_unix_test.go | 2 +- .../shared/plugin/install_plugin_from_repo_command_test.go | 2 +- integration/shared/plugin/logs_test.go | 2 +- integration/shared/plugin/plugin_suite_test.go | 2 +- integration/shared/plugin/plugins_command_test.go | 2 +- integration/shared/plugin/runner_test.go | 2 +- integration/shared/plugin/uninstall_plugin_command_test.go | 2 +- .../shared/plugin/uninstall_plugin_command_unix_test.go | 2 +- .../v7/global/bind_running_security_group_command_test.go | 2 +- integration/v7/global/bind_security_group_command_test.go | 2 +- .../v7/global/bind_staging_security_group_command_test.go | 2 +- integration/v7/global/create_buildpack_command_test.go | 2 +- integration/v7/global/create_security_group_command_test.go | 2 +- integration/v7/global/delete_buildpack_command_test.go | 2 +- integration/v7/global/disable_feature_flag_command_test.go | 2 +- integration/v7/global/enable_feature_flag_command_test.go | 2 +- integration/v7/global/env_command_test.go | 2 +- integration/v7/global/global_suite_test.go | 2 +- integration/v7/global/org_quota_command_test.go | 2 +- integration/v7/global/org_quotas_command_test.go | 2 +- .../running_environment_variable_group_command_test.go | 2 +- .../v7/global/running_security_groups_command_test.go | 2 +- integration/v7/global/security_group_command_test.go | 2 +- integration/v7/global/set_org_role_command_test.go | 2 +- .../set_running_environment_variable_group_command_test.go | 2 +- integration/v7/global/set_space_role_command_test.go | 2 +- .../set_staging_environment_variable_group_command_test.go | 2 +- .../staging_environment_variable_group_command_test.go | 2 +- .../v7/global/staging_security_groups_command_test.go | 2 +- .../v7/global/unbind_running_security_group_command_test.go | 2 +- integration/v7/global/unbind_security_group_command_test.go | 2 +- .../v7/global/unbind_staging_security_group_command_test.go | 2 +- integration/v7/global/update_buildpack_command_test.go | 2 +- integration/v7/global/update_security_group_command_test.go | 2 +- integration/v7/isolated/add_network_policy_command_test.go | 2 +- integration/v7/isolated/allow_space_ssh_command_test.go | 2 +- integration/v7/isolated/api_command_test.go | 2 +- integration/v7/isolated/app_command_test.go | 2 +- integration/v7/isolated/apply_manifest_command_test.go | 2 +- integration/v7/isolated/apps_command_test.go | 2 +- integration/v7/isolated/auth_command_test.go | 2 +- integration/v7/isolated/bind_route_service_command_test.go | 2 +- integration/v7/isolated/bind_service_command_test.go | 2 +- integration/v7/isolated/buildpacks_command_test.go | 2 +- integration/v7/isolated/cancel_deployment_test.go | 2 +- integration/v7/isolated/check_route_command_test.go | 2 +- integration/v7/isolated/config_command_test.go | 4 ++-- integration/v7/isolated/config_test.go | 2 +- integration/v7/isolated/copy_source_command_test.go | 2 +- integration/v7/isolated/create_app_command_test.go | 2 +- integration/v7/isolated/create_app_manifest_command_test.go | 2 +- .../v7/isolated/create_isolation_segment_command_test.go | 2 +- integration/v7/isolated/create_org_command_test.go | 2 +- integration/v7/isolated/create_org_quota_command_test.go | 2 +- integration/v7/isolated/create_package_cfignore_test.go | 2 +- integration/v7/isolated/create_package_command_test.go | 2 +- integration/v7/isolated/create_private_domain_test.go | 2 +- integration/v7/isolated/create_route_command_test.go | 2 +- .../v7/isolated/create_service_broker_command_test.go | 2 +- integration/v7/isolated/create_service_command_test.go | 2 +- integration/v7/isolated/create_service_key_command_test.go | 2 +- integration/v7/isolated/create_shared_domain_test.go | 2 +- integration/v7/isolated/create_space_command_test.go | 2 +- integration/v7/isolated/create_space_quota_command_test.go | 2 +- integration/v7/isolated/create_user_command_test.go | 4 ++-- .../v7/isolated/create_user_provided_service_command_test.go | 2 +- integration/v7/isolated/curl_command_test.go | 2 +- integration/v7/isolated/delete_command_test.go | 2 +- .../v7/isolated/delete_isolation_segment_command_test.go | 2 +- integration/v7/isolated/delete_org_command_test.go | 2 +- integration/v7/isolated/delete_org_quota_command_test.go | 2 +- .../v7/isolated/delete_orphaned_routes_command_test.go | 2 +- .../v7/isolated/delete_private_domain_command_test.go | 2 +- integration/v7/isolated/delete_route_command_test.go | 2 +- .../v7/isolated/delete_security_group_command_test.go | 2 +- .../v7/isolated/delete_service_broker_command_test.go | 2 +- integration/v7/isolated/delete_service_command_test.go | 2 +- integration/v7/isolated/delete_service_key_command_test.go | 2 +- integration/v7/isolated/delete_shared_domain_command_test.go | 2 +- integration/v7/isolated/delete_space_command_test.go | 2 +- integration/v7/isolated/delete_space_quota_command_test.go | 2 +- integration/v7/isolated/delete_user_command_test.go | 2 +- .../v7/isolated/disable_org_isolation_command_test.go | 2 +- .../v7/isolated/disable_service_access_command_test.go | 2 +- integration/v7/isolated/disable_ssh_command_test.go | 2 +- integration/v7/isolated/disallow_space_ssh_command_test.go | 2 +- integration/v7/isolated/domains_command_test.go | 2 +- integration/v7/isolated/download_droplet_command_test.go | 2 +- integration/v7/isolated/droplets_command_test.go | 2 +- integration/v7/isolated/enable_org_isolation_command_test.go | 2 +- .../v7/isolated/enable_service_access_command_test.go | 2 +- integration/v7/isolated/enable_ssh_command_test.go | 2 +- integration/v7/isolated/error_on_extra_arguments_test.go | 2 +- integration/v7/isolated/events_command_test.go | 2 +- integration/v7/isolated/feature_flag_command_test.go | 2 +- integration/v7/isolated/feature_flags_command_test.go | 2 +- integration/v7/isolated/get_health_check_command_test.go | 2 +- integration/v7/isolated/help_command_test.go | 4 ++-- integration/v7/isolated/isolation_segments_command_test.go | 2 +- integration/v7/isolated/labels_command_test.go | 2 +- integration/v7/isolated/login_command_test.go | 2 +- integration/v7/isolated/logout_command_test.go | 2 +- integration/v7/isolated/logs_command_test.go | 2 +- integration/v7/isolated/map_route_command_test.go | 2 +- integration/v7/isolated/marketplace_command_test.go | 2 +- integration/v7/isolated/move_route_command_test.go | 2 +- integration/v7/isolated/network_policies_command_test.go | 2 +- integration/v7/isolated/oauth_client_test.go | 2 +- integration/v7/isolated/oauth_token_command_test.go | 2 +- integration/v7/isolated/org_command_test.go | 2 +- integration/v7/isolated/org_users_command_test.go | 2 +- integration/v7/isolated/orgs_command_test.go | 2 +- integration/v7/isolated/packages_command_test.go | 2 +- integration/v7/isolated/passwd_command_test.go | 2 +- integration/v7/isolated/proxy_connection_test.go | 2 +- .../v7/isolated/purge_service_instance_command_test.go | 2 +- .../v7/isolated/purge_service_offering_command_test.go | 2 +- .../v7/isolated/remove_network_policy_command_test.go | 2 +- integration/v7/isolated/rename_command_test.go | 2 +- integration/v7/isolated/rename_org_command_test.go | 2 +- .../v7/isolated/rename_service_broker_command_test.go | 2 +- integration/v7/isolated/rename_service_command_test.go | 2 +- integration/v7/isolated/rename_space_command_test.go | 2 +- .../reset_org_default_isolation_segment_command_test.go | 2 +- .../v7/isolated/reset_space_isolation_segment_test.go | 2 +- integration/v7/isolated/restage_command_test.go | 2 +- integration/v7/isolated/restart_app_instance_command_test.go | 2 +- integration/v7/isolated/restart_command_test.go | 2 +- integration/v7/isolated/revision_command_test.go | 2 +- integration/v7/isolated/revisions_command_test.go | 2 +- integration/v7/isolated/rollback_command_test.go | 2 +- integration/v7/isolated/route_command_test.go | 2 +- integration/v7/isolated/router_groups_command_test.go | 2 +- integration/v7/isolated/routes_command_test.go | 2 +- integration/v7/isolated/run_task_command_test.go | 2 +- integration/v7/isolated/scale_command_test.go | 2 +- integration/v7/isolated/security_groups_command_test.go | 2 +- integration/v7/isolated/service_access_command_test.go | 2 +- integration/v7/isolated/service_brokers_command_test.go | 2 +- integration/v7/isolated/service_command_test.go | 2 +- integration/v7/isolated/service_key_command_test.go | 2 +- integration/v7/isolated/service_keys_command_test.go | 2 +- integration/v7/isolated/services_command_test.go | 2 +- integration/v7/isolated/set_droplet_command_test.go | 2 +- integration/v7/isolated/set_env_command_test.go | 2 +- integration/v7/isolated/set_health_check_command_test.go | 2 +- integration/v7/isolated/set_label_command_test.go | 2 +- .../set_org_default_isolation_segment_command_test.go | 2 +- integration/v7/isolated/set_org_quota_command_test.go | 2 +- integration/v7/isolated/set_org_role_command_test.go | 2 +- .../v7/isolated/set_space_isolation_segment_command_test.go | 2 +- integration/v7/isolated/set_space_quota_command_test.go | 2 +- integration/v7/isolated/set_space_role_command_test.go | 2 +- integration/v7/isolated/share_private_domain_test.go | 2 +- integration/v7/isolated/share_route_command_test.go | 2 +- integration/v7/isolated/share_service_command_test.go | 2 +- integration/v7/isolated/space_command_test.go | 2 +- integration/v7/isolated/space_quota_command_test.go | 2 +- integration/v7/isolated/space_quotas_command_test.go | 2 +- integration/v7/isolated/space_ssh_allowed_command_test.go | 2 +- integration/v7/isolated/space_users_command_test.go | 2 +- integration/v7/isolated/spaces_command_test.go | 2 +- integration/v7/isolated/ssh_code_command_test.go | 2 +- integration/v7/isolated/ssh_command_test.go | 2 +- integration/v7/isolated/ssh_enabled_command_test.go | 2 +- integration/v7/isolated/stack_command_test.go | 2 +- integration/v7/isolated/stacks_command_test.go | 2 +- integration/v7/isolated/stage_package_command_test.go | 2 +- integration/v7/isolated/start_command_test.go | 2 +- integration/v7/isolated/stop_command_test.go | 2 +- integration/v7/isolated/suggest_command_test.go | 2 +- integration/v7/isolated/table_alignment_test.go | 2 +- integration/v7/isolated/target_command_test.go | 4 ++-- integration/v7/isolated/tasks_command_test.go | 2 +- integration/v7/isolated/terminate_task_command_test.go | 2 +- integration/v7/isolated/token_refresh_test.go | 2 +- integration/v7/isolated/unbind_route_service_command_test.go | 2 +- integration/v7/isolated/unbind_service_command_test.go | 2 +- integration/v7/isolated/unmap_route_command_test.go | 2 +- integration/v7/isolated/unset_env_command_test.go | 2 +- integration/v7/isolated/unset_label_command_test.go | 2 +- integration/v7/isolated/unset_org_role_command_test.go | 2 +- integration/v7/isolated/unset_space_quota_command_test.go | 2 +- integration/v7/isolated/unset_space_role_command_test.go | 2 +- integration/v7/isolated/unshare_private_domain_test.go | 2 +- integration/v7/isolated/unshare_route_command_test.go | 2 +- integration/v7/isolated/unshare_service_command_test.go | 2 +- integration/v7/isolated/update_destination_command_test.go | 2 +- integration/v7/isolated/update_org_quota_command_test.go | 2 +- .../v7/isolated/update_service_broker_command_test.go | 2 +- integration/v7/isolated/update_service_command_test.go | 4 ++-- integration/v7/isolated/update_space_quota_command_test.go | 2 +- .../v7/isolated/update_user_provided_service_command_test.go | 2 +- integration/v7/isolated/upgrade_service_command_test.go | 2 +- integration/v7/isolated/verbose_flag_test.go | 4 ++-- integration/v7/push/app_start_timeout_flag_test.go | 2 +- integration/v7/push/buildpacks_test.go | 2 +- integration/v7/push/cfignore_test.go | 2 +- integration/v7/push/combination_manifest_and_flag_test.go | 4 ++-- integration/v7/push/disk_flag_test.go | 2 +- integration/v7/push/docker_test.go | 2 +- integration/v7/push/droplet_flag_test.go | 2 +- integration/v7/push/health_check_test.go | 2 +- integration/v7/push/help_test.go | 2 +- integration/v7/push/ignore_app_files_test.go | 2 +- integration/v7/push/input_errors_test.go | 2 +- integration/v7/push/instances_flag_test.go | 2 +- integration/v7/push/log_rate_limit_flag_test.go | 2 +- integration/v7/push/manifest_diff_test.go | 2 +- integration/v7/push/manifest_location_test.go | 2 +- .../v7/push/manifest_with_app_name_and_no_route_flag_test.go | 2 +- integration/v7/push/manifest_with_app_name_test.go | 2 +- integration/v7/push/memory_flag_test.go | 2 +- integration/v7/push/name_only_test.go | 2 +- integration/v7/push/no_route_test.go | 2 +- integration/v7/push/no_start_test.go | 2 +- integration/v7/push/no_wait_test.go | 2 +- integration/v7/push/path_test.go | 2 +- integration/v7/push/push_output_test.go | 2 +- integration/v7/push/push_suite_test.go | 2 +- integration/v7/push/random_route_test.go | 2 +- integration/v7/push/resource_matching_test.go | 2 +- integration/v7/push/rolling_push_test.go | 2 +- integration/v7/push/simple_manifest_only_test.go | 3 +-- integration/v7/push/stacks_test.go | 2 +- integration/v7/push/start_command_test.go | 3 +-- integration/v7/push/symlink_resources_test.go | 2 +- integration/v7/push/symlink_test.go | 2 +- integration/v7/push/targeting_test.go | 2 +- integration/v7/push/tasks_test.go | 2 +- integration/v7/selfcontained/api_command_test.go | 2 +- integration/v7/selfcontained/create_space_command_test.go | 2 +- integration/v7/selfcontained/kubernetes_auth_log_test.go | 2 +- integration/v7/selfcontained/kubernetes_auth_test.go | 2 +- integration/v7/selfcontained/login_command_test.go | 2 +- integration/v7/selfcontained/logout_command_test.go | 2 +- integration/v7/selfcontained/selfcontained_suite_test.go | 2 +- .../test_rpc_server_example_suite_test.go | 2 +- .../test_rpc_server_example/test_rpc_server_example_test.go | 2 +- plugin/plugin_shim_test.go | 2 +- plugin/plugin_suite_test.go | 2 +- plugin/rpc/call_command_registry_test.go | 2 +- plugin/rpc/cli_rpc_server_test.go | 2 +- plugin/rpc/rpc_suite_test.go | 2 +- resources/last_operation_resource_test.go | 4 ++-- resources/process_resource_test.go | 2 +- resources/quota_resource_test.go | 3 +-- resources/resources_suite_test.go | 2 +- resources/route_binding_test.go | 4 ++-- resources/security_group_resource_test.go | 4 ++-- resources/service_broker_resource_test.go | 3 +-- resources/service_credential_binding_resource_test.go | 3 +-- resources/service_instance_resource_test.go | 3 +-- resources/service_instance_usage_summary_resource_test.go | 3 +-- resources/service_offering_resource_test.go | 3 +-- resources/service_plan_resource_test.go | 3 +-- resources/service_plan_visibility_resource_test.go | 3 +-- resources/shared_to_spaces_resource_test.go | 3 +-- types/filtered_interface_test.go | 2 +- types/filtered_string_test.go | 4 ++-- types/json_object_test.go | 2 +- types/null_bool_test.go | 3 +-- types/null_bytesize_in_mb_test.go | 2 +- types/null_int_test.go | 4 ++-- types/null_string_test.go | 2 +- types/null_uint64_test.go | 2 +- types/optional_boolean_test.go | 3 +-- types/optional_object_test.go | 2 +- types/optional_string_slice_test.go | 2 +- types/optional_string_test.go | 2 +- types/types_suite_test.go | 2 +- util/batcher/batcher_suite_test.go | 2 +- util/batcher/batcher_test.go | 2 +- util/checksum_test.go | 2 +- util/clissh/ssh_suite_test.go | 2 +- util/clissh/ssh_test.go | 2 +- util/command_parser/command_parser_test.go | 2 +- util/command_parser/parser_suite_test.go | 2 +- util/configv3/color_test.go | 3 +-- util/configv3/config_suite_test.go | 2 +- util/configv3/config_test.go | 2 +- util/configv3/config_unix_test.go | 3 +-- util/configv3/config_windows_test.go | 3 +-- util/configv3/default_user_config_test.go | 2 +- util/configv3/dynamic_user_config_test.go | 2 +- util/configv3/env_test.go | 3 +-- util/configv3/json_config_test.go | 2 +- util/configv3/k8s_test.go | 2 +- util/configv3/kubernetes_user_config_test.go | 2 +- util/configv3/load_config_test.go | 2 +- util/configv3/locale_test.go | 3 +-- util/configv3/plugin_repository_test.go | 2 +- util/configv3/plugins_config_test.go | 4 ++-- util/configv3/write_config_test.go | 2 +- util/download/download_suite_test.go | 2 +- util/download/downloader_test.go | 2 +- util/extract/extract_suite_test.go | 2 +- util/extract/extract_test.go | 2 +- util/generic/architecture_test.go | 3 +-- util/generic/executable_filename_unix_test.go | 2 +- util/generic/executable_filename_windows_test.go | 2 +- util/generic/generic_suite_test.go | 2 +- util/generic/map_test.go | 2 +- util/generic/slice_test.go | 2 +- util/lookuptable/lookuptable_suite_test.go | 2 +- util/lookuptable/name_from_guid_test.go | 2 +- util/manifest/manifest_suite_test.go | 2 +- util/manifest/manifest_test.go | 4 ++-- util/manifest/manifest_unix_test.go | 2 +- util/manifest/manifest_windows_test.go | 2 +- util/manifestparser/application_test.go | 2 +- util/manifestparser/locator_test.go | 2 +- util/manifestparser/manifest_test.go | 2 +- util/manifestparser/manifestparser_suite_test.go | 2 +- util/manifestparser/parser_test.go | 2 +- util/manifestparser/process_test.go | 2 +- util/railway/railway_suite_test.go | 2 +- util/railway/railway_test.go | 2 +- util/randomword/generator_test.go | 2 +- util/randomword/randomword_suite_test.go | 2 +- util/sorting/alphabetic_test.go | 3 +-- util/sorting/sorting_suite_test.go | 2 +- util/tls_test.go | 2 +- util/ui/i18n_test.go | 3 +-- util/ui/log_message_test.go | 2 +- util/ui/prompt_test.go | 2 +- util/ui/request_logger_file_writer_test.go | 2 +- util/ui/request_logger_terminal_display_test.go | 2 +- util/ui/sanitize_json_test.go | 3 +-- util/ui/table_test.go | 2 +- util/ui/ui_for_app_test.go | 2 +- util/ui/ui_for_push_test.go | 2 +- util/ui/ui_suite_test.go | 2 +- util/ui/ui_test.go | 2 +- util/ui/ui_v7_test.go | 2 +- util/unique/string_slice_test.go | 2 +- util/unique/unique_suite_test.go | 2 +- util/url_test.go | 4 ++-- util/util_suite_test.go | 2 +- version/version_suite_test.go | 2 +- version/version_test.go | 2 +- 1228 files changed, 1259 insertions(+), 1317 deletions(-) diff --git a/actor/actionerror/actionerror_suite_test.go b/actor/actionerror/actionerror_suite_test.go index 254f942a8f8..268e4eaae8f 100644 --- a/actor/actionerror/actionerror_suite_test.go +++ b/actor/actionerror/actionerror_suite_test.go @@ -3,7 +3,7 @@ package actionerror_test import ( "testing" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/actionerror/duplicate_service_error_test.go b/actor/actionerror/duplicate_service_error_test.go index 101c7edd774..b20248eabf4 100644 --- a/actor/actionerror/duplicate_service_error_test.go +++ b/actor/actionerror/duplicate_service_error_test.go @@ -2,7 +2,7 @@ package actionerror_test import ( "code.cloudfoundry.org/cli/actor/actionerror" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/actionerror/duplicate_service_plan_error_test.go b/actor/actionerror/duplicate_service_plan_error_test.go index 5944cf984b5..5064f30a299 100644 --- a/actor/actionerror/duplicate_service_plan_error_test.go +++ b/actor/actionerror/duplicate_service_plan_error_test.go @@ -2,7 +2,7 @@ package actionerror_test import ( "code.cloudfoundry.org/cli/actor/actionerror" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/actionerror/enrich_api_errors_test.go b/actor/actionerror/enrich_api_errors_test.go index 0acf73fa9db..d579b5179e9 100644 --- a/actor/actionerror/enrich_api_errors_test.go +++ b/actor/actionerror/enrich_api_errors_test.go @@ -7,7 +7,7 @@ import ( "code.cloudfoundry.org/cli/actor/actionerror" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/actionerror/package_not_found_in_app_error_test.go b/actor/actionerror/package_not_found_in_app_error_test.go index 6aae72411ca..a6bef9120b2 100644 --- a/actor/actionerror/package_not_found_in_app_error_test.go +++ b/actor/actionerror/package_not_found_in_app_error_test.go @@ -2,7 +2,7 @@ package actionerror_test import ( "code.cloudfoundry.org/cli/actor/actionerror" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/actionerror/route_not_found_error_test.go b/actor/actionerror/route_not_found_error_test.go index 6a224716639..e6dedb1a806 100644 --- a/actor/actionerror/route_not_found_error_test.go +++ b/actor/actionerror/route_not_found_error_test.go @@ -2,7 +2,7 @@ package actionerror_test import ( "code.cloudfoundry.org/cli/actor/actionerror" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/actionerror/service_not_found_error_test.go b/actor/actionerror/service_not_found_error_test.go index dd5760e8324..5062830a5c7 100644 --- a/actor/actionerror/service_not_found_error_test.go +++ b/actor/actionerror/service_not_found_error_test.go @@ -2,7 +2,7 @@ package actionerror_test import ( "code.cloudfoundry.org/cli/actor/actionerror" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/actionerror/service_plan_not_found_error_test.go b/actor/actionerror/service_plan_not_found_error_test.go index d3519eb5ec1..4ea762f5ad5 100644 --- a/actor/actionerror/service_plan_not_found_error_test.go +++ b/actor/actionerror/service_plan_not_found_error_test.go @@ -4,7 +4,7 @@ import ( "fmt" "code.cloudfoundry.org/cli/actor/actionerror" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/actionerror/space_not_found_error_test.go b/actor/actionerror/space_not_found_error_test.go index a0682186b30..ad8647e8030 100644 --- a/actor/actionerror/space_not_found_error_test.go +++ b/actor/actionerror/space_not_found_error_test.go @@ -2,7 +2,7 @@ package actionerror_test import ( "code.cloudfoundry.org/cli/actor/actionerror" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/cfnetworkingaction/cfnetworkingaction_suite_test.go b/actor/cfnetworkingaction/cfnetworkingaction_suite_test.go index 061796e1948..40da8cfc05e 100644 --- a/actor/cfnetworkingaction/cfnetworkingaction_suite_test.go +++ b/actor/cfnetworkingaction/cfnetworkingaction_suite_test.go @@ -1,7 +1,7 @@ package cfnetworkingaction_test import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/actor/cfnetworkingaction/policy_test.go b/actor/cfnetworkingaction/policy_test.go index d1319b509fd..539a7aab427 100644 --- a/actor/cfnetworkingaction/policy_test.go +++ b/actor/cfnetworkingaction/policy_test.go @@ -13,7 +13,7 @@ import ( "code.cloudfoundry.org/cli/actor/actionerror" . "code.cloudfoundry.org/cli/actor/cfnetworkingaction" "code.cloudfoundry.org/cli/actor/cfnetworkingaction/cfnetworkingactionfakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/pluginaction/checksum_test.go b/actor/pluginaction/checksum_test.go index 73792f2bcb3..b1c5306f811 100644 --- a/actor/pluginaction/checksum_test.go +++ b/actor/pluginaction/checksum_test.go @@ -6,7 +6,7 @@ import ( . "code.cloudfoundry.org/cli/actor/pluginaction" "code.cloudfoundry.org/cli/actor/pluginaction/pluginactionfakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/pluginaction/install_test.go b/actor/pluginaction/install_test.go index 657d40c1e9f..15280724642 100644 --- a/actor/pluginaction/install_test.go +++ b/actor/pluginaction/install_test.go @@ -13,7 +13,7 @@ import ( "code.cloudfoundry.org/cli/api/plugin/pluginfakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/generic" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/pluginaction/install_unix_test.go b/actor/pluginaction/install_unix_test.go index 3c5227c5a65..343acd4a56f 100644 --- a/actor/pluginaction/install_unix_test.go +++ b/actor/pluginaction/install_unix_test.go @@ -11,7 +11,7 @@ import ( . "code.cloudfoundry.org/cli/actor/pluginaction" "code.cloudfoundry.org/cli/actor/pluginaction/pluginactionfakes" "code.cloudfoundry.org/cli/util/configv3" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/pluginaction/install_windows_test.go b/actor/pluginaction/install_windows_test.go index f1ce037a6fd..e2576c93684 100644 --- a/actor/pluginaction/install_windows_test.go +++ b/actor/pluginaction/install_windows_test.go @@ -9,7 +9,7 @@ import ( . "code.cloudfoundry.org/cli/actor/pluginaction" "code.cloudfoundry.org/cli/actor/pluginaction/pluginactionfakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/pluginaction/list_test.go b/actor/pluginaction/list_test.go index 0fa9a7a72fd..55ba1158bb0 100644 --- a/actor/pluginaction/list_test.go +++ b/actor/pluginaction/list_test.go @@ -8,7 +8,7 @@ import ( "code.cloudfoundry.org/cli/actor/pluginaction/pluginactionfakes" "code.cloudfoundry.org/cli/api/plugin" "code.cloudfoundry.org/cli/util/configv3" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/pluginaction/plugin_info_test.go b/actor/pluginaction/plugin_info_test.go index caf4728ac32..2ec6c6d3e15 100644 --- a/actor/pluginaction/plugin_info_test.go +++ b/actor/pluginaction/plugin_info_test.go @@ -8,7 +8,7 @@ import ( "code.cloudfoundry.org/cli/actor/pluginaction/pluginactionfakes" "code.cloudfoundry.org/cli/api/plugin" "code.cloudfoundry.org/cli/util/configv3" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/pluginaction/plugin_repository_test.go b/actor/pluginaction/plugin_repository_test.go index 07e86248717..468e18ea737 100644 --- a/actor/pluginaction/plugin_repository_test.go +++ b/actor/pluginaction/plugin_repository_test.go @@ -9,7 +9,7 @@ import ( "code.cloudfoundry.org/cli/actor/pluginaction/pluginactionfakes" "code.cloudfoundry.org/cli/api/plugin" "code.cloudfoundry.org/cli/util/configv3" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/pluginaction/pluginaction_suite_test.go b/actor/pluginaction/pluginaction_suite_test.go index 949f243c16e..5dd0ee739b6 100644 --- a/actor/pluginaction/pluginaction_suite_test.go +++ b/actor/pluginaction/pluginaction_suite_test.go @@ -1,7 +1,7 @@ package pluginaction_test import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/actor/pluginaction/uninstall_test.go b/actor/pluginaction/uninstall_test.go index 5320840f80b..ab032e71178 100644 --- a/actor/pluginaction/uninstall_test.go +++ b/actor/pluginaction/uninstall_test.go @@ -11,7 +11,7 @@ import ( . "code.cloudfoundry.org/cli/actor/pluginaction" "code.cloudfoundry.org/cli/actor/pluginaction/pluginactionfakes" "code.cloudfoundry.org/cli/util/configv3" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/sharedaction/auth_test.go b/actor/sharedaction/auth_test.go index 9fbf5e65066..c1271a7f8f2 100644 --- a/actor/sharedaction/auth_test.go +++ b/actor/sharedaction/auth_test.go @@ -5,7 +5,7 @@ import ( . "code.cloudfoundry.org/cli/actor/sharedaction" "code.cloudfoundry.org/cli/actor/sharedaction/sharedactionfakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/sharedaction/check_target_test.go b/actor/sharedaction/check_target_test.go index a0846072628..dae7d4f892e 100644 --- a/actor/sharedaction/check_target_test.go +++ b/actor/sharedaction/check_target_test.go @@ -6,8 +6,7 @@ import ( "code.cloudfoundry.org/cli/actor/actionerror" . "code.cloudfoundry.org/cli/actor/sharedaction" "code.cloudfoundry.org/cli/actor/sharedaction/sharedactionfakes" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/gomega" ) diff --git a/actor/sharedaction/help_test.go b/actor/sharedaction/help_test.go index d729999aa5a..26f5676bcc2 100644 --- a/actor/sharedaction/help_test.go +++ b/actor/sharedaction/help_test.go @@ -5,7 +5,7 @@ import ( . "code.cloudfoundry.org/cli/actor/sharedaction" "code.cloudfoundry.org/cli/actor/sharedaction/sharedactionfakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/sharedaction/is_org_targeted_test.go b/actor/sharedaction/is_org_targeted_test.go index e13bca342f5..0006bcdd593 100644 --- a/actor/sharedaction/is_org_targeted_test.go +++ b/actor/sharedaction/is_org_targeted_test.go @@ -3,7 +3,7 @@ package sharedaction_test import ( . "code.cloudfoundry.org/cli/actor/sharedaction" "code.cloudfoundry.org/cli/actor/sharedaction/sharedactionfakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/sharedaction/is_space_targeted_test.go b/actor/sharedaction/is_space_targeted_test.go index a1bdaca43ae..981f0a992a7 100644 --- a/actor/sharedaction/is_space_targeted_test.go +++ b/actor/sharedaction/is_space_targeted_test.go @@ -3,7 +3,7 @@ package sharedaction_test import ( . "code.cloudfoundry.org/cli/actor/sharedaction" "code.cloudfoundry.org/cli/actor/sharedaction/sharedactionfakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/sharedaction/logging_test.go b/actor/sharedaction/logging_test.go index b713f462eb9..ad32d23f92c 100644 --- a/actor/sharedaction/logging_test.go +++ b/actor/sharedaction/logging_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/actor/sharedaction/sharedactionfakes" logcache "code.cloudfoundry.org/go-log-cache/v2" "code.cloudfoundry.org/go-loggregator/v9/rpc/loggregator_v2" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/sharedaction/resource_darwin_test.go b/actor/sharedaction/resource_darwin_test.go index 21444f4d461..48e8b278d4f 100644 --- a/actor/sharedaction/resource_darwin_test.go +++ b/actor/sharedaction/resource_darwin_test.go @@ -10,7 +10,7 @@ import ( . "code.cloudfoundry.org/cli/actor/sharedaction" "code.cloudfoundry.org/cli/actor/sharedaction/sharedactionfakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/sharedaction/resource_linux_test.go b/actor/sharedaction/resource_linux_test.go index 525a41444f0..7ef10775d96 100644 --- a/actor/sharedaction/resource_linux_test.go +++ b/actor/sharedaction/resource_linux_test.go @@ -10,7 +10,7 @@ import ( . "code.cloudfoundry.org/cli/actor/sharedaction" "code.cloudfoundry.org/cli/actor/sharedaction/sharedactionfakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/sharedaction/resource_test.go b/actor/sharedaction/resource_test.go index 46a002ee796..96188bce3f9 100644 --- a/actor/sharedaction/resource_test.go +++ b/actor/sharedaction/resource_test.go @@ -13,7 +13,7 @@ import ( . "code.cloudfoundry.org/cli/actor/sharedaction" "code.cloudfoundry.org/cli/actor/sharedaction/sharedactionfakes" "code.cloudfoundry.org/ykk" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/sharedaction/resource_unix_test.go b/actor/sharedaction/resource_unix_test.go index 4de5d12432b..3892c07d871 100644 --- a/actor/sharedaction/resource_unix_test.go +++ b/actor/sharedaction/resource_unix_test.go @@ -12,7 +12,7 @@ import ( . "code.cloudfoundry.org/cli/actor/sharedaction" "code.cloudfoundry.org/cli/actor/sharedaction/sharedactionfakes" "code.cloudfoundry.org/ykk" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/sharedaction/resource_windows_test.go b/actor/sharedaction/resource_windows_test.go index 9aa3b6ee290..60087143cdd 100644 --- a/actor/sharedaction/resource_windows_test.go +++ b/actor/sharedaction/resource_windows_test.go @@ -9,7 +9,7 @@ import ( . "code.cloudfoundry.org/cli/actor/sharedaction" "code.cloudfoundry.org/cli/actor/sharedaction/sharedactionfakes" "code.cloudfoundry.org/ykk" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/sharedaction/sharedaction_suite_test.go b/actor/sharedaction/sharedaction_suite_test.go index 192b53011c7..785d8f93c53 100644 --- a/actor/sharedaction/sharedaction_suite_test.go +++ b/actor/sharedaction/sharedaction_suite_test.go @@ -7,7 +7,7 @@ import ( "path/filepath" "strings" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" log "github.com/sirupsen/logrus" diff --git a/actor/sharedaction/ssh_test.go b/actor/sharedaction/ssh_test.go index ce193cc9d1b..9a6519f9657 100644 --- a/actor/sharedaction/ssh_test.go +++ b/actor/sharedaction/ssh_test.go @@ -6,7 +6,7 @@ import ( . "code.cloudfoundry.org/cli/actor/sharedaction" "code.cloudfoundry.org/cli/actor/sharedaction/sharedactionfakes" "code.cloudfoundry.org/cli/util/clissh" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/application_feature_test.go b/actor/v7action/application_feature_test.go index aabe1dff9c0..24990daeada 100644 --- a/actor/v7action/application_feature_test.go +++ b/actor/v7action/application_feature_test.go @@ -9,7 +9,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/clock/fakeclock" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/application_manifest_test.go b/actor/v7action/application_manifest_test.go index 709fcbbe656..a6c3d1da16c 100644 --- a/actor/v7action/application_manifest_test.go +++ b/actor/v7action/application_manifest_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/clock" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/application_summary_test.go b/actor/v7action/application_summary_test.go index ef136015aab..b306e1a02db 100644 --- a/actor/v7action/application_summary_test.go +++ b/actor/v7action/application_summary_test.go @@ -15,8 +15,8 @@ import ( "code.cloudfoundry.org/clock" "code.cloudfoundry.org/cli/actor/actionerror" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/application_test.go b/actor/v7action/application_test.go index 4191a3d90d1..b88ee4f35c6 100644 --- a/actor/v7action/application_test.go +++ b/actor/v7action/application_test.go @@ -15,7 +15,7 @@ import ( "code.cloudfoundry.org/cli/types" "code.cloudfoundry.org/cli/util/batcher" "code.cloudfoundry.org/clock/fakeclock" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/auth_test.go b/actor/v7action/auth_test.go index 1949fe81838..98ec4c3547f 100644 --- a/actor/v7action/auth_test.go +++ b/actor/v7action/auth_test.go @@ -8,7 +8,7 @@ import ( "code.cloudfoundry.org/cli/actor/v7action/v7actionfakes" "code.cloudfoundry.org/cli/api/uaa/constant" "code.cloudfoundry.org/cli/util/configv3" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/build_test.go b/actor/v7action/build_test.go index b7270febed6..28e6b1129f7 100644 --- a/actor/v7action/build_test.go +++ b/actor/v7action/build_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/clock" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/buildpack_test.go b/actor/v7action/buildpack_test.go index c4d0847497c..4ef71fd2376 100644 --- a/actor/v7action/buildpack_test.go +++ b/actor/v7action/buildpack_test.go @@ -15,7 +15,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/types" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/buildpack_unix_test.go b/actor/v7action/buildpack_unix_test.go index 5df6bd7c727..cc7d551d437 100644 --- a/actor/v7action/buildpack_unix_test.go +++ b/actor/v7action/buildpack_unix_test.go @@ -9,7 +9,7 @@ import ( "os" "path/filepath" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "code.cloudfoundry.org/cli/actor/v7action" diff --git a/actor/v7action/buildpack_windows_test.go b/actor/v7action/buildpack_windows_test.go index eb48786c536..361142df8b2 100644 --- a/actor/v7action/buildpack_windows_test.go +++ b/actor/v7action/buildpack_windows_test.go @@ -9,7 +9,7 @@ import ( "os" "path/filepath" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "code.cloudfoundry.org/cli/actor/v7action" diff --git a/actor/v7action/curl_test.go b/actor/v7action/curl_test.go index 19849c1370f..4d6f6ffeb48 100644 --- a/actor/v7action/curl_test.go +++ b/actor/v7action/curl_test.go @@ -9,7 +9,7 @@ import ( . "code.cloudfoundry.org/cli/actor/v7action" "code.cloudfoundry.org/cli/actor/v7action/v7actionfakes" "code.cloudfoundry.org/cli/command/translatableerror" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/deployment_test.go b/actor/v7action/deployment_test.go index 4e4f1fb44c2..2326b6c4f3e 100644 --- a/actor/v7action/deployment_test.go +++ b/actor/v7action/deployment_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/domain_test.go b/actor/v7action/domain_test.go index c3aa35622fb..de8f7d2c7e8 100644 --- a/actor/v7action/domain_test.go +++ b/actor/v7action/domain_test.go @@ -9,7 +9,7 @@ import ( "code.cloudfoundry.org/cli/api/router" "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/types" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/droplet_test.go b/actor/v7action/droplet_test.go index 0b8f35bc5be..b120d55dcd6 100644 --- a/actor/v7action/droplet_test.go +++ b/actor/v7action/droplet_test.go @@ -13,7 +13,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/environment_variable_test.go b/actor/v7action/environment_variable_test.go index 81b2aaa738a..c83493c4d22 100644 --- a/actor/v7action/environment_variable_test.go +++ b/actor/v7action/environment_variable_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/types" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/event_test.go b/actor/v7action/event_test.go index b8eb6f30c9e..96e58ad3204 100644 --- a/actor/v7action/event_test.go +++ b/actor/v7action/event_test.go @@ -7,7 +7,7 @@ import ( "code.cloudfoundry.org/cli/actor/v7action/v7actionfakes" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/feature_flag_test.go b/actor/v7action/feature_flag_test.go index 0c245ae55d5..9bee3c3f219 100644 --- a/actor/v7action/feature_flag_test.go +++ b/actor/v7action/feature_flag_test.go @@ -9,7 +9,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/info_test.go b/actor/v7action/info_test.go index a0e4e4f166e..ed4324db5c0 100644 --- a/actor/v7action/info_test.go +++ b/actor/v7action/info_test.go @@ -7,7 +7,7 @@ import ( "code.cloudfoundry.org/cli/actor/v7action/v7actionfakes" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/isolation_segment_test.go b/actor/v7action/isolation_segment_test.go index f4b812a2c39..9c2fcfbf3a7 100644 --- a/actor/v7action/isolation_segment_test.go +++ b/actor/v7action/isolation_segment_test.go @@ -9,7 +9,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/job_test.go b/actor/v7action/job_test.go index 01f8ae8079b..004b8b60575 100644 --- a/actor/v7action/job_test.go +++ b/actor/v7action/job_test.go @@ -8,7 +8,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/k8s_auth_test.go b/actor/v7action/k8s_auth_test.go index 91ee1c6edaf..c4047524904 100644 --- a/actor/v7action/k8s_auth_test.go +++ b/actor/v7action/k8s_auth_test.go @@ -9,7 +9,7 @@ import ( "code.cloudfoundry.org/cli/cf/configuration/coreconfig" "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" ) diff --git a/actor/v7action/label_test.go b/actor/v7action/label_test.go index 4ecca973a4b..bb5b8471b03 100644 --- a/actor/v7action/label_test.go +++ b/actor/v7action/label_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/types" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/logging_test.go b/actor/v7action/logging_test.go index 1ee14dd0f59..2ce49da8f4e 100644 --- a/actor/v7action/logging_test.go +++ b/actor/v7action/logging_test.go @@ -13,7 +13,7 @@ import ( "code.cloudfoundry.org/cli/resources" logcache "code.cloudfoundry.org/go-log-cache/v2" "code.cloudfoundry.org/go-loggregator/v9/rpc/loggregator_v2" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/marketplace_test.go b/actor/v7action/marketplace_test.go index 7cb2fdda9ec..d74282ad50f 100644 --- a/actor/v7action/marketplace_test.go +++ b/actor/v7action/marketplace_test.go @@ -7,7 +7,7 @@ import ( "code.cloudfoundry.org/cli/actor/v7action/v7actionfakes" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/organization_quota_test.go b/actor/v7action/organization_quota_test.go index dc3d493c74b..6b8e5defba6 100644 --- a/actor/v7action/organization_quota_test.go +++ b/actor/v7action/organization_quota_test.go @@ -9,7 +9,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/types" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/organization_summary_test.go b/actor/v7action/organization_summary_test.go index c711b4a7d11..9ee72781a08 100644 --- a/actor/v7action/organization_summary_test.go +++ b/actor/v7action/organization_summary_test.go @@ -9,7 +9,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/clock" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/organization_test.go b/actor/v7action/organization_test.go index c6359af9fee..f3175ba2e41 100644 --- a/actor/v7action/organization_test.go +++ b/actor/v7action/organization_test.go @@ -9,7 +9,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/package_test.go b/actor/v7action/package_test.go index 423171a329d..170e67f79d5 100644 --- a/actor/v7action/package_test.go +++ b/actor/v7action/package_test.go @@ -15,8 +15,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gstruct" ) diff --git a/actor/v7action/process_health_check_test.go b/actor/v7action/process_health_check_test.go index 33d1340b66e..3ba1df8deb6 100644 --- a/actor/v7action/process_health_check_test.go +++ b/actor/v7action/process_health_check_test.go @@ -9,7 +9,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/process_instance_test.go b/actor/v7action/process_instance_test.go index 96ecff7c603..f884c2a33c2 100644 --- a/actor/v7action/process_instance_test.go +++ b/actor/v7action/process_instance_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/process_summary_test.go b/actor/v7action/process_summary_test.go index f5bee52adc4..f34a5ec2811 100644 --- a/actor/v7action/process_summary_test.go +++ b/actor/v7action/process_summary_test.go @@ -5,7 +5,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/process_test.go b/actor/v7action/process_test.go index 9c95905f316..256dbf33a2b 100644 --- a/actor/v7action/process_test.go +++ b/actor/v7action/process_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/types" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gstruct" ) diff --git a/actor/v7action/resource_match_test.go b/actor/v7action/resource_match_test.go index 1759b2a5baf..688cf387901 100644 --- a/actor/v7action/resource_match_test.go +++ b/actor/v7action/resource_match_test.go @@ -9,7 +9,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" "code.cloudfoundry.org/cli/cf/errors" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/revisions_test.go b/actor/v7action/revisions_test.go index 8f949c2048f..61e8b96eaba 100644 --- a/actor/v7action/revisions_test.go +++ b/actor/v7action/revisions_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/role_test.go b/actor/v7action/role_test.go index 8a6548ea259..ed556689199 100644 --- a/actor/v7action/role_test.go +++ b/actor/v7action/role_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/route_binding_test.go b/actor/v7action/route_binding_test.go index 4222c4948f2..c8e32c68aa2 100644 --- a/actor/v7action/route_binding_test.go +++ b/actor/v7action/route_binding_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/cf/errors" "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/types" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/route_test.go b/actor/v7action/route_test.go index e2e06891d61..a05a392bb01 100644 --- a/actor/v7action/route_test.go +++ b/actor/v7action/route_test.go @@ -12,7 +12,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/batcher" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/router_group_test.go b/actor/v7action/router_group_test.go index 4c1f5239d16..6892bad5b7e 100644 --- a/actor/v7action/router_group_test.go +++ b/actor/v7action/router_group_test.go @@ -8,7 +8,7 @@ import ( "code.cloudfoundry.org/cli/actor/v7action/v7actionfakes" "code.cloudfoundry.org/cli/api/router" "code.cloudfoundry.org/cli/api/router/routererror" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/security_group_test.go b/actor/v7action/security_group_test.go index 0325486b03b..883b99e49e4 100644 --- a/actor/v7action/security_group_test.go +++ b/actor/v7action/security_group_test.go @@ -15,7 +15,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/batcher" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/service_access_test.go b/actor/v7action/service_access_test.go index ec94694a36d..c3f11c00902 100644 --- a/actor/v7action/service_access_test.go +++ b/actor/v7action/service_access_test.go @@ -9,7 +9,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/service_app_binding_test.go b/actor/v7action/service_app_binding_test.go index d85221b2719..16ad7161997 100644 --- a/actor/v7action/service_app_binding_test.go +++ b/actor/v7action/service_app_binding_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/types" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/service_broker_test.go b/actor/v7action/service_broker_test.go index 0db14cedc00..b5b0d08bc66 100644 --- a/actor/v7action/service_broker_test.go +++ b/actor/v7action/service_broker_test.go @@ -8,7 +8,7 @@ import ( "code.cloudfoundry.org/cli/actor/v7action/v7actionfakes" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/service_instance_details_test.go b/actor/v7action/service_instance_details_test.go index 018facf4a59..95c57ef3c01 100644 --- a/actor/v7action/service_instance_details_test.go +++ b/actor/v7action/service_instance_details_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/types" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/service_instance_list_test.go b/actor/v7action/service_instance_list_test.go index d81e4c7f260..9e922d49bb1 100644 --- a/actor/v7action/service_instance_list_test.go +++ b/actor/v7action/service_instance_list_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/types" "code.cloudfoundry.org/cli/util/batcher" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/service_instance_sharing_test.go b/actor/v7action/service_instance_sharing_test.go index e0834ac4dd5..8a36e430aeb 100644 --- a/actor/v7action/service_instance_sharing_test.go +++ b/actor/v7action/service_instance_sharing_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/types" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/service_instance_test.go b/actor/v7action/service_instance_test.go index 03a7ca94f6e..20e439e1c9b 100644 --- a/actor/v7action/service_instance_test.go +++ b/actor/v7action/service_instance_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/types" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/service_key_test.go b/actor/v7action/service_key_test.go index 95c4ab82e9b..b0ba8093656 100644 --- a/actor/v7action/service_key_test.go +++ b/actor/v7action/service_key_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/cf/errors" "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/types" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/service_offering_test.go b/actor/v7action/service_offering_test.go index a0379258dc5..add0f64e302 100644 --- a/actor/v7action/service_offering_test.go +++ b/actor/v7action/service_offering_test.go @@ -9,8 +9,8 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/service_plan_test.go b/actor/v7action/service_plan_test.go index 62a3e592923..8c58f426fd1 100644 --- a/actor/v7action/service_plan_test.go +++ b/actor/v7action/service_plan_test.go @@ -8,7 +8,7 @@ import ( "code.cloudfoundry.org/cli/actor/v7action/v7actionfakes" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/space_feature_test.go b/actor/v7action/space_feature_test.go index 965551c2a78..9d1b1ad8cab 100644 --- a/actor/v7action/space_feature_test.go +++ b/actor/v7action/space_feature_test.go @@ -9,7 +9,7 @@ import ( . "code.cloudfoundry.org/cli/actor/v7action" "code.cloudfoundry.org/cli/actor/v7action/v7actionfakes" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/space_manifest_test.go b/actor/v7action/space_manifest_test.go index d35987201b7..bb83846c730 100644 --- a/actor/v7action/space_manifest_test.go +++ b/actor/v7action/space_manifest_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/space_quota_test.go b/actor/v7action/space_quota_test.go index 7572c725cd3..90eb40bc1a3 100644 --- a/actor/v7action/space_quota_test.go +++ b/actor/v7action/space_quota_test.go @@ -9,7 +9,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/types" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/space_test.go b/actor/v7action/space_test.go index 9db71830252..fe87240e72d 100644 --- a/actor/v7action/space_test.go +++ b/actor/v7action/space_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/ssh_test.go b/actor/v7action/ssh_test.go index a8a7008b011..e41dd38fd59 100644 --- a/actor/v7action/ssh_test.go +++ b/actor/v7action/ssh_test.go @@ -9,7 +9,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/stack_test.go b/actor/v7action/stack_test.go index 7345533fcba..d92989ecbba 100644 --- a/actor/v7action/stack_test.go +++ b/actor/v7action/stack_test.go @@ -8,7 +8,7 @@ import ( "code.cloudfoundry.org/cli/actor/v7action/v7actionfakes" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/target_test.go b/actor/v7action/target_test.go index 54123fd35ce..0d036efc8e3 100644 --- a/actor/v7action/target_test.go +++ b/actor/v7action/target_test.go @@ -8,7 +8,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/task_test.go b/actor/v7action/task_test.go index 49f5a3cfb05..a8df6f2ebad 100644 --- a/actor/v7action/task_test.go +++ b/actor/v7action/task_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/token_test.go b/actor/v7action/token_test.go index 59e0b2bf3f2..22dc83a0553 100644 --- a/actor/v7action/token_test.go +++ b/actor/v7action/token_test.go @@ -8,7 +8,7 @@ import ( "code.cloudfoundry.org/cli/actor/v7action/v7actionfakes" "code.cloudfoundry.org/cli/api/uaa" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/user_test.go b/actor/v7action/user_test.go index 64520b2ab76..9e1aebec339 100644 --- a/actor/v7action/user_test.go +++ b/actor/v7action/user_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/api/uaa" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7action/v7action_suite_test.go b/actor/v7action/v7action_suite_test.go index 675a860f222..10e8c893109 100644 --- a/actor/v7action/v7action_suite_test.go +++ b/actor/v7action/v7action_suite_test.go @@ -12,7 +12,7 @@ import ( . "code.cloudfoundry.org/cli/actor/v7action" "code.cloudfoundry.org/cli/actor/v7action/v7actionfakes" "code.cloudfoundry.org/clock/fakeclock" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" log "github.com/sirupsen/logrus" ) diff --git a/actor/v7action/version_test.go b/actor/v7action/version_test.go index 5cc8ee83251..86226e25ed7 100644 --- a/actor/v7action/version_test.go +++ b/actor/v7action/version_test.go @@ -3,7 +3,7 @@ package v7action_test import ( . "code.cloudfoundry.org/cli/actor/v7action" "code.cloudfoundry.org/cli/actor/v7action/v7actionfakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7pushaction/actor_test.go b/actor/v7pushaction/actor_test.go index 88d00aba0e1..d3ebc799729 100644 --- a/actor/v7pushaction/actor_test.go +++ b/actor/v7pushaction/actor_test.go @@ -3,7 +3,7 @@ package v7pushaction_test import ( . "code.cloudfoundry.org/cli/actor/v7pushaction" "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7pushaction/actualize_test.go b/actor/v7pushaction/actualize_test.go index 4130d35697d..b1e91a08c43 100644 --- a/actor/v7pushaction/actualize_test.go +++ b/actor/v7pushaction/actualize_test.go @@ -9,7 +9,7 @@ import ( "code.cloudfoundry.org/cli/actor/v7pushaction/v7pushactionfakes" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7pushaction/create_bits_package_for_application_test.go b/actor/v7pushaction/create_bits_package_for_application_test.go index dfde7e8cce7..40e96523c44 100644 --- a/actor/v7pushaction/create_bits_package_for_application_test.go +++ b/actor/v7pushaction/create_bits_package_for_application_test.go @@ -12,7 +12,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7pushaction/create_deployment_for_push_plan_test.go b/actor/v7pushaction/create_deployment_for_push_plan_test.go index 3004c6c6246..126eb5dc094 100644 --- a/actor/v7pushaction/create_deployment_for_push_plan_test.go +++ b/actor/v7pushaction/create_deployment_for_push_plan_test.go @@ -7,7 +7,7 @@ import ( . "code.cloudfoundry.org/cli/actor/v7pushaction" "code.cloudfoundry.org/cli/actor/v7pushaction/v7pushactionfakes" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7pushaction/create_docker_package_for_application_test.go b/actor/v7pushaction/create_docker_package_for_application_test.go index 6b85891691b..29c8674573c 100644 --- a/actor/v7pushaction/create_docker_package_for_application_test.go +++ b/actor/v7pushaction/create_docker_package_for_application_test.go @@ -8,7 +8,7 @@ import ( "code.cloudfoundry.org/cli/actor/v7pushaction/v7pushactionfakes" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gstruct" ) diff --git a/actor/v7pushaction/create_droplet_for_application_test.go b/actor/v7pushaction/create_droplet_for_application_test.go index 42e1a83b142..c13603276ab 100644 --- a/actor/v7pushaction/create_droplet_for_application_test.go +++ b/actor/v7pushaction/create_droplet_for_application_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/actor/v7pushaction/v7pushactionfakes" "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7pushaction/create_push_plans_test.go b/actor/v7pushaction/create_push_plans_test.go index b15fa64da9d..871026c3adb 100644 --- a/actor/v7pushaction/create_push_plans_test.go +++ b/actor/v7pushaction/create_push_plans_test.go @@ -9,7 +9,7 @@ import ( "code.cloudfoundry.org/cli/actor/v7pushaction/v7pushactionfakes" "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/manifestparser" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7pushaction/handle_app_name_override_test.go b/actor/v7pushaction/handle_app_name_override_test.go index 7c87fad455f..8d58871ce30 100644 --- a/actor/v7pushaction/handle_app_name_override_test.go +++ b/actor/v7pushaction/handle_app_name_override_test.go @@ -6,7 +6,7 @@ import ( . "code.cloudfoundry.org/cli/actor/v7pushaction" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7pushaction/handle_app_path_override_test.go b/actor/v7pushaction/handle_app_path_override_test.go index fba1747aead..97b67df8ce4 100644 --- a/actor/v7pushaction/handle_app_path_override_test.go +++ b/actor/v7pushaction/handle_app_path_override_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/command/translatableerror" "code.cloudfoundry.org/cli/util/manifestparser" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7pushaction/handle_buildpacks_override_test.go b/actor/v7pushaction/handle_buildpacks_override_test.go index 6942dfa5681..49c6bc6569d 100644 --- a/actor/v7pushaction/handle_buildpacks_override_test.go +++ b/actor/v7pushaction/handle_buildpacks_override_test.go @@ -6,7 +6,7 @@ import ( . "code.cloudfoundry.org/cli/actor/v7pushaction" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7pushaction/handle_default_route_override_test.go b/actor/v7pushaction/handle_default_route_override_test.go index a33aed69aa0..cc94e9ad9f1 100644 --- a/actor/v7pushaction/handle_default_route_override_test.go +++ b/actor/v7pushaction/handle_default_route_override_test.go @@ -5,7 +5,7 @@ import ( . "code.cloudfoundry.org/cli/actor/v7pushaction" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7pushaction/handle_disk_override_test.go b/actor/v7pushaction/handle_disk_override_test.go index c87f7749253..3b139bd0728 100644 --- a/actor/v7pushaction/handle_disk_override_test.go +++ b/actor/v7pushaction/handle_disk_override_test.go @@ -6,7 +6,7 @@ import ( . "code.cloudfoundry.org/cli/actor/v7pushaction" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7pushaction/handle_docker_image_override_test.go b/actor/v7pushaction/handle_docker_image_override_test.go index 77591dc5fb5..9c7c2310539 100644 --- a/actor/v7pushaction/handle_docker_image_override_test.go +++ b/actor/v7pushaction/handle_docker_image_override_test.go @@ -6,7 +6,7 @@ import ( . "code.cloudfoundry.org/cli/actor/v7pushaction" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7pushaction/handle_docker_username_override_test.go b/actor/v7pushaction/handle_docker_username_override_test.go index 2322b087c0b..0dd9a1cd388 100644 --- a/actor/v7pushaction/handle_docker_username_override_test.go +++ b/actor/v7pushaction/handle_docker_username_override_test.go @@ -6,7 +6,7 @@ import ( . "code.cloudfoundry.org/cli/actor/v7pushaction" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7pushaction/handle_droplet_path_override_test.go b/actor/v7pushaction/handle_droplet_path_override_test.go index 98dd997f20a..2c0dfdf5e1c 100644 --- a/actor/v7pushaction/handle_droplet_path_override_test.go +++ b/actor/v7pushaction/handle_droplet_path_override_test.go @@ -5,7 +5,7 @@ import ( "code.cloudfoundry.org/cli/command/translatableerror" "code.cloudfoundry.org/cli/util/manifestparser" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7pushaction/handle_flag_overrides_test.go b/actor/v7pushaction/handle_flag_overrides_test.go index 88f0135463e..a50450b004f 100644 --- a/actor/v7pushaction/handle_flag_overrides_test.go +++ b/actor/v7pushaction/handle_flag_overrides_test.go @@ -3,7 +3,7 @@ package v7pushaction_test import ( . "code.cloudfoundry.org/cli/actor/v7pushaction" "code.cloudfoundry.org/cli/util/manifestparser" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7pushaction/handle_health_check_endpoint_override_test.go b/actor/v7pushaction/handle_health_check_endpoint_override_test.go index 8313357eb83..c3cbac2ed78 100644 --- a/actor/v7pushaction/handle_health_check_endpoint_override_test.go +++ b/actor/v7pushaction/handle_health_check_endpoint_override_test.go @@ -6,7 +6,7 @@ import ( . "code.cloudfoundry.org/cli/actor/v7pushaction" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7pushaction/handle_health_check_timeout_override_test.go b/actor/v7pushaction/handle_health_check_timeout_override_test.go index 6292c4897d3..18fe4c52eaa 100644 --- a/actor/v7pushaction/handle_health_check_timeout_override_test.go +++ b/actor/v7pushaction/handle_health_check_timeout_override_test.go @@ -6,7 +6,7 @@ import ( . "code.cloudfoundry.org/cli/actor/v7pushaction" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7pushaction/handle_health_check_type_override_test.go b/actor/v7pushaction/handle_health_check_type_override_test.go index 03a353e83fc..695f06b6f86 100644 --- a/actor/v7pushaction/handle_health_check_type_override_test.go +++ b/actor/v7pushaction/handle_health_check_type_override_test.go @@ -7,7 +7,7 @@ import ( . "code.cloudfoundry.org/cli/actor/v7pushaction" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7pushaction/handle_instances_override_test.go b/actor/v7pushaction/handle_instances_override_test.go index b036eddc2f3..4b662ce7cfe 100644 --- a/actor/v7pushaction/handle_instances_override_test.go +++ b/actor/v7pushaction/handle_instances_override_test.go @@ -7,7 +7,7 @@ import ( . "code.cloudfoundry.org/cli/actor/v7pushaction" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7pushaction/handle_log_rate_limit_override_test.go b/actor/v7pushaction/handle_log_rate_limit_override_test.go index 877b1f7d07a..f261703e514 100644 --- a/actor/v7pushaction/handle_log_rate_limit_override_test.go +++ b/actor/v7pushaction/handle_log_rate_limit_override_test.go @@ -6,7 +6,7 @@ import ( . "code.cloudfoundry.org/cli/actor/v7pushaction" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7pushaction/handle_memory_override_test.go b/actor/v7pushaction/handle_memory_override_test.go index ff1c7c3e2e1..d301981543c 100644 --- a/actor/v7pushaction/handle_memory_override_test.go +++ b/actor/v7pushaction/handle_memory_override_test.go @@ -6,7 +6,7 @@ import ( . "code.cloudfoundry.org/cli/actor/v7pushaction" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7pushaction/handle_no_route_override_test.go b/actor/v7pushaction/handle_no_route_override_test.go index 385c0469c88..36b547901c0 100644 --- a/actor/v7pushaction/handle_no_route_override_test.go +++ b/actor/v7pushaction/handle_no_route_override_test.go @@ -6,7 +6,7 @@ import ( . "code.cloudfoundry.org/cli/actor/v7pushaction" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7pushaction/handle_random_route_override_test.go b/actor/v7pushaction/handle_random_route_override_test.go index 30ccd9fbd21..566ee226f9a 100644 --- a/actor/v7pushaction/handle_random_route_override_test.go +++ b/actor/v7pushaction/handle_random_route_override_test.go @@ -6,7 +6,7 @@ import ( . "code.cloudfoundry.org/cli/actor/v7pushaction" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7pushaction/handle_stack_override_test.go b/actor/v7pushaction/handle_stack_override_test.go index ed79874f66c..8d7ebb32f93 100644 --- a/actor/v7pushaction/handle_stack_override_test.go +++ b/actor/v7pushaction/handle_stack_override_test.go @@ -6,7 +6,7 @@ import ( . "code.cloudfoundry.org/cli/actor/v7pushaction" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7pushaction/handle_start_command_override_test.go b/actor/v7pushaction/handle_start_command_override_test.go index 577efc58242..93df0fa065c 100644 --- a/actor/v7pushaction/handle_start_command_override_test.go +++ b/actor/v7pushaction/handle_start_command_override_test.go @@ -7,7 +7,7 @@ import ( . "code.cloudfoundry.org/cli/actor/v7pushaction" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7pushaction/handle_strategy_override_test.go b/actor/v7pushaction/handle_strategy_override_test.go index 57bb0fe6ad4..476636d234c 100644 --- a/actor/v7pushaction/handle_strategy_override_test.go +++ b/actor/v7pushaction/handle_strategy_override_test.go @@ -5,7 +5,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" "code.cloudfoundry.org/cli/command/translatableerror" "code.cloudfoundry.org/cli/util/manifestparser" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7pushaction/handle_task_override_test.go b/actor/v7pushaction/handle_task_override_test.go index 7848d9334f2..88700852f05 100644 --- a/actor/v7pushaction/handle_task_override_test.go +++ b/actor/v7pushaction/handle_task_override_test.go @@ -6,7 +6,7 @@ import ( . "code.cloudfoundry.org/cli/actor/v7pushaction" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7pushaction/resource_match_test.go b/actor/v7pushaction/resource_match_test.go index 9471a83578a..e35c7618298 100644 --- a/actor/v7pushaction/resource_match_test.go +++ b/actor/v7pushaction/resource_match_test.go @@ -8,7 +8,7 @@ import ( . "code.cloudfoundry.org/cli/actor/v7pushaction" "code.cloudfoundry.org/cli/actor/v7pushaction/v7pushactionfakes" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7pushaction/restart_application_test.go b/actor/v7pushaction/restart_application_test.go index 33c1fee4c0d..217ebbbc324 100644 --- a/actor/v7pushaction/restart_application_test.go +++ b/actor/v7pushaction/restart_application_test.go @@ -8,7 +8,7 @@ import ( "code.cloudfoundry.org/cli/actor/v7pushaction/v7pushactionfakes" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7pushaction/sequence_test.go b/actor/v7pushaction/sequence_test.go index 0acfffd35df..158725f66c5 100644 --- a/actor/v7pushaction/sequence_test.go +++ b/actor/v7pushaction/sequence_test.go @@ -6,7 +6,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7pushaction/set_default_bits_path_for_push_plan_test.go b/actor/v7pushaction/set_default_bits_path_for_push_plan_test.go index d5db9e80885..03ca77503c1 100644 --- a/actor/v7pushaction/set_default_bits_path_for_push_plan_test.go +++ b/actor/v7pushaction/set_default_bits_path_for_push_plan_test.go @@ -3,7 +3,7 @@ package v7pushaction_test import ( "code.cloudfoundry.org/cli/actor/v7action" . "code.cloudfoundry.org/cli/actor/v7pushaction" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7pushaction/set_droplet_for_application_test.go b/actor/v7pushaction/set_droplet_for_application_test.go index f28e9be8428..9b543b34cb8 100644 --- a/actor/v7pushaction/set_droplet_for_application_test.go +++ b/actor/v7pushaction/set_droplet_for_application_test.go @@ -7,7 +7,7 @@ import ( . "code.cloudfoundry.org/cli/actor/v7pushaction" "code.cloudfoundry.org/cli/actor/v7pushaction/v7pushactionfakes" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7pushaction/setup_all_resources_for_push_plan_test.go b/actor/v7pushaction/setup_all_resources_for_push_plan_test.go index 628f2ff82d0..6ad8efaf5cf 100644 --- a/actor/v7pushaction/setup_all_resources_for_push_plan_test.go +++ b/actor/v7pushaction/setup_all_resources_for_push_plan_test.go @@ -11,7 +11,7 @@ import ( . "code.cloudfoundry.org/cli/actor/v7pushaction" "code.cloudfoundry.org/cli/actor/v7pushaction/v7pushactionfakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7pushaction/setup_deployment_strategy_for_push_plan_test.go b/actor/v7pushaction/setup_deployment_strategy_for_push_plan_test.go index 238dc007729..5d0d8df0aba 100644 --- a/actor/v7pushaction/setup_deployment_strategy_for_push_plan_test.go +++ b/actor/v7pushaction/setup_deployment_strategy_for_push_plan_test.go @@ -5,7 +5,7 @@ import ( . "code.cloudfoundry.org/cli/actor/v7pushaction" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7pushaction/setup_droplet_path_for_push_plan_test.go b/actor/v7pushaction/setup_droplet_path_for_push_plan_test.go index d2866b08247..f06eeb6d76c 100644 --- a/actor/v7pushaction/setup_droplet_path_for_push_plan_test.go +++ b/actor/v7pushaction/setup_droplet_path_for_push_plan_test.go @@ -3,7 +3,7 @@ package v7pushaction_test import ( . "code.cloudfoundry.org/cli/actor/v7pushaction" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7pushaction/setup_no_start_for_push_plan_test.go b/actor/v7pushaction/setup_no_start_for_push_plan_test.go index 19902e9aa10..fa24192cc6d 100644 --- a/actor/v7pushaction/setup_no_start_for_push_plan_test.go +++ b/actor/v7pushaction/setup_no_start_for_push_plan_test.go @@ -3,7 +3,7 @@ package v7pushaction_test import ( . "code.cloudfoundry.org/cli/actor/v7pushaction" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7pushaction/setup_no_wait_for_push_plan_test.go b/actor/v7pushaction/setup_no_wait_for_push_plan_test.go index e0f5b3ad62c..3e89800bb1c 100644 --- a/actor/v7pushaction/setup_no_wait_for_push_plan_test.go +++ b/actor/v7pushaction/setup_no_wait_for_push_plan_test.go @@ -3,7 +3,7 @@ package v7pushaction_test import ( . "code.cloudfoundry.org/cli/actor/v7pushaction" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7pushaction/setup_task_app_for_push_plan_test.go b/actor/v7pushaction/setup_task_app_for_push_plan_test.go index 988a206c13a..17a1bd3ab69 100644 --- a/actor/v7pushaction/setup_task_app_for_push_plan_test.go +++ b/actor/v7pushaction/setup_task_app_for_push_plan_test.go @@ -3,7 +3,7 @@ package v7pushaction_test import ( . "code.cloudfoundry.org/cli/actor/v7pushaction" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7pushaction/stage_package_for_application_test.go b/actor/v7pushaction/stage_package_for_application_test.go index b0a5154380c..cfe6a90051e 100644 --- a/actor/v7pushaction/stage_package_for_application_test.go +++ b/actor/v7pushaction/stage_package_for_application_test.go @@ -7,7 +7,7 @@ import ( . "code.cloudfoundry.org/cli/actor/v7pushaction" "code.cloudfoundry.org/cli/actor/v7pushaction/v7pushactionfakes" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7pushaction/stop_application_test.go b/actor/v7pushaction/stop_application_test.go index e380b43d9dd..04287023c20 100644 --- a/actor/v7pushaction/stop_application_test.go +++ b/actor/v7pushaction/stop_application_test.go @@ -8,7 +8,7 @@ import ( "code.cloudfoundry.org/cli/actor/v7pushaction/v7pushactionfakes" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/v7pushaction/v7pushaction_suite_test.go b/actor/v7pushaction/v7pushaction_suite_test.go index 8a41f84bf3a..9d503fc13d7 100644 --- a/actor/v7pushaction/v7pushaction_suite_test.go +++ b/actor/v7pushaction/v7pushaction_suite_test.go @@ -8,7 +8,7 @@ import ( . "code.cloudfoundry.org/cli/actor/v7pushaction" "code.cloudfoundry.org/cli/actor/v7pushaction/v7pushactionfakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" log "github.com/sirupsen/logrus" diff --git a/actor/versioncheck/minimum_version_check_test.go b/actor/versioncheck/minimum_version_check_test.go index f2a3a8f0bc6..89015dbe129 100644 --- a/actor/versioncheck/minimum_version_check_test.go +++ b/actor/versioncheck/minimum_version_check_test.go @@ -3,7 +3,7 @@ package versioncheck_test import ( . "code.cloudfoundry.org/cli/actor/versioncheck" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/actor/versioncheck/versioncheck_suite_test.go b/actor/versioncheck/versioncheck_suite_test.go index 87e59420d36..d85639d4fff 100644 --- a/actor/versioncheck/versioncheck_suite_test.go +++ b/actor/versioncheck/versioncheck_suite_test.go @@ -3,7 +3,7 @@ package versioncheck_test import ( "testing" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/api/cloudcontroller/ccerror/ccerror_suite_test.go b/api/cloudcontroller/ccerror/ccerror_suite_test.go index 83106177c66..797f0f70c42 100644 --- a/api/cloudcontroller/ccerror/ccerror_suite_test.go +++ b/api/cloudcontroller/ccerror/ccerror_suite_test.go @@ -1,7 +1,7 @@ package ccerror_test import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/api/cloudcontroller/ccerror/multi_error_test.go b/api/cloudcontroller/ccerror/multi_error_test.go index 3f47bff273d..8b78993bda4 100644 --- a/api/cloudcontroller/ccerror/multi_error_test.go +++ b/api/cloudcontroller/ccerror/multi_error_test.go @@ -5,7 +5,7 @@ import ( . "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/api/cloudcontroller/ccerror/service_offering_name_ambiguity_error_test.go b/api/cloudcontroller/ccerror/service_offering_name_ambiguity_error_test.go index bba9e873428..1bcfe10cc7a 100644 --- a/api/cloudcontroller/ccerror/service_offering_name_ambiguity_error_test.go +++ b/api/cloudcontroller/ccerror/service_offering_name_ambiguity_error_test.go @@ -2,7 +2,7 @@ package ccerror_test import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/api/cloudcontroller/ccerror/service_offering_not_found_error_test.go b/api/cloudcontroller/ccerror/service_offering_not_found_error_test.go index d6364d723f8..161c2c0bf9e 100644 --- a/api/cloudcontroller/ccerror/service_offering_not_found_error_test.go +++ b/api/cloudcontroller/ccerror/service_offering_not_found_error_test.go @@ -2,7 +2,7 @@ package ccerror_test import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/api/cloudcontroller/ccerror/v2_unexpected_response_error_test.go b/api/cloudcontroller/ccerror/v2_unexpected_response_error_test.go index afdaab8fef8..024d896fe13 100644 --- a/api/cloudcontroller/ccerror/v2_unexpected_response_error_test.go +++ b/api/cloudcontroller/ccerror/v2_unexpected_response_error_test.go @@ -3,7 +3,7 @@ package ccerror_test import ( . "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/api/cloudcontroller/ccerror/v3_unexpected_response_error_test.go b/api/cloudcontroller/ccerror/v3_unexpected_response_error_test.go index a5c8811693e..0a265e85f33 100644 --- a/api/cloudcontroller/ccerror/v3_unexpected_response_error_test.go +++ b/api/cloudcontroller/ccerror/v3_unexpected_response_error_test.go @@ -5,7 +5,7 @@ import ( . "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/api/cloudcontroller/ccv3/application_feature_test.go b/api/cloudcontroller/ccv3/application_feature_test.go index e60d2192322..2b0567169ec 100644 --- a/api/cloudcontroller/ccv3/application_feature_test.go +++ b/api/cloudcontroller/ccv3/application_feature_test.go @@ -7,7 +7,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" . "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/cloudcontroller/ccv3/application_test.go b/api/cloudcontroller/ccv3/application_test.go index 9ffd2f21415..467c8548722 100644 --- a/api/cloudcontroller/ccv3/application_test.go +++ b/api/cloudcontroller/ccv3/application_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal" "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/types" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/api/cloudcontroller/ccv3/build_test.go b/api/cloudcontroller/ccv3/build_test.go index 2a2236c5ff3..c1f9cd0a70d 100644 --- a/api/cloudcontroller/ccv3/build_test.go +++ b/api/cloudcontroller/ccv3/build_test.go @@ -7,7 +7,7 @@ import ( . "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/cloudcontroller/ccv3/buildpack_test.go b/api/cloudcontroller/ccv3/buildpack_test.go index 5445d359413..11ffa9645f0 100644 --- a/api/cloudcontroller/ccv3/buildpack_test.go +++ b/api/cloudcontroller/ccv3/buildpack_test.go @@ -19,7 +19,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" . "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" . "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/cloudcontroller/ccv3/ccv3_suite_test.go b/api/cloudcontroller/ccv3/ccv3_suite_test.go index c311fc4f311..c6db76ee3cd 100644 --- a/api/cloudcontroller/ccv3/ccv3_suite_test.go +++ b/api/cloudcontroller/ccv3/ccv3_suite_test.go @@ -7,7 +7,7 @@ import ( . "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/ccv3fakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/cloudcontroller/ccv3/client_test.go b/api/cloudcontroller/ccv3/client_test.go index 9cfaaa197dc..116faa9accb 100644 --- a/api/cloudcontroller/ccv3/client_test.go +++ b/api/cloudcontroller/ccv3/client_test.go @@ -8,7 +8,7 @@ import ( . "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/ccv3fakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/cloudcontroller/ccv3/deployment_test.go b/api/cloudcontroller/ccv3/deployment_test.go index 4c4e6c162d4..56f336b1437 100644 --- a/api/cloudcontroller/ccv3/deployment_test.go +++ b/api/cloudcontroller/ccv3/deployment_test.go @@ -9,7 +9,7 @@ import ( "code.cloudfoundry.org/cli/resources" . "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/cloudcontroller/ccv3/domain_test.go b/api/cloudcontroller/ccv3/domain_test.go index 29bf6e6397f..df3dbf5b599 100644 --- a/api/cloudcontroller/ccv3/domain_test.go +++ b/api/cloudcontroller/ccv3/domain_test.go @@ -9,7 +9,7 @@ import ( "code.cloudfoundry.org/cli/types" . "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/cloudcontroller/ccv3/droplet_test.go b/api/cloudcontroller/ccv3/droplet_test.go index 6c4ce7bd634..6a693d6d3fd 100644 --- a/api/cloudcontroller/ccv3/droplet_test.go +++ b/api/cloudcontroller/ccv3/droplet_test.go @@ -17,7 +17,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal" "code.cloudfoundry.org/cli/api/cloudcontroller/wrapper" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/cloudcontroller/ccv3/environment_test.go b/api/cloudcontroller/ccv3/environment_test.go index d4bfcf9dfaf..14b8462218d 100644 --- a/api/cloudcontroller/ccv3/environment_test.go +++ b/api/cloudcontroller/ccv3/environment_test.go @@ -5,7 +5,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" . "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/cloudcontroller/ccv3/environment_variables_test.go b/api/cloudcontroller/ccv3/environment_variables_test.go index 4735e641eb0..f2ce0794bd5 100644 --- a/api/cloudcontroller/ccv3/environment_variables_test.go +++ b/api/cloudcontroller/ccv3/environment_variables_test.go @@ -7,7 +7,7 @@ import ( . "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/cloudcontroller/ccv3/errors_test.go b/api/cloudcontroller/ccv3/errors_test.go index 6873746014c..b673ab35370 100644 --- a/api/cloudcontroller/ccv3/errors_test.go +++ b/api/cloudcontroller/ccv3/errors_test.go @@ -6,7 +6,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" . "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/cloudcontroller/ccv3/event_test.go b/api/cloudcontroller/ccv3/event_test.go index a3f1c834292..542a60fd4cd 100644 --- a/api/cloudcontroller/ccv3/event_test.go +++ b/api/cloudcontroller/ccv3/event_test.go @@ -8,7 +8,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" . "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/cloudcontroller/ccv3/feature_flag_test.go b/api/cloudcontroller/ccv3/feature_flag_test.go index a8c8aa1d113..ceeb15cf222 100644 --- a/api/cloudcontroller/ccv3/feature_flag_test.go +++ b/api/cloudcontroller/ccv3/feature_flag_test.go @@ -7,7 +7,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" . "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/cloudcontroller/ccv3/info_test.go b/api/cloudcontroller/ccv3/info_test.go index 8f77db3ba96..542909b391b 100644 --- a/api/cloudcontroller/ccv3/info_test.go +++ b/api/cloudcontroller/ccv3/info_test.go @@ -8,7 +8,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" . "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/cloudcontroller/ccv3/internal/internal_suite_test.go b/api/cloudcontroller/ccv3/internal/internal_suite_test.go index 7f6b68763e8..a43364c4c30 100644 --- a/api/cloudcontroller/ccv3/internal/internal_suite_test.go +++ b/api/cloudcontroller/ccv3/internal/internal_suite_test.go @@ -1,7 +1,7 @@ package internal_test import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/api/cloudcontroller/ccv3/internal/routing_test.go b/api/cloudcontroller/ccv3/internal/routing_test.go index 09e71f426d7..59b52b3f74a 100644 --- a/api/cloudcontroller/ccv3/internal/routing_test.go +++ b/api/cloudcontroller/ccv3/internal/routing_test.go @@ -5,7 +5,7 @@ import ( . "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/api/cloudcontroller/ccv3/isolation_segment_test.go b/api/cloudcontroller/ccv3/isolation_segment_test.go index 79026d78689..a52e3d1344c 100644 --- a/api/cloudcontroller/ccv3/isolation_segment_test.go +++ b/api/cloudcontroller/ccv3/isolation_segment_test.go @@ -7,7 +7,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" . "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/cloudcontroller/ccv3/job_test.go b/api/cloudcontroller/ccv3/job_test.go index f5d7b991626..d4bacafa8ab 100644 --- a/api/cloudcontroller/ccv3/job_test.go +++ b/api/cloudcontroller/ccv3/job_test.go @@ -9,8 +9,8 @@ import ( . "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/ccv3fakes" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/cloudcontroller/ccv3/job_url_test.go b/api/cloudcontroller/ccv3/job_url_test.go index e9fd42e3fd4..3c6d3bd6219 100644 --- a/api/cloudcontroller/ccv3/job_url_test.go +++ b/api/cloudcontroller/ccv3/job_url_test.go @@ -5,7 +5,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" . "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/cloudcontroller/ccv3/manifest_test.go b/api/cloudcontroller/ccv3/manifest_test.go index 495b57a43e6..4038a805562 100644 --- a/api/cloudcontroller/ccv3/manifest_test.go +++ b/api/cloudcontroller/ccv3/manifest_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal" "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/api/cloudcontroller/ccv3/metadata_test.go b/api/cloudcontroller/ccv3/metadata_test.go index b9302e0af59..763ec58bb52 100644 --- a/api/cloudcontroller/ccv3/metadata_test.go +++ b/api/cloudcontroller/ccv3/metadata_test.go @@ -9,7 +9,7 @@ import ( . "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" . "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/types" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/cloudcontroller/ccv3/organization_quota_test.go b/api/cloudcontroller/ccv3/organization_quota_test.go index 46460826eec..a8b810fae95 100644 --- a/api/cloudcontroller/ccv3/organization_quota_test.go +++ b/api/cloudcontroller/ccv3/organization_quota_test.go @@ -8,7 +8,7 @@ import ( . "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/types" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/cloudcontroller/ccv3/organization_test.go b/api/cloudcontroller/ccv3/organization_test.go index 20023cfe5c0..14f8148cb7e 100644 --- a/api/cloudcontroller/ccv3/organization_test.go +++ b/api/cloudcontroller/ccv3/organization_test.go @@ -9,7 +9,7 @@ import ( "code.cloudfoundry.org/cli/resources" . "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/types" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/cloudcontroller/ccv3/package_test.go b/api/cloudcontroller/ccv3/package_test.go index ab1d7797765..2ef64f230c0 100644 --- a/api/cloudcontroller/ccv3/package_test.go +++ b/api/cloudcontroller/ccv3/package_test.go @@ -19,7 +19,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" "code.cloudfoundry.org/cli/api/cloudcontroller/wrapper" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/ghttp" diff --git a/api/cloudcontroller/ccv3/paginated_resources_test.go b/api/cloudcontroller/ccv3/paginated_resources_test.go index 79088eb95d2..debe0ad1626 100644 --- a/api/cloudcontroller/ccv3/paginated_resources_test.go +++ b/api/cloudcontroller/ccv3/paginated_resources_test.go @@ -7,7 +7,7 @@ import ( . "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/resources" . "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/api/cloudcontroller/ccv3/process_instance_test.go b/api/cloudcontroller/ccv3/process_instance_test.go index 2280a979348..1499952f11d 100644 --- a/api/cloudcontroller/ccv3/process_instance_test.go +++ b/api/cloudcontroller/ccv3/process_instance_test.go @@ -7,7 +7,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" . "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/cloudcontroller/ccv3/process_test.go b/api/cloudcontroller/ccv3/process_test.go index 62eb3af85b6..fc584e4f372 100644 --- a/api/cloudcontroller/ccv3/process_test.go +++ b/api/cloudcontroller/ccv3/process_test.go @@ -9,7 +9,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/types" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" . "github.com/onsi/gomega/gstruct" diff --git a/api/cloudcontroller/ccv3/query_test.go b/api/cloudcontroller/ccv3/query_test.go index 35e1928bffa..e614d4c8195 100644 --- a/api/cloudcontroller/ccv3/query_test.go +++ b/api/cloudcontroller/ccv3/query_test.go @@ -4,7 +4,7 @@ import ( "net/url" . "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/api/cloudcontroller/ccv3/relationship_list_test.go b/api/cloudcontroller/ccv3/relationship_list_test.go index 4d3bfb0eec8..06fbfc4c4fb 100644 --- a/api/cloudcontroller/ccv3/relationship_list_test.go +++ b/api/cloudcontroller/ccv3/relationship_list_test.go @@ -6,7 +6,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" . "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/cloudcontroller/ccv3/relationship_test.go b/api/cloudcontroller/ccv3/relationship_test.go index a5e00a8d9a7..88fcd4e3de1 100644 --- a/api/cloudcontroller/ccv3/relationship_test.go +++ b/api/cloudcontroller/ccv3/relationship_test.go @@ -7,7 +7,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" . "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/cloudcontroller/ccv3/requester_test.go b/api/cloudcontroller/ccv3/requester_test.go index 5ba0f8db4e3..9eb78324da7 100644 --- a/api/cloudcontroller/ccv3/requester_test.go +++ b/api/cloudcontroller/ccv3/requester_test.go @@ -15,7 +15,7 @@ import ( "code.cloudfoundry.org/cli/resources" . "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/types" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/cloudcontroller/ccv3/resource_test.go b/api/cloudcontroller/ccv3/resource_test.go index d1044017723..0b47d31fb0a 100644 --- a/api/cloudcontroller/ccv3/resource_test.go +++ b/api/cloudcontroller/ccv3/resource_test.go @@ -7,7 +7,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" . "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/cloudcontroller/ccv3/revisions_test.go b/api/cloudcontroller/ccv3/revisions_test.go index 34f6b01b53b..fe3ac699ea2 100644 --- a/api/cloudcontroller/ccv3/revisions_test.go +++ b/api/cloudcontroller/ccv3/revisions_test.go @@ -8,7 +8,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/ccv3fakes" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/api/cloudcontroller/ccv3/role_test.go b/api/cloudcontroller/ccv3/role_test.go index befcb7fcf71..50a226da1b8 100644 --- a/api/cloudcontroller/ccv3/role_test.go +++ b/api/cloudcontroller/ccv3/role_test.go @@ -8,7 +8,7 @@ import ( . "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/cloudcontroller/ccv3/route_binding_test.go b/api/cloudcontroller/ccv3/route_binding_test.go index 453159d630b..3b564c9fc07 100644 --- a/api/cloudcontroller/ccv3/route_binding_test.go +++ b/api/cloudcontroller/ccv3/route_binding_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/ccv3fakes" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/api/cloudcontroller/ccv3/route_test.go b/api/cloudcontroller/ccv3/route_test.go index 3e6f5e9a0da..c1597c71db9 100644 --- a/api/cloudcontroller/ccv3/route_test.go +++ b/api/cloudcontroller/ccv3/route_test.go @@ -8,7 +8,7 @@ import ( . "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/types" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/cloudcontroller/ccv3/security_group_test.go b/api/cloudcontroller/ccv3/security_group_test.go index 7a52af4047b..b2a1e915aea 100644 --- a/api/cloudcontroller/ccv3/security_group_test.go +++ b/api/cloudcontroller/ccv3/security_group_test.go @@ -9,7 +9,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/api/cloudcontroller/ccv3/service_broker_test.go b/api/cloudcontroller/ccv3/service_broker_test.go index dcfd66ac329..ab4ea030bdd 100644 --- a/api/cloudcontroller/ccv3/service_broker_test.go +++ b/api/cloudcontroller/ccv3/service_broker_test.go @@ -8,7 +8,7 @@ import ( . "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/types" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/cloudcontroller/ccv3/service_credential_binding_test.go b/api/cloudcontroller/ccv3/service_credential_binding_test.go index 7ae420745bd..5f3e2fe2136 100644 --- a/api/cloudcontroller/ccv3/service_credential_binding_test.go +++ b/api/cloudcontroller/ccv3/service_credential_binding_test.go @@ -12,7 +12,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal" "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/types" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/api/cloudcontroller/ccv3/service_instance_test.go b/api/cloudcontroller/ccv3/service_instance_test.go index 108b4eff3d0..0f61658f69c 100644 --- a/api/cloudcontroller/ccv3/service_instance_test.go +++ b/api/cloudcontroller/ccv3/service_instance_test.go @@ -13,7 +13,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/types" "code.cloudfoundry.org/jsonry" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/api/cloudcontroller/ccv3/service_offering_test.go b/api/cloudcontroller/ccv3/service_offering_test.go index ccd0063fdd0..03383e390f5 100644 --- a/api/cloudcontroller/ccv3/service_offering_test.go +++ b/api/cloudcontroller/ccv3/service_offering_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/ccv3fakes" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" . "github.com/onsi/gomega/gstruct" diff --git a/api/cloudcontroller/ccv3/service_plan_test.go b/api/cloudcontroller/ccv3/service_plan_test.go index 60f8610706b..492e9f35bba 100644 --- a/api/cloudcontroller/ccv3/service_plan_test.go +++ b/api/cloudcontroller/ccv3/service_plan_test.go @@ -9,7 +9,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/ccv3fakes" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/internal" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/cloudcontroller/ccv3/service_plan_visibility_test.go b/api/cloudcontroller/ccv3/service_plan_visibility_test.go index 078ed20a2c5..d5d0c7a136d 100644 --- a/api/cloudcontroller/ccv3/service_plan_visibility_test.go +++ b/api/cloudcontroller/ccv3/service_plan_visibility_test.go @@ -7,8 +7,8 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" . "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/cloudcontroller/ccv3/sidecar_test.go b/api/cloudcontroller/ccv3/sidecar_test.go index 6a963ed4cd7..744bb8db77e 100644 --- a/api/cloudcontroller/ccv3/sidecar_test.go +++ b/api/cloudcontroller/ccv3/sidecar_test.go @@ -7,7 +7,7 @@ import ( . "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/types" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" . "github.com/onsi/gomega/gstruct" diff --git a/api/cloudcontroller/ccv3/space_feature_test.go b/api/cloudcontroller/ccv3/space_feature_test.go index 45e97d398fd..d3aea454d72 100644 --- a/api/cloudcontroller/ccv3/space_feature_test.go +++ b/api/cloudcontroller/ccv3/space_feature_test.go @@ -6,7 +6,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" . "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/cloudcontroller/ccv3/space_quota_test.go b/api/cloudcontroller/ccv3/space_quota_test.go index 21069e1cf2f..64d3cb9e312 100644 --- a/api/cloudcontroller/ccv3/space_quota_test.go +++ b/api/cloudcontroller/ccv3/space_quota_test.go @@ -8,7 +8,7 @@ import ( . "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/types" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/cloudcontroller/ccv3/space_test.go b/api/cloudcontroller/ccv3/space_test.go index c8e5ca29f66..11b247018d0 100644 --- a/api/cloudcontroller/ccv3/space_test.go +++ b/api/cloudcontroller/ccv3/space_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/resources" . "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/types" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/cloudcontroller/ccv3/stack_test.go b/api/cloudcontroller/ccv3/stack_test.go index 7dc60174cb2..8ad2225db6e 100644 --- a/api/cloudcontroller/ccv3/stack_test.go +++ b/api/cloudcontroller/ccv3/stack_test.go @@ -7,7 +7,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" . "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/cloudcontroller/ccv3/target_test.go b/api/cloudcontroller/ccv3/target_test.go index 35c1d8dd9a4..f7be61b25a2 100644 --- a/api/cloudcontroller/ccv3/target_test.go +++ b/api/cloudcontroller/ccv3/target_test.go @@ -8,7 +8,7 @@ import ( . "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/ccv3fakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/cloudcontroller/ccv3/task_test.go b/api/cloudcontroller/ccv3/task_test.go index e820eae19ed..c45c4d4b7a3 100644 --- a/api/cloudcontroller/ccv3/task_test.go +++ b/api/cloudcontroller/ccv3/task_test.go @@ -8,7 +8,7 @@ import ( . "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/cloudcontroller/ccv3/user_test.go b/api/cloudcontroller/ccv3/user_test.go index 19637ae5b8e..2b42fb39251 100644 --- a/api/cloudcontroller/ccv3/user_test.go +++ b/api/cloudcontroller/ccv3/user_test.go @@ -7,7 +7,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" . "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/cloudcontroller/ccv3/v2_formatted_resource_test.go b/api/cloudcontroller/ccv3/v2_formatted_resource_test.go index 8a5b605c697..6f4083b5041 100644 --- a/api/cloudcontroller/ccv3/v2_formatted_resource_test.go +++ b/api/cloudcontroller/ccv3/v2_formatted_resource_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" . "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/api/cloudcontroller/cloud_controller_connection_test.go b/api/cloudcontroller/cloud_controller_connection_test.go index 747d6ff71f9..b32124f5ce7 100644 --- a/api/cloudcontroller/cloud_controller_connection_test.go +++ b/api/cloudcontroller/cloud_controller_connection_test.go @@ -8,7 +8,7 @@ import ( . "code.cloudfoundry.org/cli/api/cloudcontroller" "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/cloudcontroller/cloudcontroller_suite_test.go b/api/cloudcontroller/cloudcontroller_suite_test.go index e3e4b4577c6..ce6355befaa 100644 --- a/api/cloudcontroller/cloudcontroller_suite_test.go +++ b/api/cloudcontroller/cloudcontroller_suite_test.go @@ -4,7 +4,7 @@ import ( "bytes" "log" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" diff --git a/api/cloudcontroller/wrapper/kubernetes_authentication_test.go b/api/cloudcontroller/wrapper/kubernetes_authentication_test.go index 6bca8eaa5ae..0f94ebbb8df 100644 --- a/api/cloudcontroller/wrapper/kubernetes_authentication_test.go +++ b/api/cloudcontroller/wrapper/kubernetes_authentication_test.go @@ -20,7 +20,7 @@ import ( "github.com/SermoDigital/jose/crypto" "github.com/SermoDigital/jose/jws" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" clientauthenticationv1beta1 "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1" diff --git a/api/cloudcontroller/wrapper/request_logger_test.go b/api/cloudcontroller/wrapper/request_logger_test.go index 920d72716f2..93d64c7bd34 100644 --- a/api/cloudcontroller/wrapper/request_logger_test.go +++ b/api/cloudcontroller/wrapper/request_logger_test.go @@ -13,7 +13,7 @@ import ( . "code.cloudfoundry.org/cli/api/cloudcontroller/wrapper" "code.cloudfoundry.org/cli/api/cloudcontroller/wrapper/wrapperfakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/api/cloudcontroller/wrapper/retry_request_test.go b/api/cloudcontroller/wrapper/retry_request_test.go index 0fe277d490b..69e0a56d4e2 100644 --- a/api/cloudcontroller/wrapper/retry_request_test.go +++ b/api/cloudcontroller/wrapper/retry_request_test.go @@ -10,8 +10,8 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" "code.cloudfoundry.org/cli/api/cloudcontroller/cloudcontrollerfakes" . "code.cloudfoundry.org/cli/api/cloudcontroller/wrapper" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/api/cloudcontroller/wrapper/uaa_authentication_test.go b/api/cloudcontroller/wrapper/uaa_authentication_test.go index e6429356230..09d3980f9f6 100644 --- a/api/cloudcontroller/wrapper/uaa_authentication_test.go +++ b/api/cloudcontroller/wrapper/uaa_authentication_test.go @@ -20,7 +20,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/wrapper/wrapperfakes" "code.cloudfoundry.org/cli/api/uaa/wrapper/util" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/api/cloudcontroller/wrapper/wrapper_suite_test.go b/api/cloudcontroller/wrapper/wrapper_suite_test.go index ba828571f05..bb74362971a 100644 --- a/api/cloudcontroller/wrapper/wrapper_suite_test.go +++ b/api/cloudcontroller/wrapper/wrapper_suite_test.go @@ -7,7 +7,7 @@ import ( "log" "testing" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/plugin/client_test.go b/api/plugin/client_test.go index 8d7a37b1ab0..4a3275201ee 100644 --- a/api/plugin/client_test.go +++ b/api/plugin/client_test.go @@ -7,7 +7,7 @@ import ( . "code.cloudfoundry.org/cli/api/plugin" "code.cloudfoundry.org/cli/api/plugin/pluginfakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/plugin/download_plugin_test.go b/api/plugin/download_plugin_test.go index 9f53aea4bfe..be153b71561 100644 --- a/api/plugin/download_plugin_test.go +++ b/api/plugin/download_plugin_test.go @@ -10,7 +10,7 @@ import ( . "code.cloudfoundry.org/cli/api/plugin" "code.cloudfoundry.org/cli/api/plugin/pluginerror" "code.cloudfoundry.org/cli/api/plugin/pluginfakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/plugin/plugin_connection_test.go b/api/plugin/plugin_connection_test.go index 5e1a2fd12b6..f1bf9af3482 100644 --- a/api/plugin/plugin_connection_test.go +++ b/api/plugin/plugin_connection_test.go @@ -11,7 +11,7 @@ import ( . "code.cloudfoundry.org/cli/api/plugin" "code.cloudfoundry.org/cli/api/plugin/pluginerror" "code.cloudfoundry.org/cli/api/plugin/pluginfakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/plugin/plugin_repository_test.go b/api/plugin/plugin_repository_test.go index f0e187f14ca..d929b9a2a9d 100644 --- a/api/plugin/plugin_repository_test.go +++ b/api/plugin/plugin_repository_test.go @@ -7,7 +7,7 @@ import ( . "code.cloudfoundry.org/cli/api/plugin" "code.cloudfoundry.org/cli/api/plugin/pluginerror" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/plugin/plugin_suite_test.go b/api/plugin/plugin_suite_test.go index b514244a53a..e188e117a93 100644 --- a/api/plugin/plugin_suite_test.go +++ b/api/plugin/plugin_suite_test.go @@ -5,7 +5,7 @@ import ( "log" . "code.cloudfoundry.org/cli/api/plugin" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" diff --git a/api/plugin/wrapper/request_logger_test.go b/api/plugin/wrapper/request_logger_test.go index 377723ab538..1a7c4b75a11 100644 --- a/api/plugin/wrapper/request_logger_test.go +++ b/api/plugin/wrapper/request_logger_test.go @@ -14,7 +14,7 @@ import ( . "code.cloudfoundry.org/cli/api/plugin/wrapper" "code.cloudfoundry.org/cli/api/plugin/wrapper/wrapperfakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/api/plugin/wrapper/retry_request_test.go b/api/plugin/wrapper/retry_request_test.go index dcd97918f58..6598f2f2a85 100644 --- a/api/plugin/wrapper/retry_request_test.go +++ b/api/plugin/wrapper/retry_request_test.go @@ -10,8 +10,8 @@ import ( "code.cloudfoundry.org/cli/api/plugin/pluginerror" "code.cloudfoundry.org/cli/api/plugin/pluginfakes" . "code.cloudfoundry.org/cli/api/plugin/wrapper" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/api/plugin/wrapper/wrapper_suite_test.go b/api/plugin/wrapper/wrapper_suite_test.go index 9ff807b77f8..8e4a829554f 100644 --- a/api/plugin/wrapper/wrapper_suite_test.go +++ b/api/plugin/wrapper/wrapper_suite_test.go @@ -4,7 +4,7 @@ import ( "bytes" "log" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" diff --git a/api/router/router_group_test.go b/api/router/router_group_test.go index 78d60b4b910..461d183cf54 100644 --- a/api/router/router_group_test.go +++ b/api/router/router_group_test.go @@ -6,7 +6,7 @@ import ( . "code.cloudfoundry.org/cli/api/router" "code.cloudfoundry.org/cli/api/router/routererror" "code.cloudfoundry.org/cli/api/router/wrapper" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/router/router_suite_test.go b/api/router/router_suite_test.go index d059eb5813d..17ef20c2851 100644 --- a/api/router/router_suite_test.go +++ b/api/router/router_suite_test.go @@ -6,7 +6,7 @@ import ( "net/url" "code.cloudfoundry.org/cli/api/router" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" diff --git a/api/router/wrapper/error_wrapper_test.go b/api/router/wrapper/error_wrapper_test.go index de75d125ff0..e5b57115d18 100644 --- a/api/router/wrapper/error_wrapper_test.go +++ b/api/router/wrapper/error_wrapper_test.go @@ -7,7 +7,7 @@ import ( "code.cloudfoundry.org/cli/api/router/routererror" "code.cloudfoundry.org/cli/api/router/routerfakes" . "code.cloudfoundry.org/cli/api/router/wrapper" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/api/router/wrapper/request_logger_test.go b/api/router/wrapper/request_logger_test.go index 3f7394e6ee7..38327611e3f 100644 --- a/api/router/wrapper/request_logger_test.go +++ b/api/router/wrapper/request_logger_test.go @@ -13,7 +13,7 @@ import ( . "code.cloudfoundry.org/cli/api/router/wrapper" "code.cloudfoundry.org/cli/api/router/wrapper/wrapperfakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/api/router/wrapper/uaa_authentication_test.go b/api/router/wrapper/uaa_authentication_test.go index 86788c337df..fc15f3a5dbb 100644 --- a/api/router/wrapper/uaa_authentication_test.go +++ b/api/router/wrapper/uaa_authentication_test.go @@ -14,7 +14,7 @@ import ( "code.cloudfoundry.org/cli/api/uaa" "code.cloudfoundry.org/cli/api/uaa/wrapper/util" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/api/router/wrapper/wrapper_suite_test.go b/api/router/wrapper/wrapper_suite_test.go index a0aaff50b6b..ce086767016 100644 --- a/api/router/wrapper/wrapper_suite_test.go +++ b/api/router/wrapper/wrapper_suite_test.go @@ -3,7 +3,7 @@ package wrapper import ( "testing" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/api/shared/shared_suite_test.go b/api/shared/shared_suite_test.go index bc69c85df0f..2ae985574c0 100644 --- a/api/shared/shared_suite_test.go +++ b/api/shared/shared_suite_test.go @@ -5,7 +5,7 @@ import ( "crypto/rsa" "testing" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/api/shared/wrap_for_cf_on_k8s_test.go b/api/shared/wrap_for_cf_on_k8s_test.go index 26f17a856a7..1c8d8695aeb 100644 --- a/api/shared/wrap_for_cf_on_k8s_test.go +++ b/api/shared/wrap_for_cf_on_k8s_test.go @@ -23,7 +23,7 @@ import ( clientauthenticationv1beta1 "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1" "k8s.io/client-go/tools/clientcmd/api" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/api/uaa/auth_test.go b/api/uaa/auth_test.go index 4f47fd97b1e..b7002c3b79b 100644 --- a/api/uaa/auth_test.go +++ b/api/uaa/auth_test.go @@ -9,7 +9,7 @@ import ( . "code.cloudfoundry.org/cli/api/uaa" "code.cloudfoundry.org/cli/api/uaa/constant" "code.cloudfoundry.org/cli/api/uaa/uaafakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/uaa/client_test.go b/api/uaa/client_test.go index 4e664c61922..fa683776043 100644 --- a/api/uaa/client_test.go +++ b/api/uaa/client_test.go @@ -8,7 +8,7 @@ import ( . "code.cloudfoundry.org/cli/api/uaa" "code.cloudfoundry.org/cli/api/uaa/uaafakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/uaa/error_converter_test.go b/api/uaa/error_converter_test.go index 16ccaca085f..8d8a03432d9 100644 --- a/api/uaa/error_converter_test.go +++ b/api/uaa/error_converter_test.go @@ -5,7 +5,7 @@ import ( . "code.cloudfoundry.org/cli/api/uaa" "code.cloudfoundry.org/cli/api/uaa/uaafakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/api/uaa/info_test.go b/api/uaa/info_test.go index 4993b24a74c..2657447a38f 100644 --- a/api/uaa/info_test.go +++ b/api/uaa/info_test.go @@ -3,7 +3,7 @@ package uaa_test import ( . "code.cloudfoundry.org/cli/api/uaa" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/api/uaa/internal/internal_suite_test.go b/api/uaa/internal/internal_suite_test.go index f87ad622192..4c5515d385e 100644 --- a/api/uaa/internal/internal_suite_test.go +++ b/api/uaa/internal/internal_suite_test.go @@ -1,7 +1,7 @@ package internal_test import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/api/uaa/internal/routing_test.go b/api/uaa/internal/routing_test.go index ddad27b7d15..e808296c04a 100644 --- a/api/uaa/internal/routing_test.go +++ b/api/uaa/internal/routing_test.go @@ -5,7 +5,7 @@ import ( . "code.cloudfoundry.org/cli/api/uaa/internal" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/api/uaa/noaabridge/noaabridge_suite_test.go b/api/uaa/noaabridge/noaabridge_suite_test.go index f94004666a4..6fd6362d87c 100644 --- a/api/uaa/noaabridge/noaabridge_suite_test.go +++ b/api/uaa/noaabridge/noaabridge_suite_test.go @@ -1,7 +1,7 @@ package noaabridge_test import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/api/uaa/noaabridge/token_refresher_test.go b/api/uaa/noaabridge/token_refresher_test.go index cdcb00eb6a2..b7bdf5fcee2 100644 --- a/api/uaa/noaabridge/token_refresher_test.go +++ b/api/uaa/noaabridge/token_refresher_test.go @@ -6,7 +6,7 @@ import ( "code.cloudfoundry.org/cli/api/uaa" . "code.cloudfoundry.org/cli/api/uaa/noaabridge" "code.cloudfoundry.org/cli/api/uaa/noaabridge/noaabridgefakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/api/uaa/prompts_test.go b/api/uaa/prompts_test.go index a44478486b6..117a12586e6 100644 --- a/api/uaa/prompts_test.go +++ b/api/uaa/prompts_test.go @@ -7,7 +7,7 @@ import ( . "code.cloudfoundry.org/cli/api/uaa" "code.cloudfoundry.org/cli/api/uaa/uaafakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/uaa/refresh_token_test.go b/api/uaa/refresh_token_test.go index b648b22fa05..92359d38b37 100644 --- a/api/uaa/refresh_token_test.go +++ b/api/uaa/refresh_token_test.go @@ -8,7 +8,7 @@ import ( "code.cloudfoundry.org/cli/api/uaa/constant" "code.cloudfoundry.org/cli/api/uaa/uaafakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/uaa/resources_test.go b/api/uaa/resources_test.go index c1e6330e3a0..23543858ad1 100644 --- a/api/uaa/resources_test.go +++ b/api/uaa/resources_test.go @@ -3,7 +3,7 @@ package uaa_test import ( . "code.cloudfoundry.org/cli/api/uaa" "code.cloudfoundry.org/cli/api/uaa/uaafakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/api/uaa/ssh_test.go b/api/uaa/ssh_test.go index 2e81e9c2c3f..94ff8071092 100644 --- a/api/uaa/ssh_test.go +++ b/api/uaa/ssh_test.go @@ -6,7 +6,7 @@ import ( . "code.cloudfoundry.org/cli/api/uaa" "code.cloudfoundry.org/cli/api/uaa/uaafakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/uaa/uaa_connection_test.go b/api/uaa/uaa_connection_test.go index 129c72cc178..25009795a4f 100644 --- a/api/uaa/uaa_connection_test.go +++ b/api/uaa/uaa_connection_test.go @@ -6,7 +6,7 @@ import ( "runtime" . "code.cloudfoundry.org/cli/api/uaa" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/uaa/uaa_suite_test.go b/api/uaa/uaa_suite_test.go index b49b0b2e8bb..a8d48f49752 100644 --- a/api/uaa/uaa_suite_test.go +++ b/api/uaa/uaa_suite_test.go @@ -9,7 +9,7 @@ import ( . "code.cloudfoundry.org/cli/api/uaa" "code.cloudfoundry.org/cli/api/uaa/uaafakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/uaa/user_test.go b/api/uaa/user_test.go index 96ac8e4a6ab..e86ade3a0cc 100644 --- a/api/uaa/user_test.go +++ b/api/uaa/user_test.go @@ -6,7 +6,7 @@ import ( "code.cloudfoundry.org/cli/actor/actionerror" . "code.cloudfoundry.org/cli/api/uaa" "code.cloudfoundry.org/cli/api/uaa/uaafakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/uaa/version_test.go b/api/uaa/version_test.go index 246d19304c9..780bd814ca5 100644 --- a/api/uaa/version_test.go +++ b/api/uaa/version_test.go @@ -7,7 +7,7 @@ import ( . "code.cloudfoundry.org/cli/api/uaa" "code.cloudfoundry.org/cli/api/uaa/uaafakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" ) diff --git a/api/uaa/wrapper/request_logger_test.go b/api/uaa/wrapper/request_logger_test.go index 553349704fc..57ba35041bc 100644 --- a/api/uaa/wrapper/request_logger_test.go +++ b/api/uaa/wrapper/request_logger_test.go @@ -14,7 +14,7 @@ import ( . "code.cloudfoundry.org/cli/api/uaa/wrapper" "code.cloudfoundry.org/cli/api/uaa/wrapper/wrapperfakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/api/uaa/wrapper/retry_request_test.go b/api/uaa/wrapper/retry_request_test.go index 142dca860a9..f953f355c43 100644 --- a/api/uaa/wrapper/retry_request_test.go +++ b/api/uaa/wrapper/retry_request_test.go @@ -8,8 +8,8 @@ import ( "code.cloudfoundry.org/cli/api/uaa" "code.cloudfoundry.org/cli/api/uaa/uaafakes" . "code.cloudfoundry.org/cli/api/uaa/wrapper" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/api/uaa/wrapper/uaa_authentication_test.go b/api/uaa/wrapper/uaa_authentication_test.go index 63048f4d01e..6b3c3abe269 100644 --- a/api/uaa/wrapper/uaa_authentication_test.go +++ b/api/uaa/wrapper/uaa_authentication_test.go @@ -13,7 +13,7 @@ import ( . "code.cloudfoundry.org/cli/api/uaa/wrapper" "code.cloudfoundry.org/cli/api/uaa/wrapper/util" "code.cloudfoundry.org/cli/api/uaa/wrapper/wrapperfakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/api/uaa/wrapper/wrapper_suite_test.go b/api/uaa/wrapper/wrapper_suite_test.go index 808ebf747a0..b74befb120a 100644 --- a/api/uaa/wrapper/wrapper_suite_test.go +++ b/api/uaa/wrapper/wrapper_suite_test.go @@ -4,7 +4,7 @@ import ( "bytes" "log" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/ghttp" diff --git a/cf/actors/actors_suite_test.go b/cf/actors/actors_suite_test.go index ddedc64c6af..d40c9f87f64 100644 --- a/cf/actors/actors_suite_test.go +++ b/cf/actors/actors_suite_test.go @@ -3,7 +3,7 @@ package actors_test import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/actors/brokerbuilder/broker_builder_suite_test.go b/cf/actors/brokerbuilder/broker_builder_suite_test.go index c0bfffd9847..59afbdfa575 100644 --- a/cf/actors/brokerbuilder/broker_builder_suite_test.go +++ b/cf/actors/brokerbuilder/broker_builder_suite_test.go @@ -1,7 +1,7 @@ package brokerbuilder_test import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/actors/brokerbuilder/broker_builder_test.go b/cf/actors/brokerbuilder/broker_builder_test.go index 94590c76c43..8d009927325 100644 --- a/cf/actors/brokerbuilder/broker_builder_test.go +++ b/cf/actors/brokerbuilder/broker_builder_test.go @@ -9,7 +9,7 @@ import ( "code.cloudfoundry.org/cli/cf/actors/servicebuilder/servicebuilderfakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/actors/planbuilder/plan_builder_suite_test.go b/cf/actors/planbuilder/plan_builder_suite_test.go index f1f592be337..df13f1fd1f7 100644 --- a/cf/actors/planbuilder/plan_builder_suite_test.go +++ b/cf/actors/planbuilder/plan_builder_suite_test.go @@ -1,7 +1,7 @@ package planbuilder_test import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/actors/planbuilder/plan_builder_test.go b/cf/actors/planbuilder/plan_builder_test.go index bcb23d1e4cc..f49c1b6a1fa 100644 --- a/cf/actors/planbuilder/plan_builder_test.go +++ b/cf/actors/planbuilder/plan_builder_test.go @@ -7,7 +7,7 @@ import ( "code.cloudfoundry.org/cli/cf/api/apifakes" "code.cloudfoundry.org/cli/cf/api/organizations/organizationsfakes" "code.cloudfoundry.org/cli/cf/models" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/actors/pluginrepo/plugin_repo_suite_test.go b/cf/actors/pluginrepo/plugin_repo_suite_test.go index eb732390863..cbb56b8b877 100644 --- a/cf/actors/pluginrepo/plugin_repo_suite_test.go +++ b/cf/actors/pluginrepo/plugin_repo_suite_test.go @@ -3,7 +3,7 @@ package pluginrepo_test import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/actors/pluginrepo/plugin_repo_test.go b/cf/actors/pluginrepo/plugin_repo_test.go index 64883af1436..3247dd2800c 100644 --- a/cf/actors/pluginrepo/plugin_repo_test.go +++ b/cf/actors/pluginrepo/plugin_repo_test.go @@ -9,7 +9,7 @@ import ( "code.cloudfoundry.org/cli/cf/models" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/actors/push_test.go b/cf/actors/push_test.go index 33bd26b5961..205850e52cd 100644 --- a/cf/actors/push_test.go +++ b/cf/actors/push_test.go @@ -15,7 +15,7 @@ import ( "code.cloudfoundry.org/cli/cf/appfiles" "code.cloudfoundry.org/cli/cf/appfiles/appfilesfakes" "code.cloudfoundry.org/cli/cf/models" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/actors/routes_test.go b/cf/actors/routes_test.go index 2fbab050aa5..95176a5042e 100644 --- a/cf/actors/routes_test.go +++ b/cf/actors/routes_test.go @@ -9,7 +9,7 @@ import ( "code.cloudfoundry.org/cli/cf/errors/errorsfakes" "code.cloudfoundry.org/cli/cf/models" "code.cloudfoundry.org/cli/cf/terminal/terminalfakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/actors/servicebuilder/service_builder_suite_test.go b/cf/actors/servicebuilder/service_builder_suite_test.go index 185a9e94d48..d1adac89d61 100644 --- a/cf/actors/servicebuilder/service_builder_suite_test.go +++ b/cf/actors/servicebuilder/service_builder_suite_test.go @@ -1,7 +1,7 @@ package servicebuilder_test import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/actors/servicebuilder/service_builder_test.go b/cf/actors/servicebuilder/service_builder_test.go index 16b91c8f02b..380fcbb9b7d 100644 --- a/cf/actors/servicebuilder/service_builder_test.go +++ b/cf/actors/servicebuilder/service_builder_test.go @@ -9,7 +9,7 @@ import ( "code.cloudfoundry.org/cli/cf/models" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/actors/services_plans_test.go b/cf/actors/services_plans_test.go index 268494abd0e..ebd27048be2 100644 --- a/cf/actors/services_plans_test.go +++ b/cf/actors/services_plans_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/cf/api/organizations/organizationsfakes" "code.cloudfoundry.org/cli/cf/models" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/actors/services_test.go b/cf/actors/services_test.go index fc846c2e552..16e5891b340 100644 --- a/cf/actors/services_test.go +++ b/cf/actors/services_test.go @@ -8,7 +8,7 @@ import ( "code.cloudfoundry.org/cli/cf/errors" "code.cloudfoundry.org/cli/cf/models" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/api/api_suite_test.go b/cf/api/api_suite_test.go index 98ae9aee9ec..063a28603b2 100644 --- a/cf/api/api_suite_test.go +++ b/cf/api/api_suite_test.go @@ -3,7 +3,7 @@ package api_test import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/api/app_summary_test.go b/cf/api/app_summary_test.go index a376f1714a5..36f0b0e0d76 100644 --- a/cf/api/app_summary_test.go +++ b/cf/api/app_summary_test.go @@ -13,7 +13,7 @@ import ( testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" testnet "code.cloudfoundry.org/cli/cf/util/testhelpers/net" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/api/appevents/app_events_suite_test.go b/cf/api/appevents/app_events_suite_test.go index efc415dbde3..72faadddf92 100644 --- a/cf/api/appevents/app_events_suite_test.go +++ b/cf/api/appevents/app_events_suite_test.go @@ -3,7 +3,7 @@ package appevents_test import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/api/appevents/app_events_test.go b/cf/api/appevents/app_events_test.go index 2e6c4b28763..3edf21f9783 100644 --- a/cf/api/appevents/app_events_test.go +++ b/cf/api/appevents/app_events_test.go @@ -14,7 +14,7 @@ import ( "code.cloudfoundry.org/cli/cf/trace/tracefakes" testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" testnet "code.cloudfoundry.org/cli/cf/util/testhelpers/net" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/api/appfiles/app_files_suite_test.go b/cf/api/appfiles/app_files_suite_test.go index d4cbff6c4df..f1e204e4e19 100644 --- a/cf/api/appfiles/app_files_suite_test.go +++ b/cf/api/appfiles/app_files_suite_test.go @@ -3,7 +3,7 @@ package appfiles_test import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/api/appfiles/app_files_test.go b/cf/api/appfiles/app_files_test.go index f6f27f08d89..62f6484f2e0 100644 --- a/cf/api/appfiles/app_files_test.go +++ b/cf/api/appfiles/app_files_test.go @@ -15,7 +15,7 @@ import ( . "code.cloudfoundry.org/cli/cf/api/appfiles" "code.cloudfoundry.org/cli/cf/trace/tracefakes" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/api/appinstances/app_instances_suite_test.go b/cf/api/appinstances/app_instances_suite_test.go index aa0342e683f..dc833a081ce 100644 --- a/cf/api/appinstances/app_instances_suite_test.go +++ b/cf/api/appinstances/app_instances_suite_test.go @@ -3,7 +3,7 @@ package appinstances_test import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/api/appinstances/app_instances_test.go b/cf/api/appinstances/app_instances_test.go index b3223d37544..625a905edaf 100644 --- a/cf/api/appinstances/app_instances_test.go +++ b/cf/api/appinstances/app_instances_test.go @@ -15,7 +15,7 @@ import ( . "code.cloudfoundry.org/cli/cf/api/appinstances" "code.cloudfoundry.org/cli/cf/trace/tracefakes" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/api/applicationbits/application_bits_suite_test.go b/cf/api/applicationbits/application_bits_suite_test.go index 0182f4602c9..80506752f90 100644 --- a/cf/api/applicationbits/application_bits_suite_test.go +++ b/cf/api/applicationbits/application_bits_suite_test.go @@ -3,7 +3,7 @@ package applicationbits_test import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/api/applicationbits/application_bits_test.go b/cf/api/applicationbits/application_bits_test.go index 50805984eb6..0ee4183737d 100644 --- a/cf/api/applicationbits/application_bits_test.go +++ b/cf/api/applicationbits/application_bits_test.go @@ -23,7 +23,7 @@ import ( . "code.cloudfoundry.org/cli/cf/api/applicationbits" "code.cloudfoundry.org/cli/cf/trace/tracefakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/api/applications/applications_suite_test.go b/cf/api/applications/applications_suite_test.go index ec168a3a3b2..4fc00bc02a7 100644 --- a/cf/api/applications/applications_suite_test.go +++ b/cf/api/applications/applications_suite_test.go @@ -3,7 +3,7 @@ package applications_test import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/api/applications/applications_test.go b/cf/api/applications/applications_test.go index 64d5c3a5822..125da3522a9 100644 --- a/cf/api/applications/applications_test.go +++ b/cf/api/applications/applications_test.go @@ -21,7 +21,7 @@ import ( . "code.cloudfoundry.org/cli/cf/api/applications" "code.cloudfoundry.org/cli/cf/trace/tracefakes" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/onsi/gomega/ghttp" ) diff --git a/cf/api/authentication/authentication_suite_test.go b/cf/api/authentication/authentication_suite_test.go index 08310a8a382..1469b4e91b5 100644 --- a/cf/api/authentication/authentication_suite_test.go +++ b/cf/api/authentication/authentication_suite_test.go @@ -3,7 +3,7 @@ package authentication_test import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/api/authentication/authentication_test.go b/cf/api/authentication/authentication_test.go index 8e69b9690f9..a00143c9ee1 100644 --- a/cf/api/authentication/authentication_test.go +++ b/cf/api/authentication/authentication_test.go @@ -16,7 +16,7 @@ import ( . "code.cloudfoundry.org/cli/cf/api/authentication" "code.cloudfoundry.org/cli/cf/trace/tracefakes" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/onsi/gomega/ghttp" ) diff --git a/cf/api/buildpack_bits_test.go b/cf/api/buildpack_bits_test.go index 25892813695..ae480e1fbba 100644 --- a/cf/api/buildpack_bits_test.go +++ b/cf/api/buildpack_bits_test.go @@ -26,7 +26,7 @@ import ( "code.cloudfoundry.org/cli/cf/terminal/terminalfakes" "code.cloudfoundry.org/cli/cf/trace/tracefakes" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/api/buildpacks_test.go b/cf/api/buildpacks_test.go index 55a91a7020b..0cebb449ef7 100644 --- a/cf/api/buildpacks_test.go +++ b/cf/api/buildpacks_test.go @@ -16,7 +16,7 @@ import ( testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" testnet "code.cloudfoundry.org/cli/cf/util/testhelpers/net" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/api/clients_test.go b/cf/api/clients_test.go index 717f762eb81..0749a849131 100644 --- a/cf/api/clients_test.go +++ b/cf/api/clients_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/cf/terminal/terminalfakes" "code.cloudfoundry.org/cli/cf/trace/tracefakes" testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/onsi/gomega/ghttp" diff --git a/cf/api/copyapplicationsource/copy_application_source_suite_test.go b/cf/api/copyapplicationsource/copy_application_source_suite_test.go index 1586abe7d6c..e32ffea0f3e 100644 --- a/cf/api/copyapplicationsource/copy_application_source_suite_test.go +++ b/cf/api/copyapplicationsource/copy_application_source_suite_test.go @@ -3,7 +3,7 @@ package copyapplicationsource_test import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/api/copyapplicationsource/copy_application_source_test.go b/cf/api/copyapplicationsource/copy_application_source_test.go index e519900176c..fa2b3139b95 100644 --- a/cf/api/copyapplicationsource/copy_application_source_test.go +++ b/cf/api/copyapplicationsource/copy_application_source_test.go @@ -14,7 +14,7 @@ import ( testnet "code.cloudfoundry.org/cli/cf/util/testhelpers/net" "code.cloudfoundry.org/cli/cf/trace/tracefakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/api/curl_test.go b/cf/api/curl_test.go index 5d39bed01b5..34fcd62e4d1 100644 --- a/cf/api/curl_test.go +++ b/cf/api/curl_test.go @@ -16,7 +16,7 @@ import ( . "code.cloudfoundry.org/cli/cf/api" "code.cloudfoundry.org/cli/cf/trace/tracefakes" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/onsi/gomega/ghttp" ) diff --git a/cf/api/domains_test.go b/cf/api/domains_test.go index 8116787591f..54925d15bdb 100644 --- a/cf/api/domains_test.go +++ b/cf/api/domains_test.go @@ -17,7 +17,7 @@ import ( . "code.cloudfoundry.org/cli/cf/api" "code.cloudfoundry.org/cli/cf/trace/tracefakes" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/api/endpoints_test.go b/cf/api/endpoints_test.go index 3783d368c3f..3892bba24ed 100644 --- a/cf/api/endpoints_test.go +++ b/cf/api/endpoints_test.go @@ -18,7 +18,7 @@ import ( "code.cloudfoundry.org/cli/cf/trace/tracefakes" testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" testnet "code.cloudfoundry.org/cli/cf/util/testhelpers/net" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/api/environmentvariablegroups/environment_variable_groups_suite_test.go b/cf/api/environmentvariablegroups/environment_variable_groups_suite_test.go index 350717a93f3..5725fb98667 100644 --- a/cf/api/environmentvariablegroups/environment_variable_groups_suite_test.go +++ b/cf/api/environmentvariablegroups/environment_variable_groups_suite_test.go @@ -3,7 +3,7 @@ package environmentvariablegroups_test import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/api/environmentvariablegroups/environment_variable_groups_test.go b/cf/api/environmentvariablegroups/environment_variable_groups_test.go index 66ae787604e..48a3724aebc 100644 --- a/cf/api/environmentvariablegroups/environment_variable_groups_test.go +++ b/cf/api/environmentvariablegroups/environment_variable_groups_test.go @@ -15,7 +15,7 @@ import ( "github.com/onsi/gomega/ghttp" "code.cloudfoundry.org/cli/cf/trace/tracefakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/api/featureflags/feature_flags_suite_test.go b/cf/api/featureflags/feature_flags_suite_test.go index 8c31682d15d..26e7da8db51 100644 --- a/cf/api/featureflags/feature_flags_suite_test.go +++ b/cf/api/featureflags/feature_flags_suite_test.go @@ -3,7 +3,7 @@ package featureflags_test import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/api/featureflags/feature_flags_test.go b/cf/api/featureflags/feature_flags_test.go index de9e378f571..6c0cf5f925b 100644 --- a/cf/api/featureflags/feature_flags_test.go +++ b/cf/api/featureflags/feature_flags_test.go @@ -15,7 +15,7 @@ import ( . "code.cloudfoundry.org/cli/cf/api/featureflags" "code.cloudfoundry.org/cli/cf/trace/tracefakes" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/api/logs/log_cache_message_test.go b/cf/api/logs/log_cache_message_test.go index bc6abfbcaee..ee73874b72e 100644 --- a/cf/api/logs/log_cache_message_test.go +++ b/cf/api/logs/log_cache_message_test.go @@ -6,7 +6,7 @@ import ( "code.cloudfoundry.org/cli/actor/sharedaction" "code.cloudfoundry.org/cli/cf/api/logs" "code.cloudfoundry.org/cli/cf/api/logs/logsfakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/api/logs/log_cache_repository_test.go b/cf/api/logs/log_cache_repository_test.go index 0b3dfd01a9d..a3c48c45a77 100644 --- a/cf/api/logs/log_cache_repository_test.go +++ b/cf/api/logs/log_cache_repository_test.go @@ -8,7 +8,7 @@ import ( "code.cloudfoundry.org/cli/actor/sharedaction" "code.cloudfoundry.org/cli/actor/sharedaction/sharedactionfakes" "code.cloudfoundry.org/cli/cf/api/logs" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/api/logs/logs_suite_test.go b/cf/api/logs/logs_suite_test.go index de2eeeab96e..8d5d23f342c 100644 --- a/cf/api/logs/logs_suite_test.go +++ b/cf/api/logs/logs_suite_test.go @@ -1,7 +1,7 @@ package logs_test import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/api/organizations/organizations_suite_test.go b/cf/api/organizations/organizations_suite_test.go index 967c5f0cba3..3c75cf6d186 100644 --- a/cf/api/organizations/organizations_suite_test.go +++ b/cf/api/organizations/organizations_suite_test.go @@ -3,7 +3,7 @@ package organizations_test import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/api/organizations/organizations_test.go b/cf/api/organizations/organizations_test.go index c1eecc5f709..8819e5fe40d 100644 --- a/cf/api/organizations/organizations_test.go +++ b/cf/api/organizations/organizations_test.go @@ -16,7 +16,7 @@ import ( . "code.cloudfoundry.org/cli/cf/api/organizations" "code.cloudfoundry.org/cli/cf/trace/tracefakes" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/onsi/gomega/ghttp" ) diff --git a/cf/api/password/password_suite_test.go b/cf/api/password/password_suite_test.go index 4cc33137c4e..9c8d685ba89 100644 --- a/cf/api/password/password_suite_test.go +++ b/cf/api/password/password_suite_test.go @@ -3,7 +3,7 @@ package password_test import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/api/password/password_test.go b/cf/api/password/password_test.go index e862eeb0367..b1b22d29c14 100644 --- a/cf/api/password/password_test.go +++ b/cf/api/password/password_test.go @@ -14,7 +14,7 @@ import ( . "code.cloudfoundry.org/cli/cf/api/password" "code.cloudfoundry.org/cli/cf/trace/tracefakes" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/api/quotas/quotas_suite_test.go b/cf/api/quotas/quotas_suite_test.go index ddfc0f192cc..04d290d00bd 100644 --- a/cf/api/quotas/quotas_suite_test.go +++ b/cf/api/quotas/quotas_suite_test.go @@ -3,7 +3,7 @@ package quotas_test import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/api/quotas/quotas_test.go b/cf/api/quotas/quotas_test.go index 5f74f846408..bfc056e5afa 100644 --- a/cf/api/quotas/quotas_test.go +++ b/cf/api/quotas/quotas_test.go @@ -17,7 +17,7 @@ import ( "encoding/json" "code.cloudfoundry.org/cli/cf/trace/tracefakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/api/resources/applications_test.go b/cf/api/resources/applications_test.go index dbf863e83e6..e2ad37d376b 100644 --- a/cf/api/resources/applications_test.go +++ b/cf/api/resources/applications_test.go @@ -6,7 +6,7 @@ import ( "code.cloudfoundry.org/cli/cf/api/resources" "code.cloudfoundry.org/cli/cf/models" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/api/resources/events_test.go b/cf/api/resources/events_test.go index 23588ddc586..46cf9df9ec0 100644 --- a/cf/api/resources/events_test.go +++ b/cf/api/resources/events_test.go @@ -6,7 +6,7 @@ import ( "time" . "code.cloudfoundry.org/cli/cf/api/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/api/resources/quotas_test.go b/cf/api/resources/quotas_test.go index 48ec1db79a0..a79e1712866 100644 --- a/cf/api/resources/quotas_test.go +++ b/cf/api/resources/quotas_test.go @@ -5,7 +5,7 @@ import ( "code.cloudfoundry.org/cli/cf/models" "encoding/json" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/api/resources/resources_test.go b/cf/api/resources/resources_test.go index bf510976af2..1e1735288d2 100644 --- a/cf/api/resources/resources_test.go +++ b/cf/api/resources/resources_test.go @@ -5,7 +5,7 @@ import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/api/resources/service_instances_test.go b/cf/api/resources/service_instances_test.go index 48e943ff6d3..1b88be8a86c 100644 --- a/cf/api/resources/service_instances_test.go +++ b/cf/api/resources/service_instances_test.go @@ -6,7 +6,7 @@ import ( . "code.cloudfoundry.org/cli/cf/api/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/api/resources/service_keys_test.go b/cf/api/resources/service_keys_test.go index daa6af0a921..a74423b1cdb 100644 --- a/cf/api/resources/service_keys_test.go +++ b/cf/api/resources/service_keys_test.go @@ -5,7 +5,7 @@ import ( . "code.cloudfoundry.org/cli/cf/api/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/api/route_service_binding_repository_test.go b/cf/api/route_service_binding_repository_test.go index e92593210fa..47a8409de76 100644 --- a/cf/api/route_service_binding_repository_test.go +++ b/cf/api/route_service_binding_repository_test.go @@ -16,7 +16,7 @@ import ( "github.com/onsi/gomega/ghttp" "code.cloudfoundry.org/cli/cf/trace/tracefakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/api/routes_test.go b/cf/api/routes_test.go index cd46a0c2cad..e1862374acf 100644 --- a/cf/api/routes_test.go +++ b/cf/api/routes_test.go @@ -18,7 +18,7 @@ import ( . "code.cloudfoundry.org/cli/cf/api" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/onsi/gomega/ghttp" ) diff --git a/cf/api/routing_api_test.go b/cf/api/routing_api_test.go index e900e062fdf..37d874bb92e 100644 --- a/cf/api/routing_api_test.go +++ b/cf/api/routing_api_test.go @@ -14,7 +14,7 @@ import ( "code.cloudfoundry.org/cli/cf/terminal/terminalfakes" "code.cloudfoundry.org/cli/cf/trace/tracefakes" testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/onsi/gomega/ghttp" ) diff --git a/cf/api/securitygroups/defaults/running/running_suite_test.go b/cf/api/securitygroups/defaults/running/running_suite_test.go index 6905947b397..beeaf9853e2 100644 --- a/cf/api/securitygroups/defaults/running/running_suite_test.go +++ b/cf/api/securitygroups/defaults/running/running_suite_test.go @@ -3,7 +3,7 @@ package running_test import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/api/securitygroups/defaults/running/running_test.go b/cf/api/securitygroups/defaults/running/running_test.go index 82e2e17039a..340d0b329fd 100644 --- a/cf/api/securitygroups/defaults/running/running_test.go +++ b/cf/api/securitygroups/defaults/running/running_test.go @@ -16,7 +16,7 @@ import ( . "code.cloudfoundry.org/cli/cf/api/securitygroups/defaults/running" "code.cloudfoundry.org/cli/cf/trace/tracefakes" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/api/securitygroups/defaults/staging/staging_suite_test.go b/cf/api/securitygroups/defaults/staging/staging_suite_test.go index 9c9776d5890..0e39b6127ab 100644 --- a/cf/api/securitygroups/defaults/staging/staging_suite_test.go +++ b/cf/api/securitygroups/defaults/staging/staging_suite_test.go @@ -3,7 +3,7 @@ package staging_test import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/api/securitygroups/defaults/staging/staging_test.go b/cf/api/securitygroups/defaults/staging/staging_test.go index c326a30f610..6d805551bb2 100644 --- a/cf/api/securitygroups/defaults/staging/staging_test.go +++ b/cf/api/securitygroups/defaults/staging/staging_test.go @@ -16,7 +16,7 @@ import ( testnet "code.cloudfoundry.org/cli/cf/util/testhelpers/net" "code.cloudfoundry.org/cli/cf/trace/tracefakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/api/securitygroups/security_groups_suite_test.go b/cf/api/securitygroups/security_groups_suite_test.go index bd8a597549a..093c14f29a8 100644 --- a/cf/api/securitygroups/security_groups_suite_test.go +++ b/cf/api/securitygroups/security_groups_suite_test.go @@ -3,7 +3,7 @@ package securitygroups_test import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/api/securitygroups/security_groups_test.go b/cf/api/securitygroups/security_groups_test.go index 950486f1f62..c7846968046 100644 --- a/cf/api/securitygroups/security_groups_test.go +++ b/cf/api/securitygroups/security_groups_test.go @@ -17,7 +17,7 @@ import ( . "code.cloudfoundry.org/cli/cf/api/securitygroups" "code.cloudfoundry.org/cli/cf/trace/tracefakes" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/api/securitygroups/spaces/space_binder_test.go b/cf/api/securitygroups/spaces/space_binder_test.go index 5c592dd0984..f3992f96346 100644 --- a/cf/api/securitygroups/spaces/space_binder_test.go +++ b/cf/api/securitygroups/spaces/space_binder_test.go @@ -15,7 +15,7 @@ import ( . "code.cloudfoundry.org/cli/cf/api/securitygroups/spaces" "code.cloudfoundry.org/cli/cf/trace/tracefakes" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/api/securitygroups/spaces/suite_test.go b/cf/api/securitygroups/spaces/suite_test.go index 4f5f14b2604..935c3f694a8 100644 --- a/cf/api/securitygroups/spaces/suite_test.go +++ b/cf/api/securitygroups/spaces/suite_test.go @@ -3,7 +3,7 @@ package spaces_test import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/api/service_auth_tokens_test.go b/cf/api/service_auth_tokens_test.go index df138ca79ab..2a8fba16eb7 100644 --- a/cf/api/service_auth_tokens_test.go +++ b/cf/api/service_auth_tokens_test.go @@ -17,7 +17,7 @@ import ( . "code.cloudfoundry.org/cli/cf/api" "code.cloudfoundry.org/cli/cf/trace/tracefakes" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/api/service_bindings_test.go b/cf/api/service_bindings_test.go index 4a94561309b..1d7f9dcb1d0 100644 --- a/cf/api/service_bindings_test.go +++ b/cf/api/service_bindings_test.go @@ -13,7 +13,7 @@ import ( . "code.cloudfoundry.org/cli/cf/api" "code.cloudfoundry.org/cli/cf/trace/tracefakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/onsi/gomega/ghttp" ) diff --git a/cf/api/service_brokers_test.go b/cf/api/service_brokers_test.go index 232f611c400..6c979f1135c 100644 --- a/cf/api/service_brokers_test.go +++ b/cf/api/service_brokers_test.go @@ -15,7 +15,7 @@ import ( . "code.cloudfoundry.org/cli/cf/api" "code.cloudfoundry.org/cli/cf/trace/tracefakes" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/onsi/gomega/ghttp" ) diff --git a/cf/api/service_keys_test.go b/cf/api/service_keys_test.go index f8fb7a9cc1a..f404f12ac04 100644 --- a/cf/api/service_keys_test.go +++ b/cf/api/service_keys_test.go @@ -17,7 +17,7 @@ import ( . "code.cloudfoundry.org/cli/cf/api" "code.cloudfoundry.org/cli/cf/trace/tracefakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/api/service_plan_test.go b/cf/api/service_plan_test.go index 377e7314b94..26a74c13d07 100644 --- a/cf/api/service_plan_test.go +++ b/cf/api/service_plan_test.go @@ -16,7 +16,7 @@ import ( . "code.cloudfoundry.org/cli/cf/api" "code.cloudfoundry.org/cli/cf/trace/tracefakes" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/api/service_plan_visibility_test.go b/cf/api/service_plan_visibility_test.go index 860e8a9b1e6..cb17887ee42 100644 --- a/cf/api/service_plan_visibility_test.go +++ b/cf/api/service_plan_visibility_test.go @@ -15,7 +15,7 @@ import ( . "code.cloudfoundry.org/cli/cf/api" "code.cloudfoundry.org/cli/cf/trace/tracefakes" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/api/service_summary_test.go b/cf/api/service_summary_test.go index 39fa73f6975..15e7b1bd0d3 100644 --- a/cf/api/service_summary_test.go +++ b/cf/api/service_summary_test.go @@ -14,7 +14,7 @@ import ( . "code.cloudfoundry.org/cli/cf/api" "code.cloudfoundry.org/cli/cf/trace/tracefakes" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/api/services_test.go b/cf/api/services_test.go index c1a417e12c6..62d5b1f476a 100644 --- a/cf/api/services_test.go +++ b/cf/api/services_test.go @@ -20,7 +20,7 @@ import ( . "code.cloudfoundry.org/cli/cf/api" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/api/spacequotas/space_quotas_suite_test.go b/cf/api/spacequotas/space_quotas_suite_test.go index 0322194b783..92d80051778 100644 --- a/cf/api/spacequotas/space_quotas_suite_test.go +++ b/cf/api/spacequotas/space_quotas_suite_test.go @@ -3,7 +3,7 @@ package spacequotas_test import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/api/spacequotas/space_quotas_test.go b/cf/api/spacequotas/space_quotas_test.go index 8431c9961c2..d895031c543 100644 --- a/cf/api/spacequotas/space_quotas_test.go +++ b/cf/api/spacequotas/space_quotas_test.go @@ -16,7 +16,7 @@ import ( testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" "code.cloudfoundry.org/cli/cf/trace/tracefakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/api/spaces/spaces_suite_test.go b/cf/api/spaces/spaces_suite_test.go index 5e86e2aba4d..4fa12fe9ce2 100644 --- a/cf/api/spaces/spaces_suite_test.go +++ b/cf/api/spaces/spaces_suite_test.go @@ -3,7 +3,7 @@ package spaces_test import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/api/spaces/spaces_test.go b/cf/api/spaces/spaces_test.go index 26bdaa5b82a..157cb557444 100644 --- a/cf/api/spaces/spaces_test.go +++ b/cf/api/spaces/spaces_test.go @@ -17,7 +17,7 @@ import ( . "code.cloudfoundry.org/cli/cf/api/spaces" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/onsi/gomega/ghttp" ) diff --git a/cf/api/stacks/stacks_suite_test.go b/cf/api/stacks/stacks_suite_test.go index 576f2248dc6..0b75daba4be 100644 --- a/cf/api/stacks/stacks_suite_test.go +++ b/cf/api/stacks/stacks_suite_test.go @@ -3,7 +3,7 @@ package stacks_test import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/api/stacks/stacks_test.go b/cf/api/stacks/stacks_test.go index 183ec1543c3..65a78a827a5 100644 --- a/cf/api/stacks/stacks_test.go +++ b/cf/api/stacks/stacks_test.go @@ -16,7 +16,7 @@ import ( . "code.cloudfoundry.org/cli/cf/api/stacks" "code.cloudfoundry.org/cli/cf/trace/tracefakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/api/user_provided_service_instances_test.go b/cf/api/user_provided_service_instances_test.go index fa99f542945..87dd06baadf 100644 --- a/cf/api/user_provided_service_instances_test.go +++ b/cf/api/user_provided_service_instances_test.go @@ -15,7 +15,7 @@ import ( . "code.cloudfoundry.org/cli/cf/api" "code.cloudfoundry.org/cli/cf/trace/tracefakes" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/api/users_test.go b/cf/api/users_test.go index e92facd57cd..a2f06eddbbd 100644 --- a/cf/api/users_test.go +++ b/cf/api/users_test.go @@ -14,7 +14,7 @@ import ( "code.cloudfoundry.org/cli/cf/terminal/terminalfakes" testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/onsi/gomega/ghttp" ) diff --git a/cf/appfiles/app_files_suite_test.go b/cf/appfiles/app_files_suite_test.go index 402a19448c0..eccda8a285c 100644 --- a/cf/appfiles/app_files_suite_test.go +++ b/cf/appfiles/app_files_suite_test.go @@ -5,7 +5,7 @@ import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/appfiles/app_files_test.go b/cf/appfiles/app_files_test.go index 1e186968d46..63e79ce3571 100644 --- a/cf/appfiles/app_files_test.go +++ b/cf/appfiles/app_files_test.go @@ -13,7 +13,7 @@ import ( "code.cloudfoundry.org/cli/cf/models" "code.cloudfoundry.org/gofileutils/fileutils" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/appfiles/cf_ignore_test.go b/cf/appfiles/cf_ignore_test.go index 2814771fbcf..12410ce8a83 100644 --- a/cf/appfiles/cf_ignore_test.go +++ b/cf/appfiles/cf_ignore_test.go @@ -2,7 +2,7 @@ package appfiles_test import ( . "code.cloudfoundry.org/cli/cf/appfiles" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/appfiles/zipper_test.go b/cf/appfiles/zipper_test.go index e57d0d02f29..a262b2fdcf9 100644 --- a/cf/appfiles/zipper_test.go +++ b/cf/appfiles/zipper_test.go @@ -15,7 +15,7 @@ import ( . "code.cloudfoundry.org/cli/cf/appfiles" "code.cloudfoundry.org/gofileutils/fileutils" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commandregistry/command_registry_suite_test.go b/cf/commandregistry/command_registry_suite_test.go index 7eb9c7c7092..2aea6bddf13 100644 --- a/cf/commandregistry/command_registry_suite_test.go +++ b/cf/commandregistry/command_registry_suite_test.go @@ -1,7 +1,7 @@ package commandregistry_test import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/commandregistry/dependency_test.go b/cf/commandregistry/dependency_test.go index 4f93d0ca41f..a58824a9799 100644 --- a/cf/commandregistry/dependency_test.go +++ b/cf/commandregistry/dependency_test.go @@ -6,7 +6,7 @@ import ( "os" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commandregistry/registry_test.go b/cf/commandregistry/registry_test.go index f8c709fad4d..86c5cfea4dc 100644 --- a/cf/commandregistry/registry_test.go +++ b/cf/commandregistry/registry_test.go @@ -10,7 +10,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" . "code.cloudfoundry.org/cli/cf/i18n" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/api_test.go b/cf/commands/api_test.go index 294f00afa92..93d86d5ad66 100644 --- a/cf/commands/api_test.go +++ b/cf/commands/api_test.go @@ -9,7 +9,7 @@ import ( "code.cloudfoundry.org/cli/cf/errors" testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "code.cloudfoundry.org/cli/cf/api" diff --git a/cf/commands/application/app_test.go b/cf/commands/application/app_test.go index 7ca948da350..c419071b81e 100644 --- a/cf/commands/application/app_test.go +++ b/cf/commands/application/app_test.go @@ -25,7 +25,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/application/application_suite_test.go b/cf/commands/application/application_suite_test.go index 2067c9106ee..7d66957acfd 100644 --- a/cf/commands/application/application_suite_test.go +++ b/cf/commands/application/application_suite_test.go @@ -4,7 +4,7 @@ import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/commands/application/apps_test.go b/cf/commands/application/apps_test.go index aaaebb32d59..3ad32e19e38 100644 --- a/cf/commands/application/apps_test.go +++ b/cf/commands/application/apps_test.go @@ -12,7 +12,7 @@ import ( testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" "code.cloudfoundry.org/cli/plugin/models" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "os" diff --git a/cf/commands/application/copy_source_test.go b/cf/commands/application/copy_source_test.go index 1d72044b8bf..5d8e6ba0a22 100644 --- a/cf/commands/application/copy_source_test.go +++ b/cf/commands/application/copy_source_test.go @@ -19,7 +19,7 @@ import ( "code.cloudfoundry.org/cli/cf/errors" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/application/delete_test.go b/cf/commands/application/delete_test.go index d1f101ecf84..23d2bef4100 100644 --- a/cf/commands/application/delete_test.go +++ b/cf/commands/application/delete_test.go @@ -12,7 +12,7 @@ import ( testcmd "code.cloudfoundry.org/cli/cf/util/testhelpers/commands" testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" diff --git a/cf/commands/application/disable_ssh_test.go b/cf/commands/application/disable_ssh_test.go index 5dd2ad639e9..b223af0b660 100644 --- a/cf/commands/application/disable_ssh_test.go +++ b/cf/commands/application/disable_ssh_test.go @@ -14,7 +14,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/application/enable_ssh_test.go b/cf/commands/application/enable_ssh_test.go index e2da654049e..aa820d3252e 100644 --- a/cf/commands/application/enable_ssh_test.go +++ b/cf/commands/application/enable_ssh_test.go @@ -14,7 +14,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/application/env_test.go b/cf/commands/application/env_test.go index b3ab8748f09..a4493225004 100644 --- a/cf/commands/application/env_test.go +++ b/cf/commands/application/env_test.go @@ -13,7 +13,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/application/events_test.go b/cf/commands/application/events_test.go index b6252d8d410..c75b8507ce5 100644 --- a/cf/commands/application/events_test.go +++ b/cf/commands/application/events_test.go @@ -17,7 +17,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/application/files_test.go b/cf/commands/application/files_test.go index 09cf81673e1..cf8520b4155 100644 --- a/cf/commands/application/files_test.go +++ b/cf/commands/application/files_test.go @@ -16,7 +16,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/application/get_health_check_test.go b/cf/commands/application/get_health_check_test.go index f5ccd1002cd..33b4071cdfb 100644 --- a/cf/commands/application/get_health_check_test.go +++ b/cf/commands/application/get_health_check_test.go @@ -14,7 +14,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/application/logs_test.go b/cf/commands/application/logs_test.go index 8da4d1416f1..e82d6e04d87 100644 --- a/cf/commands/application/logs_test.go +++ b/cf/commands/application/logs_test.go @@ -14,7 +14,7 @@ import ( "code.cloudfoundry.org/cli/cf/configuration/coreconfig" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/application/push_test.go b/cf/commands/application/push_test.go index 89cad1e5020..2447c675510 100644 --- a/cf/commands/application/push_test.go +++ b/cf/commands/application/push_test.go @@ -30,7 +30,7 @@ import ( testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" "code.cloudfoundry.org/cli/util/generic" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/onsi/gomega/gbytes" ) diff --git a/cf/commands/application/rename_test.go b/cf/commands/application/rename_test.go index 96b786a6341..eda7d25bcc5 100644 --- a/cf/commands/application/rename_test.go +++ b/cf/commands/application/rename_test.go @@ -12,7 +12,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/application/restage_test.go b/cf/commands/application/restage_test.go index a933a4d0bd1..e55890f7ba6 100644 --- a/cf/commands/application/restage_test.go +++ b/cf/commands/application/restage_test.go @@ -13,7 +13,7 @@ import ( testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/application/restart_app_instance_test.go b/cf/commands/application/restart_app_instance_test.go index 75b007b4cbe..b7e5f3545e9 100644 --- a/cf/commands/application/restart_app_instance_test.go +++ b/cf/commands/application/restart_app_instance_test.go @@ -14,7 +14,7 @@ import ( "code.cloudfoundry.org/cli/cf/commandregistry" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/application/restart_test.go b/cf/commands/application/restart_test.go index 0de6d4490f4..c4d2ba48cd0 100644 --- a/cf/commands/application/restart_test.go +++ b/cf/commands/application/restart_test.go @@ -15,7 +15,7 @@ import ( "code.cloudfoundry.org/cli/cf/commandregistry" "code.cloudfoundry.org/cli/cf/configuration/coreconfig" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/application/scale_test.go b/cf/commands/application/scale_test.go index 9bd0a906908..368e6241e42 100644 --- a/cf/commands/application/scale_test.go +++ b/cf/commands/application/scale_test.go @@ -11,7 +11,7 @@ import ( testcmd "code.cloudfoundry.org/cli/cf/util/testhelpers/commands" testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" diff --git a/cf/commands/application/set_env_test.go b/cf/commands/application/set_env_test.go index 108dc7d8de4..6089e957218 100644 --- a/cf/commands/application/set_env_test.go +++ b/cf/commands/application/set_env_test.go @@ -14,7 +14,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/application/set_health_check_test.go b/cf/commands/application/set_health_check_test.go index bf62455c23d..18c1fc26947 100644 --- a/cf/commands/application/set_health_check_test.go +++ b/cf/commands/application/set_health_check_test.go @@ -14,7 +14,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/application/ssh_enabled_test.go b/cf/commands/application/ssh_enabled_test.go index 1ef7c05132e..a5ef948be20 100644 --- a/cf/commands/application/ssh_enabled_test.go +++ b/cf/commands/application/ssh_enabled_test.go @@ -11,7 +11,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/application/ssh_test.go b/cf/commands/application/ssh_test.go index d12164f3bb9..99c93cc3228 100644 --- a/cf/commands/application/ssh_test.go +++ b/cf/commands/application/ssh_test.go @@ -22,7 +22,7 @@ import ( "code.cloudfoundry.org/cli/cf/trace/tracefakes" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/application/start_test.go b/cf/commands/application/start_test.go index 8b161e40e37..fddba65a4ff 100644 --- a/cf/commands/application/start_test.go +++ b/cf/commands/application/start_test.go @@ -30,7 +30,7 @@ import ( "sync/atomic" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/application/stop_test.go b/cf/commands/application/stop_test.go index 93c2c83c77c..d118e219df5 100644 --- a/cf/commands/application/stop_test.go +++ b/cf/commands/application/stop_test.go @@ -15,7 +15,7 @@ import ( "code.cloudfoundry.org/cli/cf/commandregistry" "code.cloudfoundry.org/cli/cf/commands/application" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/application/unset_env_test.go b/cf/commands/application/unset_env_test.go index 3917233915f..64fca2773ed 100644 --- a/cf/commands/application/unset_env_test.go +++ b/cf/commands/application/unset_env_test.go @@ -14,7 +14,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/auth_test.go b/cf/commands/auth_test.go index ec81d8e3617..03202145677 100644 --- a/cf/commands/auth_test.go +++ b/cf/commands/auth_test.go @@ -13,7 +13,7 @@ import ( testcmd "code.cloudfoundry.org/cli/cf/util/testhelpers/commands" testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "os" diff --git a/cf/commands/buildpack/buildpack_suite_test.go b/cf/commands/buildpack/buildpack_suite_test.go index 645b9c09487..a5d02389fc0 100644 --- a/cf/commands/buildpack/buildpack_suite_test.go +++ b/cf/commands/buildpack/buildpack_suite_test.go @@ -4,7 +4,7 @@ import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/commands/buildpack/buildpacks_test.go b/cf/commands/buildpack/buildpacks_test.go index 03c1f8164a1..d50f0314699 100644 --- a/cf/commands/buildpack/buildpacks_test.go +++ b/cf/commands/buildpack/buildpacks_test.go @@ -12,7 +12,7 @@ import ( "code.cloudfoundry.org/cli/cf/commands/buildpack" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/buildpack/create_buildpack_test.go b/cf/commands/buildpack/create_buildpack_test.go index aed50533098..8a5870fbb43 100644 --- a/cf/commands/buildpack/create_buildpack_test.go +++ b/cf/commands/buildpack/create_buildpack_test.go @@ -13,7 +13,7 @@ import ( "code.cloudfoundry.org/cli/cf/commandregistry" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/buildpack/delete_buildpack_test.go b/cf/commands/buildpack/delete_buildpack_test.go index 119c8d34872..4829e1c82bd 100644 --- a/cf/commands/buildpack/delete_buildpack_test.go +++ b/cf/commands/buildpack/delete_buildpack_test.go @@ -9,7 +9,7 @@ import ( "code.cloudfoundry.org/cli/cf/requirements/requirementsfakes" testcmd "code.cloudfoundry.org/cli/cf/util/testhelpers/commands" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" diff --git a/cf/commands/buildpack/rename_buildpack_test.go b/cf/commands/buildpack/rename_buildpack_test.go index 316c82e8a0e..d6cc8333250 100644 --- a/cf/commands/buildpack/rename_buildpack_test.go +++ b/cf/commands/buildpack/rename_buildpack_test.go @@ -9,7 +9,7 @@ import ( "code.cloudfoundry.org/cli/cf/requirements/requirementsfakes" testcmd "code.cloudfoundry.org/cli/cf/util/testhelpers/commands" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" diff --git a/cf/commands/buildpack/update_buildpack_test.go b/cf/commands/buildpack/update_buildpack_test.go index f2160f1c1ab..64c572985d7 100644 --- a/cf/commands/buildpack/update_buildpack_test.go +++ b/cf/commands/buildpack/update_buildpack_test.go @@ -13,7 +13,7 @@ import ( "code.cloudfoundry.org/cli/cf/commandregistry" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/commands_suite_test.go b/cf/commands/commands_suite_test.go index 88f26b1a8f4..c3529d26edd 100644 --- a/cf/commands/commands_suite_test.go +++ b/cf/commands/commands_suite_test.go @@ -4,7 +4,7 @@ import ( "code.cloudfoundry.org/cli/cf/commands" "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" log "github.com/sirupsen/logrus" diff --git a/cf/commands/config_test.go b/cf/commands/config_test.go index 1b1c3a28d8a..a2f4630dd54 100644 --- a/cf/commands/config_test.go +++ b/cf/commands/config_test.go @@ -9,7 +9,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/create_app_manifest_test.go b/cf/commands/create_app_manifest_test.go index 1d913ca8bbe..ad3b71d9b76 100644 --- a/cf/commands/create_app_manifest_test.go +++ b/cf/commands/create_app_manifest_test.go @@ -22,7 +22,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" uuid "github.com/nu7hatch/gouuid" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/curl_test.go b/cf/commands/curl_test.go index 7d046d21f89..870836436e5 100644 --- a/cf/commands/curl_test.go +++ b/cf/commands/curl_test.go @@ -18,7 +18,7 @@ import ( "code.cloudfoundry.org/cli/cf/commandregistry" "code.cloudfoundry.org/cli/cf/trace" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/domain/create_domain_test.go b/cf/commands/domain/create_domain_test.go index 42900f1f333..c2fd102c87a 100644 --- a/cf/commands/domain/create_domain_test.go +++ b/cf/commands/domain/create_domain_test.go @@ -12,7 +12,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/domain/create_shared_domain_test.go b/cf/commands/domain/create_shared_domain_test.go index aeb90c422a8..33ee11a1001 100644 --- a/cf/commands/domain/create_shared_domain_test.go +++ b/cf/commands/domain/create_shared_domain_test.go @@ -17,7 +17,7 @@ import ( "code.cloudfoundry.org/cli/cf/commands/domain" "code.cloudfoundry.org/cli/cf/models" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/domain/delete_domain_test.go b/cf/commands/domain/delete_domain_test.go index 5dfbdf4a879..a4af8db6a77 100644 --- a/cf/commands/domain/delete_domain_test.go +++ b/cf/commands/domain/delete_domain_test.go @@ -11,7 +11,7 @@ import ( testcmd "code.cloudfoundry.org/cli/cf/util/testhelpers/commands" testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" diff --git a/cf/commands/domain/delete_shared_domain_test.go b/cf/commands/domain/delete_shared_domain_test.go index 6b23eedb0ba..c3517a09c43 100644 --- a/cf/commands/domain/delete_shared_domain_test.go +++ b/cf/commands/domain/delete_shared_domain_test.go @@ -13,7 +13,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/domain/domain_suite_test.go b/cf/commands/domain/domain_suite_test.go index c696c68d042..1134db11e9f 100644 --- a/cf/commands/domain/domain_suite_test.go +++ b/cf/commands/domain/domain_suite_test.go @@ -4,7 +4,7 @@ import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/commands/domain/domains_test.go b/cf/commands/domain/domains_test.go index 4ad9a0c1528..4c0e07406a2 100644 --- a/cf/commands/domain/domains_test.go +++ b/cf/commands/domain/domains_test.go @@ -18,7 +18,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/cf/commands/domain" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/environmentvariablegroup/environmentvariablegroup_suite_test.go b/cf/commands/environmentvariablegroup/environmentvariablegroup_suite_test.go index 20c66b47a75..1390d465359 100644 --- a/cf/commands/environmentvariablegroup/environmentvariablegroup_suite_test.go +++ b/cf/commands/environmentvariablegroup/environmentvariablegroup_suite_test.go @@ -3,7 +3,7 @@ package environmentvariablegroup_test import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/commands/environmentvariablegroup/running_environment_variable_group_test.go b/cf/commands/environmentvariablegroup/running_environment_variable_group_test.go index 40d13e8f4ce..51a06ebf13e 100644 --- a/cf/commands/environmentvariablegroup/running_environment_variable_group_test.go +++ b/cf/commands/environmentvariablegroup/running_environment_variable_group_test.go @@ -13,7 +13,7 @@ import ( testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/environmentvariablegroup/set_running_environment_variable_group_test.go b/cf/commands/environmentvariablegroup/set_running_environment_variable_group_test.go index ea20e503d07..ebe73f6c22e 100644 --- a/cf/commands/environmentvariablegroup/set_running_environment_variable_group_test.go +++ b/cf/commands/environmentvariablegroup/set_running_environment_variable_group_test.go @@ -11,7 +11,7 @@ import ( testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/environmentvariablegroup/set_staging_environment_variable_group_test.go b/cf/commands/environmentvariablegroup/set_staging_environment_variable_group_test.go index 48ec90e844b..a5c3a05a2bc 100644 --- a/cf/commands/environmentvariablegroup/set_staging_environment_variable_group_test.go +++ b/cf/commands/environmentvariablegroup/set_staging_environment_variable_group_test.go @@ -11,7 +11,7 @@ import ( testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/environmentvariablegroup/staging_environment_variable_group_test.go b/cf/commands/environmentvariablegroup/staging_environment_variable_group_test.go index 4ddc50cb20d..affe6255406 100644 --- a/cf/commands/environmentvariablegroup/staging_environment_variable_group_test.go +++ b/cf/commands/environmentvariablegroup/staging_environment_variable_group_test.go @@ -13,7 +13,7 @@ import ( testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/featureflag/disable_feature_flag_test.go b/cf/commands/featureflag/disable_feature_flag_test.go index 91cc631fda7..c5a33a98a59 100644 --- a/cf/commands/featureflag/disable_feature_flag_test.go +++ b/cf/commands/featureflag/disable_feature_flag_test.go @@ -12,7 +12,7 @@ import ( testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/featureflag/enable_feature_flag_test.go b/cf/commands/featureflag/enable_feature_flag_test.go index 157eab5a4b0..f08ebdcdc96 100644 --- a/cf/commands/featureflag/enable_feature_flag_test.go +++ b/cf/commands/featureflag/enable_feature_flag_test.go @@ -12,7 +12,7 @@ import ( testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/featureflag/feature_flag_test.go b/cf/commands/featureflag/feature_flag_test.go index 7f23cab5961..bb7a483ee17 100644 --- a/cf/commands/featureflag/feature_flag_test.go +++ b/cf/commands/featureflag/feature_flag_test.go @@ -13,7 +13,7 @@ import ( testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/featureflag/feature_flags_test.go b/cf/commands/featureflag/feature_flags_test.go index 305c74e3bc9..1c0599416c9 100644 --- a/cf/commands/featureflag/feature_flags_test.go +++ b/cf/commands/featureflag/feature_flags_test.go @@ -15,7 +15,7 @@ import ( testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/featureflag/featureflag_suite_test.go b/cf/commands/featureflag/featureflag_suite_test.go index ebb4558e84d..29d57065073 100644 --- a/cf/commands/featureflag/featureflag_suite_test.go +++ b/cf/commands/featureflag/featureflag_suite_test.go @@ -3,7 +3,7 @@ package featureflag_test import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/commands/help_test.go b/cf/commands/help_test.go index 0ea5301bcad..b9e838d3f45 100644 --- a/cf/commands/help_test.go +++ b/cf/commands/help_test.go @@ -13,7 +13,7 @@ import ( "code.cloudfoundry.org/cli/cf/flags" "code.cloudfoundry.org/cli/cf/terminal/terminalfakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/onsi/gomega/gbytes" ) diff --git a/cf/commands/login_test.go b/cf/commands/login_test.go index bde9d340e28..09d81bcc944 100644 --- a/cf/commands/login_test.go +++ b/cf/commands/login_test.go @@ -14,7 +14,7 @@ import ( testcmd "code.cloudfoundry.org/cli/cf/util/testhelpers/commands" testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" diff --git a/cf/commands/logout_test.go b/cf/commands/logout_test.go index 7625ab8a4d1..1ac2947ed21 100644 --- a/cf/commands/logout_test.go +++ b/cf/commands/logout_test.go @@ -7,7 +7,7 @@ import ( testcmd "code.cloudfoundry.org/cli/cf/util/testhelpers/commands" testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/oauth_token_test.go b/cf/commands/oauth_token_test.go index 7883c92691f..4e74a28de30 100644 --- a/cf/commands/oauth_token_test.go +++ b/cf/commands/oauth_token_test.go @@ -17,7 +17,7 @@ import ( "os" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/organization/create_org_test.go b/cf/commands/organization/create_org_test.go index a966a80ffe2..d4f78576149 100644 --- a/cf/commands/organization/create_org_test.go +++ b/cf/commands/organization/create_org_test.go @@ -17,7 +17,7 @@ import ( "code.cloudfoundry.org/cli/cf/commandregistry" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/organization/delete_org_test.go b/cf/commands/organization/delete_org_test.go index dc7eeac16f4..f0fea1a9d61 100644 --- a/cf/commands/organization/delete_org_test.go +++ b/cf/commands/organization/delete_org_test.go @@ -14,7 +14,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/organization/org_test.go b/cf/commands/organization/org_test.go index 5edc37bfe73..f310f83184a 100644 --- a/cf/commands/organization/org_test.go +++ b/cf/commands/organization/org_test.go @@ -13,7 +13,7 @@ import ( "code.cloudfoundry.org/cli/cf/commands/organization" "code.cloudfoundry.org/cli/cf/requirements/requirementsfakes" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/organization/organization_suite_test.go b/cf/commands/organization/organization_suite_test.go index 4651be2cf18..6f809a00db5 100644 --- a/cf/commands/organization/organization_suite_test.go +++ b/cf/commands/organization/organization_suite_test.go @@ -3,7 +3,7 @@ package organization_test import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/commands/organization/orgs_test.go b/cf/commands/organization/orgs_test.go index 9d5d025f399..ae0d7822baf 100644 --- a/cf/commands/organization/orgs_test.go +++ b/cf/commands/organization/orgs_test.go @@ -15,7 +15,7 @@ import ( testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" "code.cloudfoundry.org/cli/plugin/models" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "code.cloudfoundry.org/cli/cf/commands/organization" diff --git a/cf/commands/organization/rename_org_test.go b/cf/commands/organization/rename_org_test.go index e75b34c17c8..8d9fe048cdf 100644 --- a/cf/commands/organization/rename_org_test.go +++ b/cf/commands/organization/rename_org_test.go @@ -10,7 +10,7 @@ import ( testcmd "code.cloudfoundry.org/cli/cf/util/testhelpers/commands" testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" diff --git a/cf/commands/organization/set_quota_test.go b/cf/commands/organization/set_quota_test.go index d12280f6907..166bc33525c 100644 --- a/cf/commands/organization/set_quota_test.go +++ b/cf/commands/organization/set_quota_test.go @@ -12,7 +12,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/passwd_test.go b/cf/commands/passwd_test.go index 78d5e09b416..2a7b9a25021 100644 --- a/cf/commands/passwd_test.go +++ b/cf/commands/passwd_test.go @@ -10,7 +10,7 @@ import ( testcmd "code.cloudfoundry.org/cli/cf/util/testhelpers/commands" testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" diff --git a/cf/commands/plugin/install_plugin_test.go b/cf/commands/plugin/install_plugin_test.go index c091716e8a8..ca8df3139e3 100644 --- a/cf/commands/plugin/install_plugin_test.go +++ b/cf/commands/plugin/install_plugin_test.go @@ -29,7 +29,7 @@ import ( clipr "code.cloudfoundry.org/cli-plugin-repo/web" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/plugin/plugin_suite_test.go b/cf/commands/plugin/plugin_suite_test.go index 624ec134409..c970694347c 100644 --- a/cf/commands/plugin/plugin_suite_test.go +++ b/cf/commands/plugin/plugin_suite_test.go @@ -7,7 +7,7 @@ import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" "code.cloudfoundry.org/cli/cf/util/testhelpers/pluginbuilder" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/commands/plugin/plugins_test.go b/cf/commands/plugin/plugins_test.go index b0b6c4b54ce..3f9caea8fd0 100644 --- a/cf/commands/plugin/plugins_test.go +++ b/cf/commands/plugin/plugins_test.go @@ -14,7 +14,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" "code.cloudfoundry.org/cli/plugin" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/plugin/uninstall_plugin_test.go b/cf/commands/plugin/uninstall_plugin_test.go index e5e32911a7b..eccf500ad65 100644 --- a/cf/commands/plugin/uninstall_plugin_test.go +++ b/cf/commands/plugin/uninstall_plugin_test.go @@ -16,7 +16,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/pluginrepo/add_plugin_repo_test.go b/cf/commands/pluginrepo/add_plugin_repo_test.go index 81cc767e637..4c1189e7c7c 100644 --- a/cf/commands/pluginrepo/add_plugin_repo_test.go +++ b/cf/commands/pluginrepo/add_plugin_repo_test.go @@ -15,7 +15,7 @@ import ( "code.cloudfoundry.org/cli/cf/requirements/requirementsfakes" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/pluginrepo/list_plugin_repos_test.go b/cf/commands/pluginrepo/list_plugin_repos_test.go index fb562e2446a..246ddfb4126 100644 --- a/cf/commands/pluginrepo/list_plugin_repos_test.go +++ b/cf/commands/pluginrepo/list_plugin_repos_test.go @@ -12,7 +12,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/pluginrepo/plugin_repo_suite_test.go b/cf/commands/pluginrepo/plugin_repo_suite_test.go index ffdf5b8f1ec..eb1596a24e3 100644 --- a/cf/commands/pluginrepo/plugin_repo_suite_test.go +++ b/cf/commands/pluginrepo/plugin_repo_suite_test.go @@ -5,7 +5,7 @@ import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/commands/pluginrepo/remove_plugin_repo_test.go b/cf/commands/pluginrepo/remove_plugin_repo_test.go index a1241d3ff26..679f75bdca4 100644 --- a/cf/commands/pluginrepo/remove_plugin_repo_test.go +++ b/cf/commands/pluginrepo/remove_plugin_repo_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/cf/requirements/requirementsfakes" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/pluginrepo/repo_plugins_test.go b/cf/commands/pluginrepo/repo_plugins_test.go index 31149d37c97..d1cc91420ac 100644 --- a/cf/commands/pluginrepo/repo_plugins_test.go +++ b/cf/commands/pluginrepo/repo_plugins_test.go @@ -15,7 +15,7 @@ import ( clipr "code.cloudfoundry.org/cli-plugin-repo/web" "code.cloudfoundry.org/cli/cf/flags" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/quota/create_quota_test.go b/cf/commands/quota/create_quota_test.go index 1dc360d9290..4baad819055 100644 --- a/cf/commands/quota/create_quota_test.go +++ b/cf/commands/quota/create_quota_test.go @@ -5,7 +5,7 @@ import ( "code.cloudfoundry.org/cli/cf/configuration/coreconfig" "code.cloudfoundry.org/cli/cf/flags" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "encoding/json" diff --git a/cf/commands/quota/delete_quota_test.go b/cf/commands/quota/delete_quota_test.go index f3fb67788a3..936521414b3 100644 --- a/cf/commands/quota/delete_quota_test.go +++ b/cf/commands/quota/delete_quota_test.go @@ -13,7 +13,7 @@ import ( "code.cloudfoundry.org/cli/cf/commandregistry" "code.cloudfoundry.org/cli/cf/configuration/coreconfig" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/quota/quota_suite_test.go b/cf/commands/quota/quota_suite_test.go index 6b85a5162bb..87b6847303e 100644 --- a/cf/commands/quota/quota_suite_test.go +++ b/cf/commands/quota/quota_suite_test.go @@ -3,7 +3,7 @@ package quota_test import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/commands/quota/quota_test.go b/cf/commands/quota/quota_test.go index a9cc5338bf8..bc1a7ff6c13 100644 --- a/cf/commands/quota/quota_test.go +++ b/cf/commands/quota/quota_test.go @@ -1,7 +1,7 @@ package quota_test import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "code.cloudfoundry.org/cli/cf/api/quotas/quotasfakes" diff --git a/cf/commands/quota/quotas_test.go b/cf/commands/quota/quotas_test.go index b1943718a40..2d74520bac4 100644 --- a/cf/commands/quota/quotas_test.go +++ b/cf/commands/quota/quotas_test.go @@ -16,7 +16,7 @@ import ( "code.cloudfoundry.org/cli/cf/commandregistry" "code.cloudfoundry.org/cli/cf/configuration/coreconfig" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/quota/update_quota_test.go b/cf/commands/quota/update_quota_test.go index dfb4923fe34..d149aa4e645 100644 --- a/cf/commands/quota/update_quota_test.go +++ b/cf/commands/quota/update_quota_test.go @@ -18,7 +18,7 @@ import ( "code.cloudfoundry.org/cli/cf/models" "code.cloudfoundry.org/cli/cf/requirements" "code.cloudfoundry.org/cli/cf/requirements/requirementsfakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/route/check_route_test.go b/cf/commands/route/check_route_test.go index b59505a9e91..960c7b7affa 100644 --- a/cf/commands/route/check_route_test.go +++ b/cf/commands/route/check_route_test.go @@ -17,7 +17,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/route/create_route_test.go b/cf/commands/route/create_route_test.go index 2ba6aa71fe5..e68a88bdc52 100644 --- a/cf/commands/route/create_route_test.go +++ b/cf/commands/route/create_route_test.go @@ -17,7 +17,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/route/delete_orphaned_routes_test.go b/cf/commands/route/delete_orphaned_routes_test.go index f74e9de88cd..dcc43843bb8 100644 --- a/cf/commands/route/delete_orphaned_routes_test.go +++ b/cf/commands/route/delete_orphaned_routes_test.go @@ -14,7 +14,7 @@ import ( "code.cloudfoundry.org/cli/cf/commands/route" "code.cloudfoundry.org/cli/cf/configuration/coreconfig" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/route/delete_route_test.go b/cf/commands/route/delete_route_test.go index bbbc800b003..44be4ba9ead 100644 --- a/cf/commands/route/delete_route_test.go +++ b/cf/commands/route/delete_route_test.go @@ -18,7 +18,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/route/map_route_test.go b/cf/commands/route/map_route_test.go index 42cb38bb47b..ed11581b32a 100644 --- a/cf/commands/route/map_route_test.go +++ b/cf/commands/route/map_route_test.go @@ -20,7 +20,7 @@ import ( "strings" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/route/route_suite_test.go b/cf/commands/route/route_suite_test.go index e696c8249a4..c08170a3660 100644 --- a/cf/commands/route/route_suite_test.go +++ b/cf/commands/route/route_suite_test.go @@ -3,7 +3,7 @@ package route_test import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/commands/route/routes_test.go b/cf/commands/route/routes_test.go index e76cdaf6538..bf61c979916 100644 --- a/cf/commands/route/routes_test.go +++ b/cf/commands/route/routes_test.go @@ -14,7 +14,7 @@ import ( testcmd "code.cloudfoundry.org/cli/cf/util/testhelpers/commands" testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "code.cloudfoundry.org/cli/cf/commands/route" diff --git a/cf/commands/route/unmap_route_test.go b/cf/commands/route/unmap_route_test.go index 592507b52e8..1784e8ee0c7 100644 --- a/cf/commands/route/unmap_route_test.go +++ b/cf/commands/route/unmap_route_test.go @@ -19,7 +19,7 @@ import ( "strings" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/routergroups/router_groups_test.go b/cf/commands/routergroups/router_groups_test.go index 232e7d4bebd..4377182cd0b 100644 --- a/cf/commands/routergroups/router_groups_test.go +++ b/cf/commands/routergroups/router_groups_test.go @@ -15,7 +15,7 @@ import ( "code.cloudfoundry.org/cli/cf/commands/routergroups" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/routergroups/routergroups_suite_test.go b/cf/commands/routergroups/routergroups_suite_test.go index a2f69080617..2c07f499dbe 100644 --- a/cf/commands/routergroups/routergroups_suite_test.go +++ b/cf/commands/routergroups/routergroups_suite_test.go @@ -3,7 +3,7 @@ package routergroups_test import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/commands/securitygroup/bind_running_security_group_test.go b/cf/commands/securitygroup/bind_running_security_group_test.go index a4706c6327a..79a2fcedb0c 100644 --- a/cf/commands/securitygroup/bind_running_security_group_test.go +++ b/cf/commands/securitygroup/bind_running_security_group_test.go @@ -15,7 +15,7 @@ import ( "code.cloudfoundry.org/cli/cf/commandregistry" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/securitygroup/bind_security_group_test.go b/cf/commands/securitygroup/bind_security_group_test.go index 1520177b180..d7b26669a30 100644 --- a/cf/commands/securitygroup/bind_security_group_test.go +++ b/cf/commands/securitygroup/bind_security_group_test.go @@ -16,7 +16,7 @@ import ( "code.cloudfoundry.org/cli/cf/commandregistry" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/securitygroup/bind_staging_security_group_test.go b/cf/commands/securitygroup/bind_staging_security_group_test.go index 9b56dbd63f3..9b38fa6f7ea 100644 --- a/cf/commands/securitygroup/bind_staging_security_group_test.go +++ b/cf/commands/securitygroup/bind_staging_security_group_test.go @@ -15,7 +15,7 @@ import ( "code.cloudfoundry.org/cli/cf/commandregistry" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/securitygroup/create_security_group_test.go b/cf/commands/securitygroup/create_security_group_test.go index 92bd672b3a2..a3b07f35786 100644 --- a/cf/commands/securitygroup/create_security_group_test.go +++ b/cf/commands/securitygroup/create_security_group_test.go @@ -15,7 +15,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/securitygroup/delete_security_group_test.go b/cf/commands/securitygroup/delete_security_group_test.go index 973f90d5751..bba0e5a5922 100644 --- a/cf/commands/securitygroup/delete_security_group_test.go +++ b/cf/commands/securitygroup/delete_security_group_test.go @@ -13,7 +13,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/securitygroup/running_security_groups_test.go b/cf/commands/securitygroup/running_security_groups_test.go index 4d4287c8de2..519c5281f03 100644 --- a/cf/commands/securitygroup/running_security_groups_test.go +++ b/cf/commands/securitygroup/running_security_groups_test.go @@ -14,7 +14,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/securitygroup/security_group_test.go b/cf/commands/securitygroup/security_group_test.go index d15204d755e..dfdb9034a08 100644 --- a/cf/commands/securitygroup/security_group_test.go +++ b/cf/commands/securitygroup/security_group_test.go @@ -13,7 +13,7 @@ import ( "code.cloudfoundry.org/cli/cf/commandregistry" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/securitygroup/security_groups_test.go b/cf/commands/securitygroup/security_groups_test.go index fd97a16976f..a7ee40ee96d 100644 --- a/cf/commands/securitygroup/security_groups_test.go +++ b/cf/commands/securitygroup/security_groups_test.go @@ -15,7 +15,7 @@ import ( "code.cloudfoundry.org/cli/cf/commands/securitygroup" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/securitygroup/staging_security_groups_test.go b/cf/commands/securitygroup/staging_security_groups_test.go index 169b8800cd8..65dc53ad1ec 100644 --- a/cf/commands/securitygroup/staging_security_groups_test.go +++ b/cf/commands/securitygroup/staging_security_groups_test.go @@ -14,7 +14,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/securitygroup/suite_test.go b/cf/commands/securitygroup/suite_test.go index aa752db5ab6..e0607c6b755 100644 --- a/cf/commands/securitygroup/suite_test.go +++ b/cf/commands/securitygroup/suite_test.go @@ -3,7 +3,7 @@ package securitygroup_test import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/commands/securitygroup/unbind_running_security_group_test.go b/cf/commands/securitygroup/unbind_running_security_group_test.go index 04befbbd77f..18a5860cce2 100644 --- a/cf/commands/securitygroup/unbind_running_security_group_test.go +++ b/cf/commands/securitygroup/unbind_running_security_group_test.go @@ -14,7 +14,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/securitygroup/unbind_security_group_test.go b/cf/commands/securitygroup/unbind_security_group_test.go index 2a2ada51faa..14eafedec97 100644 --- a/cf/commands/securitygroup/unbind_security_group_test.go +++ b/cf/commands/securitygroup/unbind_security_group_test.go @@ -17,7 +17,7 @@ import ( testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/securitygroup/unbind_staging_security_group_test.go b/cf/commands/securitygroup/unbind_staging_security_group_test.go index c2aebeaf587..df832815cc5 100644 --- a/cf/commands/securitygroup/unbind_staging_security_group_test.go +++ b/cf/commands/securitygroup/unbind_staging_security_group_test.go @@ -14,7 +14,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/securitygroup/update_security_group_test.go b/cf/commands/securitygroup/update_security_group_test.go index d748bdd4a31..477092709ef 100644 --- a/cf/commands/securitygroup/update_security_group_test.go +++ b/cf/commands/securitygroup/update_security_group_test.go @@ -16,7 +16,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/service/bind_route_service_test.go b/cf/commands/service/bind_route_service_test.go index be47e719549..fcdd8264d67 100644 --- a/cf/commands/service/bind_route_service_test.go +++ b/cf/commands/service/bind_route_service_test.go @@ -19,7 +19,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/service/bind_service_test.go b/cf/commands/service/bind_service_test.go index 4eadc1d693d..f87e080aaea 100644 --- a/cf/commands/service/bind_service_test.go +++ b/cf/commands/service/bind_service_test.go @@ -14,7 +14,7 @@ import ( testcmd "code.cloudfoundry.org/cli/cf/util/testhelpers/commands" testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "code.cloudfoundry.org/cli/cf/errors" diff --git a/cf/commands/service/create_service_test.go b/cf/commands/service/create_service_test.go index 43b3e41798f..c794355e531 100644 --- a/cf/commands/service/create_service_test.go +++ b/cf/commands/service/create_service_test.go @@ -19,7 +19,7 @@ import ( "code.cloudfoundry.org/cli/cf/commandregistry" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" diff --git a/cf/commands/service/create_user_provided_service_test.go b/cf/commands/service/create_user_provided_service_test.go index e1161d7bbf8..6db247a7929 100644 --- a/cf/commands/service/create_user_provided_service_test.go +++ b/cf/commands/service/create_user_provided_service_test.go @@ -18,7 +18,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/service/delete_service_test.go b/cf/commands/service/delete_service_test.go index ec43cb68985..40717f1196a 100644 --- a/cf/commands/service/delete_service_test.go +++ b/cf/commands/service/delete_service_test.go @@ -11,7 +11,7 @@ import ( testcmd "code.cloudfoundry.org/cli/cf/util/testhelpers/commands" testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" diff --git a/cf/commands/service/marketplace_test.go b/cf/commands/service/marketplace_test.go index 8b59d72809c..06d236443ac 100644 --- a/cf/commands/service/marketplace_test.go +++ b/cf/commands/service/marketplace_test.go @@ -11,7 +11,7 @@ import ( testcmd "code.cloudfoundry.org/cli/cf/util/testhelpers/commands" testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "code.cloudfoundry.org/cli/cf/commands/service" diff --git a/cf/commands/service/migrate_service_instances_test.go b/cf/commands/service/migrate_service_instances_test.go index 8dc41f27b8e..6cb83874d7c 100644 --- a/cf/commands/service/migrate_service_instances_test.go +++ b/cf/commands/service/migrate_service_instances_test.go @@ -11,7 +11,7 @@ import ( testcmd "code.cloudfoundry.org/cli/cf/util/testhelpers/commands" testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" diff --git a/cf/commands/service/purge_service_instance_test.go b/cf/commands/service/purge_service_instance_test.go index 5f16b97eda1..dc7e8450305 100644 --- a/cf/commands/service/purge_service_instance_test.go +++ b/cf/commands/service/purge_service_instance_test.go @@ -19,7 +19,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/service/purge_service_offering_test.go b/cf/commands/service/purge_service_offering_test.go index a39407fe959..b114e6d0e2b 100644 --- a/cf/commands/service/purge_service_offering_test.go +++ b/cf/commands/service/purge_service_offering_test.go @@ -15,7 +15,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/service/rename_service_test.go b/cf/commands/service/rename_service_test.go index 8c6c604eca7..cb6c9bc1278 100644 --- a/cf/commands/service/rename_service_test.go +++ b/cf/commands/service/rename_service_test.go @@ -12,7 +12,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/service/service_suite_test.go b/cf/commands/service/service_suite_test.go index f06bc59dd97..c61fa706b20 100644 --- a/cf/commands/service/service_suite_test.go +++ b/cf/commands/service/service_suite_test.go @@ -3,7 +3,7 @@ package service_test import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/commands/service/service_test.go b/cf/commands/service/service_test.go index 9c624c1ecd5..5c0bd774f83 100644 --- a/cf/commands/service/service_test.go +++ b/cf/commands/service/service_test.go @@ -16,7 +16,7 @@ import ( "code.cloudfoundry.org/cli/cf/api/applications/applicationsfakes" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/plugin/models" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/service/services_test.go b/cf/commands/service/services_test.go index 631df7ced8a..1093af70348 100644 --- a/cf/commands/service/services_test.go +++ b/cf/commands/service/services_test.go @@ -20,7 +20,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/cf/commands/service" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/service/unbind_route_service_test.go b/cf/commands/service/unbind_route_service_test.go index efd55a40c62..8c0fa50d3f1 100644 --- a/cf/commands/service/unbind_route_service_test.go +++ b/cf/commands/service/unbind_route_service_test.go @@ -17,7 +17,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/service/unbind_service_test.go b/cf/commands/service/unbind_service_test.go index e8d479d2dde..026d88ed30c 100644 --- a/cf/commands/service/unbind_service_test.go +++ b/cf/commands/service/unbind_service_test.go @@ -10,7 +10,7 @@ import ( testcmd "code.cloudfoundry.org/cli/cf/util/testhelpers/commands" testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" diff --git a/cf/commands/service/update_service_test.go b/cf/commands/service/update_service_test.go index b484ea1ba9a..029d2fb276a 100644 --- a/cf/commands/service/update_service_test.go +++ b/cf/commands/service/update_service_test.go @@ -15,7 +15,7 @@ import ( testcmd "code.cloudfoundry.org/cli/cf/util/testhelpers/commands" testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" diff --git a/cf/commands/service/update_user_provided_service_test.go b/cf/commands/service/update_user_provided_service_test.go index 18341678e74..36aa4c6deaf 100644 --- a/cf/commands/service/update_user_provided_service_test.go +++ b/cf/commands/service/update_user_provided_service_test.go @@ -19,7 +19,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/serviceaccess/disable_service_access_test.go b/cf/commands/serviceaccess/disable_service_access_test.go index c648781dea3..7f99ec062ef 100644 --- a/cf/commands/serviceaccess/disable_service_access_test.go +++ b/cf/commands/serviceaccess/disable_service_access_test.go @@ -13,7 +13,7 @@ import ( "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/serviceaccess/enable_service_access_test.go b/cf/commands/serviceaccess/enable_service_access_test.go index 298687999b3..a182f38252f 100644 --- a/cf/commands/serviceaccess/enable_service_access_test.go +++ b/cf/commands/serviceaccess/enable_service_access_test.go @@ -14,7 +14,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/serviceaccess/service_access_test.go b/cf/commands/serviceaccess/service_access_test.go index 9775ea1a0be..99e579e942c 100644 --- a/cf/commands/serviceaccess/service_access_test.go +++ b/cf/commands/serviceaccess/service_access_test.go @@ -18,7 +18,7 @@ import ( "code.cloudfoundry.org/cli/cf/commands/serviceaccess" "code.cloudfoundry.org/cli/cf/configuration/coreconfig" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/serviceaccess/serviceaccess_suite_test.go b/cf/commands/serviceaccess/serviceaccess_suite_test.go index 371f4481067..0907c997e6b 100644 --- a/cf/commands/serviceaccess/serviceaccess_suite_test.go +++ b/cf/commands/serviceaccess/serviceaccess_suite_test.go @@ -4,7 +4,7 @@ import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/commands/serviceauthtoken/create_service_auth_token_test.go b/cf/commands/serviceauthtoken/create_service_auth_token_test.go index 9005700b265..541e3169c2c 100644 --- a/cf/commands/serviceauthtoken/create_service_auth_token_test.go +++ b/cf/commands/serviceauthtoken/create_service_auth_token_test.go @@ -12,7 +12,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/serviceauthtoken/delete_service_auth_token_test.go b/cf/commands/serviceauthtoken/delete_service_auth_token_test.go index 04e5a1bb1df..87f971ac1c4 100644 --- a/cf/commands/serviceauthtoken/delete_service_auth_token_test.go +++ b/cf/commands/serviceauthtoken/delete_service_auth_token_test.go @@ -8,7 +8,7 @@ import ( "code.cloudfoundry.org/cli/cf/models" "code.cloudfoundry.org/cli/cf/requirements" "code.cloudfoundry.org/cli/cf/requirements/requirementsfakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" testcmd "code.cloudfoundry.org/cli/cf/util/testhelpers/commands" diff --git a/cf/commands/serviceauthtoken/service_auth_tokens_test.go b/cf/commands/serviceauthtoken/service_auth_tokens_test.go index eabbb105d24..3c6d7f8fb48 100644 --- a/cf/commands/serviceauthtoken/service_auth_tokens_test.go +++ b/cf/commands/serviceauthtoken/service_auth_tokens_test.go @@ -14,7 +14,7 @@ import ( "code.cloudfoundry.org/cli/cf/commands/serviceauthtoken" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/serviceauthtoken/serviceauthtoken_suite_test.go b/cf/commands/serviceauthtoken/serviceauthtoken_suite_test.go index 12972c6beb8..c58e9859ee5 100644 --- a/cf/commands/serviceauthtoken/serviceauthtoken_suite_test.go +++ b/cf/commands/serviceauthtoken/serviceauthtoken_suite_test.go @@ -3,7 +3,7 @@ package serviceauthtoken_test import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/commands/serviceauthtoken/update_service_auth_token_test.go b/cf/commands/serviceauthtoken/update_service_auth_token_test.go index 93a1531e9c3..f671dbabfc1 100644 --- a/cf/commands/serviceauthtoken/update_service_auth_token_test.go +++ b/cf/commands/serviceauthtoken/update_service_auth_token_test.go @@ -12,7 +12,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/servicebroker/create_service_broker_test.go b/cf/commands/servicebroker/create_service_broker_test.go index 247ff85b80b..6742386d3bc 100644 --- a/cf/commands/servicebroker/create_service_broker_test.go +++ b/cf/commands/servicebroker/create_service_broker_test.go @@ -15,7 +15,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/servicebroker/delete_service_broker_test.go b/cf/commands/servicebroker/delete_service_broker_test.go index 6f78edb6fd4..09a91150702 100644 --- a/cf/commands/servicebroker/delete_service_broker_test.go +++ b/cf/commands/servicebroker/delete_service_broker_test.go @@ -12,7 +12,7 @@ import ( testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/servicebroker/rename_service_broker_test.go b/cf/commands/servicebroker/rename_service_broker_test.go index edf124c29a2..aeea99f96a7 100644 --- a/cf/commands/servicebroker/rename_service_broker_test.go +++ b/cf/commands/servicebroker/rename_service_broker_test.go @@ -11,7 +11,7 @@ import ( testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/servicebroker/service_brokers_test.go b/cf/commands/servicebroker/service_brokers_test.go index 4ac1dfd2423..ccf77690f9c 100644 --- a/cf/commands/servicebroker/service_brokers_test.go +++ b/cf/commands/servicebroker/service_brokers_test.go @@ -13,7 +13,7 @@ import ( testcmd "code.cloudfoundry.org/cli/cf/util/testhelpers/commands" testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "strings" diff --git a/cf/commands/servicebroker/servicebroker_suite_test.go b/cf/commands/servicebroker/servicebroker_suite_test.go index e0da03b6405..b47a081abbc 100644 --- a/cf/commands/servicebroker/servicebroker_suite_test.go +++ b/cf/commands/servicebroker/servicebroker_suite_test.go @@ -3,7 +3,7 @@ package servicebroker_test import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/commands/servicebroker/update_service_broker_test.go b/cf/commands/servicebroker/update_service_broker_test.go index 51a61dc14f8..fe69c995f2a 100644 --- a/cf/commands/servicebroker/update_service_broker_test.go +++ b/cf/commands/servicebroker/update_service_broker_test.go @@ -10,7 +10,7 @@ import ( testcmd "code.cloudfoundry.org/cli/cf/util/testhelpers/commands" testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" diff --git a/cf/commands/servicekey/create_service_key_test.go b/cf/commands/servicekey/create_service_key_test.go index 3dcd00a9417..39526952d0b 100644 --- a/cf/commands/servicekey/create_service_key_test.go +++ b/cf/commands/servicekey/create_service_key_test.go @@ -18,7 +18,7 @@ import ( "code.cloudfoundry.org/cli/cf/commandregistry" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/servicekey/delete_service_key_test.go b/cf/commands/servicekey/delete_service_key_test.go index ef29fee4b80..4fe1dbb8eec 100644 --- a/cf/commands/servicekey/delete_service_key_test.go +++ b/cf/commands/servicekey/delete_service_key_test.go @@ -15,7 +15,7 @@ import ( "code.cloudfoundry.org/cli/cf/commandregistry" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/servicekey/service_key_test.go b/cf/commands/servicekey/service_key_test.go index 5e20e7172bd..eaf178a6040 100644 --- a/cf/commands/servicekey/service_key_test.go +++ b/cf/commands/servicekey/service_key_test.go @@ -15,7 +15,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/servicekey/service_keys_test.go b/cf/commands/servicekey/service_keys_test.go index 23e9366a552..f657caf0666 100644 --- a/cf/commands/servicekey/service_keys_test.go +++ b/cf/commands/servicekey/service_keys_test.go @@ -16,7 +16,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/servicekey/servicekey_suite_test.go b/cf/commands/servicekey/servicekey_suite_test.go index 0f2ce691219..37d37527186 100644 --- a/cf/commands/servicekey/servicekey_suite_test.go +++ b/cf/commands/servicekey/servicekey_suite_test.go @@ -6,7 +6,7 @@ import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/space/allow_space_ssh_test.go b/cf/commands/space/allow_space_ssh_test.go index a853ff71a20..141a556dfb6 100644 --- a/cf/commands/space/allow_space_ssh_test.go +++ b/cf/commands/space/allow_space_ssh_test.go @@ -14,7 +14,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/space/create_space_test.go b/cf/commands/space/create_space_test.go index a1ddd8c9089..2f52b593725 100644 --- a/cf/commands/space/create_space_test.go +++ b/cf/commands/space/create_space_test.go @@ -18,7 +18,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/space/delete_space_test.go b/cf/commands/space/delete_space_test.go index 88e49ef4ac2..38d0880439e 100644 --- a/cf/commands/space/delete_space_test.go +++ b/cf/commands/space/delete_space_test.go @@ -13,7 +13,7 @@ import ( testcmd "code.cloudfoundry.org/cli/cf/util/testhelpers/commands" testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" diff --git a/cf/commands/space/disallow_space_ssh_test.go b/cf/commands/space/disallow_space_ssh_test.go index bf0b8daa557..0cc82512edd 100644 --- a/cf/commands/space/disallow_space_ssh_test.go +++ b/cf/commands/space/disallow_space_ssh_test.go @@ -14,7 +14,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/space/rename_space_test.go b/cf/commands/space/rename_space_test.go index f6d8b6fbc61..2b82fbac5b8 100644 --- a/cf/commands/space/rename_space_test.go +++ b/cf/commands/space/rename_space_test.go @@ -12,7 +12,7 @@ import ( testcmd "code.cloudfoundry.org/cli/cf/util/testhelpers/commands" testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" diff --git a/cf/commands/space/space_ssh_allowed_test.go b/cf/commands/space/space_ssh_allowed_test.go index bad3f51ee7d..028ec8c5ddd 100644 --- a/cf/commands/space/space_ssh_allowed_test.go +++ b/cf/commands/space/space_ssh_allowed_test.go @@ -10,7 +10,7 @@ import ( testcmd "code.cloudfoundry.org/cli/cf/util/testhelpers/commands" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/space/space_suite_test.go b/cf/commands/space/space_suite_test.go index 8c04e5387b9..74d0383eece 100644 --- a/cf/commands/space/space_suite_test.go +++ b/cf/commands/space/space_suite_test.go @@ -3,7 +3,7 @@ package space_test import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/commands/space/space_test.go b/cf/commands/space/space_test.go index 200f6e9d5d5..f0d6301e773 100644 --- a/cf/commands/space/space_test.go +++ b/cf/commands/space/space_test.go @@ -7,7 +7,7 @@ import ( testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" "code.cloudfoundry.org/cli/plugin/models" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "code.cloudfoundry.org/cli/cf/api" diff --git a/cf/commands/space/spaces_test.go b/cf/commands/space/spaces_test.go index aa8fac60222..dc19e7ab0ad 100644 --- a/cf/commands/space/spaces_test.go +++ b/cf/commands/space/spaces_test.go @@ -19,7 +19,7 @@ import ( "code.cloudfoundry.org/cli/cf/commands/space" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/spacequota/create_space_quota_test.go b/cf/commands/spacequota/create_space_quota_test.go index 112d85d3e4d..337d4507852 100644 --- a/cf/commands/spacequota/create_space_quota_test.go +++ b/cf/commands/spacequota/create_space_quota_test.go @@ -18,7 +18,7 @@ import ( "code.cloudfoundry.org/cli/cf/commands/spacequota" "code.cloudfoundry.org/cli/cf/flags" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/spacequota/delete_space_quota_test.go b/cf/commands/spacequota/delete_space_quota_test.go index b7737ea5483..e58f51eae55 100644 --- a/cf/commands/spacequota/delete_space_quota_test.go +++ b/cf/commands/spacequota/delete_space_quota_test.go @@ -14,7 +14,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/spacequota/set_space_quota_test.go b/cf/commands/spacequota/set_space_quota_test.go index 96dd5200224..eafc3503e76 100644 --- a/cf/commands/spacequota/set_space_quota_test.go +++ b/cf/commands/spacequota/set_space_quota_test.go @@ -14,7 +14,7 @@ import ( "code.cloudfoundry.org/cli/cf/commandregistry" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/spacequota/space_quota_test.go b/cf/commands/spacequota/space_quota_test.go index 9bacb6fe12c..7a83b45de21 100644 --- a/cf/commands/spacequota/space_quota_test.go +++ b/cf/commands/spacequota/space_quota_test.go @@ -13,7 +13,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/spacequota/space_quotas_test.go b/cf/commands/spacequota/space_quotas_test.go index 755c83e1f3d..a2efb46bd53 100644 --- a/cf/commands/spacequota/space_quotas_test.go +++ b/cf/commands/spacequota/space_quotas_test.go @@ -15,7 +15,7 @@ import ( "code.cloudfoundry.org/cli/cf/commands/spacequota" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/spacequota/spacequota_suite_test.go b/cf/commands/spacequota/spacequota_suite_test.go index f3f921a78e8..ca6f9b07226 100644 --- a/cf/commands/spacequota/spacequota_suite_test.go +++ b/cf/commands/spacequota/spacequota_suite_test.go @@ -3,7 +3,7 @@ package spacequota_test import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/commands/spacequota/unset_space_quota_test.go b/cf/commands/spacequota/unset_space_quota_test.go index 9f71ab70d9f..9b348503d4e 100644 --- a/cf/commands/spacequota/unset_space_quota_test.go +++ b/cf/commands/spacequota/unset_space_quota_test.go @@ -15,7 +15,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/spacequota/update_space_quota_test.go b/cf/commands/spacequota/update_space_quota_test.go index fad0c96b6e8..a984e36c21b 100644 --- a/cf/commands/spacequota/update_space_quota_test.go +++ b/cf/commands/spacequota/update_space_quota_test.go @@ -14,8 +14,8 @@ import ( testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/ssh_code_test.go b/cf/commands/ssh_code_test.go index e281c4bd2c7..34f2d49d695 100644 --- a/cf/commands/ssh_code_test.go +++ b/cf/commands/ssh_code_test.go @@ -16,7 +16,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/stack_test.go b/cf/commands/stack_test.go index 82e9639a0df..51138196b9c 100644 --- a/cf/commands/stack_test.go +++ b/cf/commands/stack_test.go @@ -11,7 +11,7 @@ import ( testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "code.cloudfoundry.org/cli/cf/commandregistry" diff --git a/cf/commands/stacks_test.go b/cf/commands/stacks_test.go index 72b24a0e770..0cae63393a7 100644 --- a/cf/commands/stacks_test.go +++ b/cf/commands/stacks_test.go @@ -11,7 +11,7 @@ import ( testcmd "code.cloudfoundry.org/cli/cf/util/testhelpers/commands" testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "code.cloudfoundry.org/cli/cf/commands" diff --git a/cf/commands/target_test.go b/cf/commands/target_test.go index b1e972bb9bb..08676260163 100644 --- a/cf/commands/target_test.go +++ b/cf/commands/target_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/cf/models" "code.cloudfoundry.org/cli/cf/requirements" "code.cloudfoundry.org/cli/cf/requirements/requirementsfakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" testcmd "code.cloudfoundry.org/cli/cf/util/testhelpers/commands" diff --git a/cf/commands/user/create_user_test.go b/cf/commands/user/create_user_test.go index e7598400d72..7e964fc1a36 100644 --- a/cf/commands/user/create_user_test.go +++ b/cf/commands/user/create_user_test.go @@ -9,7 +9,7 @@ import ( testcmd "code.cloudfoundry.org/cli/cf/util/testhelpers/commands" testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "code.cloudfoundry.org/cli/cf/commandregistry" diff --git a/cf/commands/user/delete_user_test.go b/cf/commands/user/delete_user_test.go index 0677a42aa78..ce79ef84cb9 100644 --- a/cf/commands/user/delete_user_test.go +++ b/cf/commands/user/delete_user_test.go @@ -11,7 +11,7 @@ import ( testcmd "code.cloudfoundry.org/cli/cf/util/testhelpers/commands" testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" diff --git a/cf/commands/user/org_users_test.go b/cf/commands/user/org_users_test.go index 7ead8a1c292..942b9597cd5 100644 --- a/cf/commands/user/org_users_test.go +++ b/cf/commands/user/org_users_test.go @@ -12,7 +12,7 @@ import ( testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" plugin_models "code.cloudfoundry.org/cli/plugin/models" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "os" diff --git a/cf/commands/user/set_org_role_test.go b/cf/commands/user/set_org_role_test.go index 89cc51fdcc6..33c07a5952d 100644 --- a/cf/commands/user/set_org_role_test.go +++ b/cf/commands/user/set_org_role_test.go @@ -17,7 +17,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/user/set_space_role_test.go b/cf/commands/user/set_space_role_test.go index 3ddbff740f0..64d3926662d 100644 --- a/cf/commands/user/set_space_role_test.go +++ b/cf/commands/user/set_space_role_test.go @@ -18,7 +18,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/user/space_users_test.go b/cf/commands/user/space_users_test.go index 8af719a732b..a28f136e989 100644 --- a/cf/commands/user/space_users_test.go +++ b/cf/commands/user/space_users_test.go @@ -15,7 +15,7 @@ import ( testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" plugin_models "code.cloudfoundry.org/cli/plugin/models" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "os" diff --git a/cf/commands/user/unset_org_role_test.go b/cf/commands/user/unset_org_role_test.go index 60c6191fd48..32f68ead1fd 100644 --- a/cf/commands/user/unset_org_role_test.go +++ b/cf/commands/user/unset_org_role_test.go @@ -17,7 +17,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/user/unset_space_role_test.go b/cf/commands/user/unset_space_role_test.go index 13c7cd1b130..cc42cbf4c6a 100644 --- a/cf/commands/user/unset_space_role_test.go +++ b/cf/commands/user/unset_space_role_test.go @@ -18,7 +18,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commands/user/user_suite_test.go b/cf/commands/user/user_suite_test.go index 64a29949870..720eecbf23f 100644 --- a/cf/commands/user/user_suite_test.go +++ b/cf/commands/user/user_suite_test.go @@ -3,7 +3,7 @@ package user_test import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/commands/version_test.go b/cf/commands/version_test.go index b46cffed951..5d52a679330 100644 --- a/cf/commands/version_test.go +++ b/cf/commands/version_test.go @@ -8,7 +8,7 @@ import ( testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" "code.cloudfoundry.org/cli/cf" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/commandsloader/commands_loader_suite_test.go b/cf/commandsloader/commands_loader_suite_test.go index 4850f44e7a0..4ef049b794a 100644 --- a/cf/commandsloader/commands_loader_suite_test.go +++ b/cf/commandsloader/commands_loader_suite_test.go @@ -1,7 +1,7 @@ package commandsloader_test import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/commandsloader/commands_loader_test.go b/cf/commandsloader/commands_loader_test.go index 08add8487d2..922a84ed28b 100644 --- a/cf/commandsloader/commands_loader_test.go +++ b/cf/commandsloader/commands_loader_test.go @@ -8,7 +8,7 @@ import ( "code.cloudfoundry.org/cli/cf/commandregistry" "code.cloudfoundry.org/cli/cf/commandsloader" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/configuration/config_disk_persistor_test.go b/cf/configuration/config_disk_persistor_test.go index e1a8dd25b11..288486627f5 100644 --- a/cf/configuration/config_disk_persistor_test.go +++ b/cf/configuration/config_disk_persistor_test.go @@ -6,7 +6,7 @@ import ( "os" . "code.cloudfoundry.org/cli/cf/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/configuration/configuration_suite_test.go b/cf/configuration/configuration_suite_test.go index c9832177aa4..19e49fb066e 100644 --- a/cf/configuration/configuration_suite_test.go +++ b/cf/configuration/configuration_suite_test.go @@ -1,7 +1,7 @@ package configuration_test import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/configuration/coreconfig/access_token_test.go b/cf/configuration/coreconfig/access_token_test.go index fea832b1527..d9278e88325 100644 --- a/cf/configuration/coreconfig/access_token_test.go +++ b/cf/configuration/coreconfig/access_token_test.go @@ -2,7 +2,7 @@ package coreconfig_test import ( . "code.cloudfoundry.org/cli/cf/configuration/coreconfig" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/configuration/coreconfig/api_config_refresher_test.go b/cf/configuration/coreconfig/api_config_refresher_test.go index 74bf0c4be6a..2f52d74caec 100644 --- a/cf/configuration/coreconfig/api_config_refresher_test.go +++ b/cf/configuration/coreconfig/api_config_refresher_test.go @@ -6,7 +6,7 @@ import ( "code.cloudfoundry.org/cli/cf/configuration/coreconfig/coreconfigfakes" "code.cloudfoundry.org/cli/cf/i18n" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/configuration/coreconfig/config_data_test.go b/cf/configuration/coreconfig/config_data_test.go index d1eeb3c3cb4..e3f44d726c9 100644 --- a/cf/configuration/coreconfig/config_data_test.go +++ b/cf/configuration/coreconfig/config_data_test.go @@ -4,7 +4,7 @@ import ( "code.cloudfoundry.org/cli/cf/configuration/coreconfig" "code.cloudfoundry.org/cli/cf/models" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/configuration/coreconfig/config_repository_test.go b/cf/configuration/coreconfig/config_repository_test.go index 9027a811264..d71006e4b0d 100644 --- a/cf/configuration/coreconfig/config_repository_test.go +++ b/cf/configuration/coreconfig/config_repository_test.go @@ -12,7 +12,7 @@ import ( "code.cloudfoundry.org/cli/version" "github.com/blang/semver/v4" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/configuration/coreconfig/core_config_suite_test.go b/cf/configuration/coreconfig/core_config_suite_test.go index 238306a5195..9ae20fe8ef3 100644 --- a/cf/configuration/coreconfig/core_config_suite_test.go +++ b/cf/configuration/coreconfig/core_config_suite_test.go @@ -1,7 +1,7 @@ package coreconfig_test import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/configuration/pluginconfig/plugin_config_test.go b/cf/configuration/pluginconfig/plugin_config_test.go index e7e0703cd54..ffc259781be 100644 --- a/cf/configuration/pluginconfig/plugin_config_test.go +++ b/cf/configuration/pluginconfig/plugin_config_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/plugin" "code.cloudfoundry.org/cli/cf/configuration/configurationfakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/configuration/pluginconfig/plugin_suite_test.go b/cf/configuration/pluginconfig/plugin_suite_test.go index e80a11b0ecb..d8297546bfd 100644 --- a/cf/configuration/pluginconfig/plugin_suite_test.go +++ b/cf/configuration/pluginconfig/plugin_suite_test.go @@ -1,7 +1,7 @@ package pluginconfig_test import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/flagcontext/flag_content_helper_test.go b/cf/flagcontext/flag_content_helper_test.go index 622ed20a6e3..c57324995b9 100644 --- a/cf/flagcontext/flag_content_helper_test.go +++ b/cf/flagcontext/flag_content_helper_test.go @@ -7,7 +7,7 @@ import ( "code.cloudfoundry.org/cli/cf/flagcontext" "code.cloudfoundry.org/gofileutils/fileutils" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/flagcontext/util_suite_test.go b/cf/flagcontext/util_suite_test.go index 5717be16120..3a3e05bbd3b 100644 --- a/cf/flagcontext/util_suite_test.go +++ b/cf/flagcontext/util_suite_test.go @@ -1,7 +1,7 @@ package flagcontext_test import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/flags/flag_constructor_test.go b/cf/flags/flag_constructor_test.go index c2dc66d9511..fcdd89c2911 100644 --- a/cf/flags/flag_constructor_test.go +++ b/cf/flags/flag_constructor_test.go @@ -2,7 +2,7 @@ package flags_test import ( "code.cloudfoundry.org/cli/cf/flags" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/flags/flags_suite_test.go b/cf/flags/flags_suite_test.go index 0b3071f62e0..605e48cfa8f 100644 --- a/cf/flags/flags_suite_test.go +++ b/cf/flags/flags_suite_test.go @@ -1,7 +1,7 @@ package flags_test import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/flags/flags_test.go b/cf/flags/flags_test.go index 14acb4efe9d..1e744afe6b2 100644 --- a/cf/flags/flags_test.go +++ b/cf/flags/flags_test.go @@ -2,7 +2,7 @@ package flags_test import ( "code.cloudfoundry.org/cli/cf/flags" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/flags/flags_usage_test.go b/cf/flags/flags_usage_test.go index 1badd41b4b0..56851007ecc 100644 --- a/cf/flags/flags_usage_test.go +++ b/cf/flags/flags_usage_test.go @@ -4,7 +4,7 @@ import ( "strings" "code.cloudfoundry.org/cli/cf/flags" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/formatters/bools_test.go b/cf/formatters/bools_test.go index 040017ad548..4074e130d58 100644 --- a/cf/formatters/bools_test.go +++ b/cf/formatters/bools_test.go @@ -2,7 +2,7 @@ package formatters_test import ( . "code.cloudfoundry.org/cli/cf/formatters" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/formatters/bytes_test.go b/cf/formatters/bytes_test.go index 015986f2e9c..0e486e37a58 100644 --- a/cf/formatters/bytes_test.go +++ b/cf/formatters/bytes_test.go @@ -2,7 +2,7 @@ package formatters_test import ( . "code.cloudfoundry.org/cli/cf/formatters" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/formatters/formatters_suite_test.go b/cf/formatters/formatters_suite_test.go index 9d2236b2726..cfc282f00a2 100644 --- a/cf/formatters/formatters_suite_test.go +++ b/cf/formatters/formatters_suite_test.go @@ -3,7 +3,7 @@ package formatters_test import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/formatters/memoryLimit_test.go b/cf/formatters/memoryLimit_test.go index ee981c8f500..12e1af7f470 100644 --- a/cf/formatters/memoryLimit_test.go +++ b/cf/formatters/memoryLimit_test.go @@ -2,7 +2,7 @@ package formatters_test import ( . "code.cloudfoundry.org/cli/cf/formatters" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/help/help_suite_test.go b/cf/help/help_suite_test.go index 0ed0de93fad..8c631e6d77c 100644 --- a/cf/help/help_suite_test.go +++ b/cf/help/help_suite_test.go @@ -2,7 +2,7 @@ package help_test import ( "code.cloudfoundry.org/cli/cf/commandsloader" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/help/help_test.go b/cf/help/help_test.go index 8a5b5de1bdd..83a2c269be1 100644 --- a/cf/help/help_test.go +++ b/cf/help/help_test.go @@ -12,7 +12,7 @@ import ( "os" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/onsi/gomega/gbytes" ) diff --git a/cf/i18n/i18n_suite_test.go b/cf/i18n/i18n_suite_test.go index d00c86c0f49..ae75e715081 100644 --- a/cf/i18n/i18n_suite_test.go +++ b/cf/i18n/i18n_suite_test.go @@ -1,7 +1,7 @@ package i18n_test import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/i18n/locale_test.go b/cf/i18n/locale_test.go index 418d79c91b0..df8781dd85d 100644 --- a/cf/i18n/locale_test.go +++ b/cf/i18n/locale_test.go @@ -3,7 +3,7 @@ package i18n_test import ( "code.cloudfoundry.org/cli/cf/i18n" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/manifest/generate_manifest_test.go b/cf/manifest/generate_manifest_test.go index 2b6d9cfbb4d..78e35599267 100644 --- a/cf/manifest/generate_manifest_test.go +++ b/cf/manifest/generate_manifest_test.go @@ -6,7 +6,7 @@ import ( "bytes" . "code.cloudfoundry.org/cli/cf/manifest" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/manifest/manifest_disk_repository_test.go b/cf/manifest/manifest_disk_repository_test.go index 9ae516f1a7b..b59abaf8a5a 100644 --- a/cf/manifest/manifest_disk_repository_test.go +++ b/cf/manifest/manifest_disk_repository_test.go @@ -4,7 +4,7 @@ import ( "path/filepath" . "code.cloudfoundry.org/cli/cf/manifest" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/manifest/manifest_suite_test.go b/cf/manifest/manifest_suite_test.go index b5a7e3185c3..3e0fb18b5c2 100644 --- a/cf/manifest/manifest_suite_test.go +++ b/cf/manifest/manifest_suite_test.go @@ -3,7 +3,7 @@ package manifest_test import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/manifest/manifest_test.go b/cf/manifest/manifest_test.go index 8ea93170e16..aa31a10414d 100644 --- a/cf/manifest/manifest_test.go +++ b/cf/manifest/manifest_test.go @@ -6,7 +6,7 @@ import ( "code.cloudfoundry.org/cli/cf/manifest" "code.cloudfoundry.org/cli/util/generic" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" diff --git a/cf/models/application_test.go b/cf/models/application_test.go index d0fdb9efb82..ea7ad0ac178 100644 --- a/cf/models/application_test.go +++ b/cf/models/application_test.go @@ -4,7 +4,7 @@ import ( "os" . "code.cloudfoundry.org/cli/cf/models" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/models/domain_test.go b/cf/models/domain_test.go index da359bb2af9..251fa439906 100644 --- a/cf/models/domain_test.go +++ b/cf/models/domain_test.go @@ -2,7 +2,7 @@ package models_test import ( . "code.cloudfoundry.org/cli/cf/models" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/models/models_suite_test.go b/cf/models/models_suite_test.go index 2d4c6ded196..71cd775e549 100644 --- a/cf/models/models_suite_test.go +++ b/cf/models/models_suite_test.go @@ -1,7 +1,7 @@ package models_test import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/models/route_summary_test.go b/cf/models/route_summary_test.go index 4b9bd3ce4df..8b69e271aea 100644 --- a/cf/models/route_summary_test.go +++ b/cf/models/route_summary_test.go @@ -3,7 +3,7 @@ package models_test import ( "code.cloudfoundry.org/cli/cf/models" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/models/route_test.go b/cf/models/route_test.go index 9bd6b291777..9772ba8ac0c 100644 --- a/cf/models/route_test.go +++ b/cf/models/route_test.go @@ -3,7 +3,7 @@ package models_test import ( "code.cloudfoundry.org/cli/cf/models" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/models/service_instance_test.go b/cf/models/service_instance_test.go index a46217b8007..c58f8381287 100644 --- a/cf/models/service_instance_test.go +++ b/cf/models/service_instance_test.go @@ -2,7 +2,7 @@ package models_test import ( . "code.cloudfoundry.org/cli/cf/models" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/models/service_plan_test.go b/cf/models/service_plan_test.go index e446e93cff0..af9d8510b92 100644 --- a/cf/models/service_plan_test.go +++ b/cf/models/service_plan_test.go @@ -2,7 +2,7 @@ package models_test import ( . "code.cloudfoundry.org/cli/cf/models" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/net/cloud_controller_gateway_test.go b/cf/net/cloud_controller_gateway_test.go index d61ff7b6c26..cbf72f34db4 100644 --- a/cf/net/cloud_controller_gateway_test.go +++ b/cf/net/cloud_controller_gateway_test.go @@ -15,7 +15,7 @@ import ( testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" "code.cloudfoundry.org/cli/cf/trace/tracefakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/net/gateway_test.go b/cf/net/gateway_test.go index 88c957ca0b2..b1926c950f6 100644 --- a/cf/net/gateway_test.go +++ b/cf/net/gateway_test.go @@ -25,7 +25,7 @@ import ( testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" testnet "code.cloudfoundry.org/cli/cf/util/testhelpers/net" "code.cloudfoundry.org/cli/version" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/onsi/gomega/ghttp" ) diff --git a/cf/net/http_client_test.go b/cf/net/http_client_test.go index 63cb0c7c6cb..e1c5ff5c496 100644 --- a/cf/net/http_client_test.go +++ b/cf/net/http_client_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/cf/errors" . "code.cloudfoundry.org/cli/cf/net" "code.cloudfoundry.org/cli/cf/trace/tracefakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "golang.org/x/net/websocket" ) diff --git a/cf/net/net_suite_test.go b/cf/net/net_suite_test.go index 6c7da8e1cfa..8c16c8faf75 100644 --- a/cf/net/net_suite_test.go +++ b/cf/net/net_suite_test.go @@ -3,7 +3,7 @@ package net_test import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/net/progress_reader_test.go b/cf/net/progress_reader_test.go index 34e37541ade..3f5fecb9518 100644 --- a/cf/net/progress_reader_test.go +++ b/cf/net/progress_reader_test.go @@ -9,7 +9,7 @@ import ( . "code.cloudfoundry.org/cli/cf/net" "code.cloudfoundry.org/cli/cf/terminal/terminalfakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/net/request_dumper_test.go b/cf/net/request_dumper_test.go index 465f61e732d..97ff4513b49 100644 --- a/cf/net/request_dumper_test.go +++ b/cf/net/request_dumper_test.go @@ -7,7 +7,7 @@ import ( . "code.cloudfoundry.org/cli/cf/net" "code.cloudfoundry.org/cli/cf/trace" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/net/routing_api_gateway_test.go b/cf/net/routing_api_gateway_test.go index 92e77ea2f5c..86e1d57c714 100644 --- a/cf/net/routing_api_gateway_test.go +++ b/cf/net/routing_api_gateway_test.go @@ -12,7 +12,7 @@ import ( "code.cloudfoundry.org/cli/cf/terminal/terminalfakes" "code.cloudfoundry.org/cli/cf/trace/tracefakes" testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/net/uaa_gateway_test.go b/cf/net/uaa_gateway_test.go index 306007f2d72..79b92ca1f97 100644 --- a/cf/net/uaa_gateway_test.go +++ b/cf/net/uaa_gateway_test.go @@ -12,7 +12,7 @@ import ( "code.cloudfoundry.org/cli/cf/terminal/terminalfakes" "code.cloudfoundry.org/cli/cf/trace/tracefakes" testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/net/warnings_collector_test.go b/cf/net/warnings_collector_test.go index 8e62bc1de7b..81d434e9085 100644 --- a/cf/net/warnings_collector_test.go +++ b/cf/net/warnings_collector_test.go @@ -6,7 +6,7 @@ import ( "code.cloudfoundry.org/cli/cf/net" "code.cloudfoundry.org/cli/cf/net/netfakes" "code.cloudfoundry.org/cli/cf/terminal/terminalfakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/requirements/api_endpoint_test.go b/cf/requirements/api_endpoint_test.go index 32ff9d12d10..dd8ecd43f6d 100644 --- a/cf/requirements/api_endpoint_test.go +++ b/cf/requirements/api_endpoint_test.go @@ -4,7 +4,7 @@ import ( "code.cloudfoundry.org/cli/cf/configuration/coreconfig" . "code.cloudfoundry.org/cli/cf/requirements" testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/requirements/application_test.go b/cf/requirements/application_test.go index 7287bcda01a..de87d9fe455 100644 --- a/cf/requirements/application_test.go +++ b/cf/requirements/application_test.go @@ -5,7 +5,7 @@ import ( "code.cloudfoundry.org/cli/cf/errors" "code.cloudfoundry.org/cli/cf/models" . "code.cloudfoundry.org/cli/cf/requirements" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/requirements/buildpack_test.go b/cf/requirements/buildpack_test.go index f9128a0a1f7..b40e60e323c 100644 --- a/cf/requirements/buildpack_test.go +++ b/cf/requirements/buildpack_test.go @@ -4,7 +4,7 @@ import ( "code.cloudfoundry.org/cli/cf/api/apifakes" "code.cloudfoundry.org/cli/cf/models" . "code.cloudfoundry.org/cli/cf/requirements" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/requirements/config_refreshing_requirement_test.go b/cf/requirements/config_refreshing_requirement_test.go index 4bb706a6a35..3421504cc20 100644 --- a/cf/requirements/config_refreshing_requirement_test.go +++ b/cf/requirements/config_refreshing_requirement_test.go @@ -6,7 +6,7 @@ import ( "errors" "code.cloudfoundry.org/cli/cf/requirements/requirementsfakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/requirements/dea_application_test.go b/cf/requirements/dea_application_test.go index b3feee872d2..bc6b6122239 100644 --- a/cf/requirements/dea_application_test.go +++ b/cf/requirements/dea_application_test.go @@ -8,7 +8,7 @@ import ( "code.cloudfoundry.org/cli/cf/api/applications/applicationsfakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/requirements/domain_test.go b/cf/requirements/domain_test.go index c855b44dca8..20d31fc8871 100644 --- a/cf/requirements/domain_test.go +++ b/cf/requirements/domain_test.go @@ -7,7 +7,7 @@ import ( "code.cloudfoundry.org/cli/cf/models" . "code.cloudfoundry.org/cli/cf/requirements" testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/requirements/login_test.go b/cf/requirements/login_test.go index 0a8b19f6df6..68e18fd0a94 100644 --- a/cf/requirements/login_test.go +++ b/cf/requirements/login_test.go @@ -3,7 +3,7 @@ package requirements_test import ( "code.cloudfoundry.org/cli/cf/configuration/coreconfig" . "code.cloudfoundry.org/cli/cf/requirements" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" diff --git a/cf/requirements/max_api_version_test.go b/cf/requirements/max_api_version_test.go index f02bcb5898e..00d0465b348 100644 --- a/cf/requirements/max_api_version_test.go +++ b/cf/requirements/max_api_version_test.go @@ -7,7 +7,7 @@ import ( testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/requirements/min_api_version_test.go b/cf/requirements/min_api_version_test.go index 0a5219f141d..4041ed37200 100644 --- a/cf/requirements/min_api_version_test.go +++ b/cf/requirements/min_api_version_test.go @@ -7,7 +7,7 @@ import ( testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/requirements/number_arguments_test.go b/cf/requirements/number_arguments_test.go index 8725a373c0a..6e1e8e82fb8 100644 --- a/cf/requirements/number_arguments_test.go +++ b/cf/requirements/number_arguments_test.go @@ -3,7 +3,7 @@ package requirements_test import ( . "code.cloudfoundry.org/cli/cf/requirements" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/requirements/organization_test.go b/cf/requirements/organization_test.go index 22a0580200f..6830194f6ff 100644 --- a/cf/requirements/organization_test.go +++ b/cf/requirements/organization_test.go @@ -6,7 +6,7 @@ import ( "code.cloudfoundry.org/cli/cf/api/organizations/organizationsfakes" "code.cloudfoundry.org/cli/cf/models" . "code.cloudfoundry.org/cli/cf/requirements" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/requirements/requirements_suite_test.go b/cf/requirements/requirements_suite_test.go index 7d694ce9fff..410c11929dc 100644 --- a/cf/requirements/requirements_suite_test.go +++ b/cf/requirements/requirements_suite_test.go @@ -3,7 +3,7 @@ package requirements_test import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/requirements/requirements_test.go b/cf/requirements/requirements_test.go index 727da97f6fe..bda87e4e11b 100644 --- a/cf/requirements/requirements_test.go +++ b/cf/requirements/requirements_test.go @@ -5,7 +5,7 @@ import ( "code.cloudfoundry.org/cli/cf/requirements/requirementsfakes" "errors" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/requirements/service_instance_test.go b/cf/requirements/service_instance_test.go index 59cad62514a..da164134082 100644 --- a/cf/requirements/service_instance_test.go +++ b/cf/requirements/service_instance_test.go @@ -5,7 +5,7 @@ import ( "code.cloudfoundry.org/cli/cf/errors" "code.cloudfoundry.org/cli/cf/models" . "code.cloudfoundry.org/cli/cf/requirements" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/requirements/space_test.go b/cf/requirements/space_test.go index 59f8b37bc9a..99cb6a34c85 100644 --- a/cf/requirements/space_test.go +++ b/cf/requirements/space_test.go @@ -6,7 +6,7 @@ import ( "code.cloudfoundry.org/cli/cf/api/spaces/spacesfakes" "code.cloudfoundry.org/cli/cf/models" . "code.cloudfoundry.org/cli/cf/requirements" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/requirements/targeted_organization_test.go b/cf/requirements/targeted_organization_test.go index a441477e9fd..6ffa2bde52d 100644 --- a/cf/requirements/targeted_organization_test.go +++ b/cf/requirements/targeted_organization_test.go @@ -7,7 +7,7 @@ import ( testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" . "code.cloudfoundry.org/cli/cf/requirements" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/requirements/targeted_space_test.go b/cf/requirements/targeted_space_test.go index 97826b03fd3..09e5ecae3dd 100644 --- a/cf/requirements/targeted_space_test.go +++ b/cf/requirements/targeted_space_test.go @@ -5,7 +5,7 @@ import ( "code.cloudfoundry.org/cli/cf/models" . "code.cloudfoundry.org/cli/cf/requirements" testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/requirements/unsupported_legacy_flag_test.go b/cf/requirements/unsupported_legacy_flag_test.go index 072ae4a8ddd..1cd17b8b50e 100644 --- a/cf/requirements/unsupported_legacy_flag_test.go +++ b/cf/requirements/unsupported_legacy_flag_test.go @@ -3,7 +3,7 @@ package requirements_test import ( "code.cloudfoundry.org/cli/cf/requirements" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/requirements/usage_requirement_test.go b/cf/requirements/usage_requirement_test.go index 44300021683..67bfe9d7708 100644 --- a/cf/requirements/usage_requirement_test.go +++ b/cf/requirements/usage_requirement_test.go @@ -2,7 +2,7 @@ package requirements_test import ( . "code.cloudfoundry.org/cli/cf/requirements" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/requirements/user_test.go b/cf/requirements/user_test.go index cacd18a2a0e..cc3956c1685 100644 --- a/cf/requirements/user_test.go +++ b/cf/requirements/user_test.go @@ -8,7 +8,7 @@ import ( "code.cloudfoundry.org/cli/cf/api/apifakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/ssh/options/options_suite_test.go b/cf/ssh/options/options_suite_test.go index a928cbe1095..890967e4ea1 100644 --- a/cf/ssh/options/options_suite_test.go +++ b/cf/ssh/options/options_suite_test.go @@ -1,7 +1,7 @@ package options_test import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/ssh/options/ssh_options_test.go b/cf/ssh/options/ssh_options_test.go index 4f77b1dd700..914e3fcf359 100644 --- a/cf/ssh/options/ssh_options_test.go +++ b/cf/ssh/options/ssh_options_test.go @@ -4,7 +4,7 @@ import ( "code.cloudfoundry.org/cli/cf/flags" "code.cloudfoundry.org/cli/cf/ssh/options" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/ssh/ssh_suite_test.go b/cf/ssh/ssh_suite_test.go index d1e7ac87141..89e007eb471 100644 --- a/cf/ssh/ssh_suite_test.go +++ b/cf/ssh/ssh_suite_test.go @@ -4,7 +4,7 @@ import ( "io/ioutil" "path/filepath" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "golang.org/x/crypto/ssh" diff --git a/cf/ssh/ssh_test.go b/cf/ssh/ssh_test.go index 7d16ea674f0..f430cb8e696 100644 --- a/cf/ssh/ssh_test.go +++ b/cf/ssh/ssh_test.go @@ -33,7 +33,7 @@ import ( "github.com/moby/term" "golang.org/x/crypto/ssh" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/ssh/terminal/helper_test.go b/cf/ssh/terminal/helper_test.go index 758962b1a2e..9c243435407 100644 --- a/cf/ssh/terminal/helper_test.go +++ b/cf/ssh/terminal/helper_test.go @@ -3,7 +3,7 @@ package terminal_test import ( "code.cloudfoundry.org/cli/cf/ssh/terminal" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/ssh/terminal/terminal_suite_test.go b/cf/ssh/terminal/terminal_suite_test.go index 7ae041f713c..6707582b58a 100644 --- a/cf/ssh/terminal/terminal_suite_test.go +++ b/cf/ssh/terminal/terminal_suite_test.go @@ -1,7 +1,7 @@ package terminal_test import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/terminal/color_test.go b/cf/terminal/color_test.go index 8e6aadc86af..a69a675b6bb 100644 --- a/cf/terminal/color_test.go +++ b/cf/terminal/color_test.go @@ -5,7 +5,7 @@ import ( . "code.cloudfoundry.org/cli/cf/terminal" "github.com/fatih/color" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/terminal/table_test.go b/cf/terminal/table_test.go index d893d7a3b4d..542c1e7bcea 100644 --- a/cf/terminal/table_test.go +++ b/cf/terminal/table_test.go @@ -6,7 +6,7 @@ import ( . "code.cloudfoundry.org/cli/cf/terminal" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/terminal/tee_printer_test.go b/cf/terminal/tee_printer_test.go index 17e1dca58ed..da6d70eb764 100644 --- a/cf/terminal/tee_printer_test.go +++ b/cf/terminal/tee_printer_test.go @@ -6,7 +6,7 @@ import ( . "code.cloudfoundry.org/cli/cf/terminal" io_helpers "code.cloudfoundry.org/cli/cf/util/testhelpers/io" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/onsi/gomega/gbytes" ) diff --git a/cf/terminal/terminal_suite_test.go b/cf/terminal/terminal_suite_test.go index 056b2718c86..611d5c1b14a 100644 --- a/cf/terminal/terminal_suite_test.go +++ b/cf/terminal/terminal_suite_test.go @@ -3,7 +3,7 @@ package terminal_test import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/terminal/ui_test.go b/cf/terminal/ui_test.go index e3bfea5ebf3..33e803c49b4 100644 --- a/cf/terminal/ui_test.go +++ b/cf/terminal/ui_test.go @@ -18,7 +18,7 @@ import ( . "code.cloudfoundry.org/cli/cf/terminal" "code.cloudfoundry.org/cli/cf/trace" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/onsi/gomega/gbytes" ) diff --git a/cf/trace/combined_printer_test.go b/cf/trace/combined_printer_test.go index 0fea6714a42..33d4dc420da 100644 --- a/cf/trace/combined_printer_test.go +++ b/cf/trace/combined_printer_test.go @@ -5,7 +5,7 @@ import ( "code.cloudfoundry.org/cli/cf/trace/tracefakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/trace/logger_provider_test.go b/cf/trace/logger_provider_test.go index 9a3271446ff..2e1198fd443 100644 --- a/cf/trace/logger_provider_test.go +++ b/cf/trace/logger_provider_test.go @@ -10,7 +10,7 @@ import ( "os" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/onsi/gomega/gbytes" ) diff --git a/cf/trace/trace_suite_test.go b/cf/trace/trace_suite_test.go index a874d42e876..c8c3731a11c 100644 --- a/cf/trace/trace_suite_test.go +++ b/cf/trace/trace_suite_test.go @@ -3,7 +3,7 @@ package trace_test import ( "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/trace/trace_test.go b/cf/trace/trace_test.go index 5b7f38f74d5..3d5aa9f628a 100644 --- a/cf/trace/trace_test.go +++ b/cf/trace/trace_test.go @@ -2,7 +2,7 @@ package trace_test import ( . "code.cloudfoundry.org/cli/cf/trace" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/uihelpers/tags_parser_test.go b/cf/uihelpers/tags_parser_test.go index 5c11de8822a..11e01e09f2d 100644 --- a/cf/uihelpers/tags_parser_test.go +++ b/cf/uihelpers/tags_parser_test.go @@ -2,7 +2,7 @@ package uihelpers_test import ( . "code.cloudfoundry.org/cli/cf/uihelpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/uihelpers/ui_helpers_suite_test.go b/cf/uihelpers/ui_helpers_suite_test.go index d2c3d75d4c8..5c35f8774e7 100644 --- a/cf/uihelpers/ui_helpers_suite_test.go +++ b/cf/uihelpers/ui_helpers_suite_test.go @@ -1,7 +1,7 @@ package uihelpers_test import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/util/downloader/file_download_test.go b/cf/util/downloader/file_download_test.go index 64fb2a4e6d9..1cf3a440c8a 100644 --- a/cf/util/downloader/file_download_test.go +++ b/cf/util/downloader/file_download_test.go @@ -10,7 +10,7 @@ import ( "github.com/onsi/gomega/ghttp" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/util/downloader/fileutils_suite_test.go b/cf/util/downloader/fileutils_suite_test.go index 4bcde26ee9b..e554aa37a84 100644 --- a/cf/util/downloader/fileutils_suite_test.go +++ b/cf/util/downloader/fileutils_suite_test.go @@ -1,7 +1,7 @@ package downloader_test import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/util/glob/glob_test.go b/cf/util/glob/glob_test.go index 41e54b33b90..d80a31a9002 100644 --- a/cf/util/glob/glob_test.go +++ b/cf/util/glob/glob_test.go @@ -3,7 +3,7 @@ package glob import ( "testing" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/util/json/json_parser_test.go b/cf/util/json/json_parser_test.go index d77d12ef657..2a79a289ca2 100644 --- a/cf/util/json/json_parser_test.go +++ b/cf/util/json/json_parser_test.go @@ -5,7 +5,7 @@ import ( "os" "code.cloudfoundry.org/cli/cf/util/json" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/util/json/json_suite_test.go b/cf/util/json/json_suite_test.go index 9ea25dd8a26..03b6108b0b2 100644 --- a/cf/util/json/json_suite_test.go +++ b/cf/util/json/json_suite_test.go @@ -1,7 +1,7 @@ package json_test import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/util/spellcheck/spellcheck_suite_test.go b/cf/util/spellcheck/spellcheck_suite_test.go index d3441a7c1f0..b1a60fd89c5 100644 --- a/cf/util/spellcheck/spellcheck_suite_test.go +++ b/cf/util/spellcheck/spellcheck_suite_test.go @@ -1,7 +1,7 @@ package spellcheck_test import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/util/spellcheck/spellcheck_test.go b/cf/util/spellcheck/spellcheck_test.go index f8c1abfbe5b..40e4cb8cc21 100644 --- a/cf/util/spellcheck/spellcheck_test.go +++ b/cf/util/spellcheck/spellcheck_test.go @@ -3,7 +3,7 @@ package spellcheck_test import ( . "code.cloudfoundry.org/cli/cf/util/spellcheck" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/util/testhelpers/io/io_test.go b/cf/util/testhelpers/io/io_test.go index da4c78b6e6f..505ee413ed6 100644 --- a/cf/util/testhelpers/io/io_test.go +++ b/cf/util/testhelpers/io/io_test.go @@ -5,7 +5,7 @@ import ( "strings" . "code.cloudfoundry.org/cli/cf/util/testhelpers/io" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/util/testhelpers/io/suite_test.go b/cf/util/testhelpers/io/suite_test.go index e7f78b3be80..9c6d911db62 100644 --- a/cf/util/testhelpers/io/suite_test.go +++ b/cf/util/testhelpers/io/suite_test.go @@ -1,7 +1,7 @@ package io_test import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/util/testhelpers/matchers/be_in_display_order_test.go b/cf/util/testhelpers/matchers/be_in_display_order_test.go index 0a4e65e4a12..168ddd8ec67 100644 --- a/cf/util/testhelpers/matchers/be_in_display_order_test.go +++ b/cf/util/testhelpers/matchers/be_in_display_order_test.go @@ -5,7 +5,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/util/testhelpers/matchers/contain_element_times_test.go b/cf/util/testhelpers/matchers/contain_element_times_test.go index d862f0c73ab..3d9ab6b1e99 100644 --- a/cf/util/testhelpers/matchers/contain_element_times_test.go +++ b/cf/util/testhelpers/matchers/contain_element_times_test.go @@ -2,7 +2,7 @@ package matchers_test import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/util/testhelpers/matchers/contain_elements_in_order_test.go b/cf/util/testhelpers/matchers/contain_elements_in_order_test.go index 9cba9e8ad8a..55f3363c1bf 100644 --- a/cf/util/testhelpers/matchers/contain_elements_in_order_test.go +++ b/cf/util/testhelpers/matchers/contain_elements_in_order_test.go @@ -2,7 +2,7 @@ package matchers_test import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/util/testhelpers/matchers/have_type_of_test.go b/cf/util/testhelpers/matchers/have_type_of_test.go index e9e34765738..a058e4ea6e2 100644 --- a/cf/util/testhelpers/matchers/have_type_of_test.go +++ b/cf/util/testhelpers/matchers/have_type_of_test.go @@ -2,7 +2,7 @@ package matchers_test import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" "github.com/onsi/gomega" . "github.com/onsi/gomega" ) diff --git a/cf/util/testhelpers/matchers/match_func_name_test.go b/cf/util/testhelpers/matchers/match_func_name_test.go index c5b6e942c87..723ebdc964c 100644 --- a/cf/util/testhelpers/matchers/match_func_name_test.go +++ b/cf/util/testhelpers/matchers/match_func_name_test.go @@ -4,7 +4,7 @@ import ( "errors" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" "github.com/onsi/gomega" . "github.com/onsi/gomega" ) diff --git a/cf/util/testhelpers/matchers/match_path_test.go b/cf/util/testhelpers/matchers/match_path_test.go index 03146318811..aaaf2ec90cc 100644 --- a/cf/util/testhelpers/matchers/match_path_test.go +++ b/cf/util/testhelpers/matchers/match_path_test.go @@ -3,7 +3,7 @@ package matchers_test import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "errors" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" "github.com/onsi/gomega" . "github.com/onsi/gomega" "io/ioutil" diff --git a/cf/util/testhelpers/matchers/matchers_suite_test.go b/cf/util/testhelpers/matchers/matchers_suite_test.go index 4d11b6a2147..e85892796fa 100644 --- a/cf/util/testhelpers/matchers/matchers_suite_test.go +++ b/cf/util/testhelpers/matchers/matchers_suite_test.go @@ -1,7 +1,7 @@ package matchers_test import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/cf/util/testhelpers/net/request_matcher.go b/cf/util/testhelpers/net/request_matcher.go index 84950c2570e..e4d5b1ad5e4 100644 --- a/cf/util/testhelpers/net/request_matcher.go +++ b/cf/util/testhelpers/net/request_matcher.go @@ -7,7 +7,7 @@ import ( "net/http" "strings" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/util/testhelpers/net/server.go b/cf/util/testhelpers/net/server.go index 09ce8e811c3..7f31eeeabc6 100644 --- a/cf/util/testhelpers/net/server.go +++ b/cf/util/testhelpers/net/server.go @@ -7,7 +7,7 @@ import ( "net/url" "strings" - "github.com/onsi/ginkgo" + "github.com/onsi/ginkgo/v2" ) type TestRequest struct { diff --git a/command/api_version_warning_test.go b/command/api_version_warning_test.go index 04cf3a21e6b..c8cd96b58fb 100644 --- a/command/api_version_warning_test.go +++ b/command/api_version_warning_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/util/ui" "code.cloudfoundry.org/cli/version" "github.com/blang/semver/v4" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/command_suite_test.go b/command/command_suite_test.go index 33fb4da90fb..af257e39a12 100644 --- a/command/command_suite_test.go +++ b/command/command_suite_test.go @@ -1,7 +1,7 @@ package command_test import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/command/common/command_list_v7_test.go b/command/common/command_list_v7_test.go index 50acdce0ec4..23bfe58082e 100644 --- a/command/common/command_list_v7_test.go +++ b/command/common/command_list_v7_test.go @@ -2,7 +2,7 @@ package common_test import ( . "code.cloudfoundry.org/cli/command/common" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/common/common_suite_test.go b/command/common/common_suite_test.go index 32e4b98071d..4f17bfab8ae 100644 --- a/command/common/common_suite_test.go +++ b/command/common/common_suite_test.go @@ -1,7 +1,7 @@ package common_test import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" log "github.com/sirupsen/logrus" diff --git a/command/common/install_plugin_command_test.go b/command/common/install_plugin_command_test.go index 9e29befb9e6..24880301f35 100644 --- a/command/common/install_plugin_command_test.go +++ b/command/common/install_plugin_command_test.go @@ -14,7 +14,7 @@ import ( "code.cloudfoundry.org/cli/command/translatableerror" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/common/install_plugin_from_repo_command_test.go b/command/common/install_plugin_from_repo_command_test.go index 11fe6bd9e80..b9e61609492 100644 --- a/command/common/install_plugin_from_repo_command_test.go +++ b/command/common/install_plugin_from_repo_command_test.go @@ -21,8 +21,8 @@ import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/common/internal/help_all_display_test.go b/command/common/internal/help_all_display_test.go index ee812d6d1cf..bb93ffb9ce9 100644 --- a/command/common/internal/help_all_display_test.go +++ b/command/common/internal/help_all_display_test.go @@ -6,7 +6,7 @@ import ( "code.cloudfoundry.org/cli/command/common" "code.cloudfoundry.org/cli/command/common/internal" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/common/internal/internal_suite_test.go b/command/common/internal/internal_suite_test.go index 86d6b32f524..b38fb2bd915 100644 --- a/command/common/internal/internal_suite_test.go +++ b/command/common/internal/internal_suite_test.go @@ -3,7 +3,7 @@ package internal_test import ( "testing" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/common/version_command_test.go b/command/common/version_command_test.go index a6f3b6d8b34..9db08671ad9 100644 --- a/command/common/version_command_test.go +++ b/command/common/version_command_test.go @@ -5,7 +5,7 @@ import ( . "code.cloudfoundry.org/cli/command/common" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/flag/app_type_test.go b/command/flag/app_type_test.go index cfd3a36b904..cceaba6bea8 100644 --- a/command/flag/app_type_test.go +++ b/command/flag/app_type_test.go @@ -3,8 +3,7 @@ package flag_test import ( . "code.cloudfoundry.org/cli/command/flag" flags "github.com/jessevdk/go-flags" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/flag/binding_name_test.go b/command/flag/binding_name_test.go index 0a01d0b95a6..6bba5ef984a 100644 --- a/command/flag/binding_name_test.go +++ b/command/flag/binding_name_test.go @@ -3,7 +3,7 @@ package flag_test import ( . "code.cloudfoundry.org/cli/command/flag" flags "github.com/jessevdk/go-flags" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/flag/buildpack_test.go b/command/flag/buildpack_test.go index 11ab0374d78..2910227b642 100644 --- a/command/flag/buildpack_test.go +++ b/command/flag/buildpack_test.go @@ -2,7 +2,7 @@ package flag_test import ( . "code.cloudfoundry.org/cli/command/flag" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/flag/bytes_with_unlimited_test.go b/command/flag/bytes_with_unlimited_test.go index b200a6f40bb..1a52f412164 100644 --- a/command/flag/bytes_with_unlimited_test.go +++ b/command/flag/bytes_with_unlimited_test.go @@ -3,7 +3,7 @@ package flag_test import ( . "code.cloudfoundry.org/cli/command/flag" flags "github.com/jessevdk/go-flags" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/flag/color_test.go b/command/flag/color_test.go index 104975e5fa8..2a007ba6207 100644 --- a/command/flag/color_test.go +++ b/command/flag/color_test.go @@ -3,8 +3,7 @@ package flag_test import ( . "code.cloudfoundry.org/cli/command/flag" flags "github.com/jessevdk/go-flags" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/flag/command_test.go b/command/flag/command_test.go index dd5a2f54971..522e43c56fb 100644 --- a/command/flag/command_test.go +++ b/command/flag/command_test.go @@ -2,7 +2,7 @@ package flag_test import ( . "code.cloudfoundry.org/cli/command/flag" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/flag/credentials_or_json_test.go b/command/flag/credentials_or_json_test.go index f962d8b1a97..aff6b28cf1b 100644 --- a/command/flag/credentials_or_json_test.go +++ b/command/flag/credentials_or_json_test.go @@ -6,8 +6,8 @@ import ( . "code.cloudfoundry.org/cli/command/flag" flags "github.com/jessevdk/go-flags" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/flag/deployment_strategy_test.go b/command/flag/deployment_strategy_test.go index 78846b11c59..d8f8ad229a5 100644 --- a/command/flag/deployment_strategy_test.go +++ b/command/flag/deployment_strategy_test.go @@ -4,8 +4,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" . "code.cloudfoundry.org/cli/command/flag" flags "github.com/jessevdk/go-flags" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/flag/docker_test.go b/command/flag/docker_test.go index 510071e0741..ddfb59c896f 100644 --- a/command/flag/docker_test.go +++ b/command/flag/docker_test.go @@ -3,7 +3,7 @@ package flag_test import ( . "code.cloudfoundry.org/cli/command/flag" flags "github.com/jessevdk/go-flags" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/flag/droplet_test.go b/command/flag/droplet_test.go index 0fd86977c16..1d3f2562bbd 100644 --- a/command/flag/droplet_test.go +++ b/command/flag/droplet_test.go @@ -2,7 +2,7 @@ package flag_test import ( . "code.cloudfoundry.org/cli/command/flag" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/flag/environment_variable_test.go b/command/flag/environment_variable_test.go index 803316fe002..30249af3454 100644 --- a/command/flag/environment_variable_test.go +++ b/command/flag/environment_variable_test.go @@ -10,7 +10,7 @@ import ( . "code.cloudfoundry.org/cli/command/flag" flags "github.com/jessevdk/go-flags" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/flag/flag_suite_test.go b/command/flag/flag_suite_test.go index 7254810be22..9bed6008825 100644 --- a/command/flag/flag_suite_test.go +++ b/command/flag/flag_suite_test.go @@ -4,7 +4,7 @@ import ( "io/ioutil" "os" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/command/flag/health_check_type_test.go b/command/flag/health_check_type_test.go index f96ab6c0e44..c381233924d 100644 --- a/command/flag/health_check_type_test.go +++ b/command/flag/health_check_type_test.go @@ -4,8 +4,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" . "code.cloudfoundry.org/cli/command/flag" flags "github.com/jessevdk/go-flags" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/flag/health_check_type_with_deprecated_value_test.go b/command/flag/health_check_type_with_deprecated_value_test.go index 7645fe0e424..21fbb122385 100644 --- a/command/flag/health_check_type_with_deprecated_value_test.go +++ b/command/flag/health_check_type_with_deprecated_value_test.go @@ -3,8 +3,7 @@ package flag_test import ( . "code.cloudfoundry.org/cli/command/flag" flags "github.com/jessevdk/go-flags" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/flag/instances_test.go b/command/flag/instances_test.go index d93af82d32b..10dd691de6c 100644 --- a/command/flag/instances_test.go +++ b/command/flag/instances_test.go @@ -4,7 +4,7 @@ import ( . "code.cloudfoundry.org/cli/command/flag" "code.cloudfoundry.org/cli/types" flags "github.com/jessevdk/go-flags" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/flag/integer_limit_test.go b/command/flag/integer_limit_test.go index 1b84afe5c15..9fae1ecc6b1 100644 --- a/command/flag/integer_limit_test.go +++ b/command/flag/integer_limit_test.go @@ -3,7 +3,7 @@ package flag_test import ( . "code.cloudfoundry.org/cli/command/flag" flags "github.com/jessevdk/go-flags" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/flag/locale_test.go b/command/flag/locale_test.go index 309ba7c98dd..5209068bdae 100644 --- a/command/flag/locale_test.go +++ b/command/flag/locale_test.go @@ -3,8 +3,7 @@ package flag_test import ( . "code.cloudfoundry.org/cli/command/flag" flags "github.com/jessevdk/go-flags" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/flag/megabytes_test.go b/command/flag/megabytes_test.go index 385efc921f4..6a43936dd3e 100644 --- a/command/flag/megabytes_test.go +++ b/command/flag/megabytes_test.go @@ -3,7 +3,7 @@ package flag_test import ( . "code.cloudfoundry.org/cli/command/flag" flags "github.com/jessevdk/go-flags" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/flag/megabytes_with_unlimited_test.go b/command/flag/megabytes_with_unlimited_test.go index 3d47ba73e31..cd4550df06b 100644 --- a/command/flag/megabytes_with_unlimited_test.go +++ b/command/flag/megabytes_with_unlimited_test.go @@ -3,7 +3,7 @@ package flag_test import ( . "code.cloudfoundry.org/cli/command/flag" flags "github.com/jessevdk/go-flags" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/flag/network_port_test.go b/command/flag/network_port_test.go index 03454f2d8e8..5f709893e92 100644 --- a/command/flag/network_port_test.go +++ b/command/flag/network_port_test.go @@ -3,8 +3,7 @@ package flag_test import ( . "code.cloudfoundry.org/cli/command/flag" flags "github.com/jessevdk/go-flags" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/flag/network_protocol_test.go b/command/flag/network_protocol_test.go index 3d11aa4982b..ae7e99135e1 100644 --- a/command/flag/network_protocol_test.go +++ b/command/flag/network_protocol_test.go @@ -3,8 +3,7 @@ package flag_test import ( . "code.cloudfoundry.org/cli/command/flag" flags "github.com/jessevdk/go-flags" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/flag/optional_string_test.go b/command/flag/optional_string_test.go index 528178ad2af..971337a7bcc 100644 --- a/command/flag/optional_string_test.go +++ b/command/flag/optional_string_test.go @@ -2,7 +2,7 @@ package flag_test import ( . "code.cloudfoundry.org/cli/command/flag" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/flag/org_role_test.go b/command/flag/org_role_test.go index 4c8402c824e..6fad9f76fb2 100644 --- a/command/flag/org_role_test.go +++ b/command/flag/org_role_test.go @@ -3,8 +3,7 @@ package flag_test import ( . "code.cloudfoundry.org/cli/command/flag" flags "github.com/jessevdk/go-flags" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/gomega" ) diff --git a/command/flag/path_test.go b/command/flag/path_test.go index 75ab2453b4a..00df2b26b18 100644 --- a/command/flag/path_test.go +++ b/command/flag/path_test.go @@ -9,7 +9,7 @@ import ( "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" . "code.cloudfoundry.org/cli/command/flag" flags "github.com/jessevdk/go-flags" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/flag/port_test.go b/command/flag/port_test.go index c2921565359..3a4c6e182f7 100644 --- a/command/flag/port_test.go +++ b/command/flag/port_test.go @@ -4,7 +4,7 @@ import ( . "code.cloudfoundry.org/cli/command/flag" "code.cloudfoundry.org/cli/types" flags "github.com/jessevdk/go-flags" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/flag/positive_integer_test.go b/command/flag/positive_integer_test.go index 256a4201bac..9154fb9ec99 100644 --- a/command/flag/positive_integer_test.go +++ b/command/flag/positive_integer_test.go @@ -2,7 +2,7 @@ package flag_test import ( flags "github.com/jessevdk/go-flags" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "code.cloudfoundry.org/cli/command/flag" diff --git a/command/flag/revision_test.go b/command/flag/revision_test.go index f6c1993ce88..9fb898ec140 100644 --- a/command/flag/revision_test.go +++ b/command/flag/revision_test.go @@ -4,7 +4,7 @@ import ( . "code.cloudfoundry.org/cli/command/flag" "code.cloudfoundry.org/cli/types" flags "github.com/jessevdk/go-flags" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/flag/route_path_test.go b/command/flag/route_path_test.go index 60766c2fc0c..cbdc440c3f2 100644 --- a/command/flag/route_path_test.go +++ b/command/flag/route_path_test.go @@ -2,7 +2,7 @@ package flag_test import ( . "code.cloudfoundry.org/cli/command/flag" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/flag/security_group_lifecycle_test.go b/command/flag/security_group_lifecycle_test.go index 570396acd70..1f7a61d075f 100644 --- a/command/flag/security_group_lifecycle_test.go +++ b/command/flag/security_group_lifecycle_test.go @@ -3,8 +3,7 @@ package flag_test import ( . "code.cloudfoundry.org/cli/command/flag" flags "github.com/jessevdk/go-flags" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/flag/space_role_test.go b/command/flag/space_role_test.go index 97f0bea9a3b..7a01de22c3b 100644 --- a/command/flag/space_role_test.go +++ b/command/flag/space_role_test.go @@ -3,8 +3,7 @@ package flag_test import ( . "code.cloudfoundry.org/cli/command/flag" flags "github.com/jessevdk/go-flags" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/flag/ssh_port_forwarding_test.go b/command/flag/ssh_port_forwarding_test.go index cac98d2a0e1..3d9c79708a0 100644 --- a/command/flag/ssh_port_forwarding_test.go +++ b/command/flag/ssh_port_forwarding_test.go @@ -5,8 +5,8 @@ import ( . "code.cloudfoundry.org/cli/command/flag" flags "github.com/jessevdk/go-flags" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/flag/tags_test.go b/command/flag/tags_test.go index 8d2f1120623..71a133cff39 100644 --- a/command/flag/tags_test.go +++ b/command/flag/tags_test.go @@ -2,7 +2,7 @@ package flag_test import ( . "code.cloudfoundry.org/cli/command/flag" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/flag/timeout_test.go b/command/flag/timeout_test.go index a24caadb81e..82245063c24 100644 --- a/command/flag/timeout_test.go +++ b/command/flag/timeout_test.go @@ -2,7 +2,7 @@ package flag_test import ( flags "github.com/jessevdk/go-flags" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "code.cloudfoundry.org/cli/command/flag" diff --git a/command/flag/trimmed_string_test.go b/command/flag/trimmed_string_test.go index 376ff303b04..c1345e32cbb 100644 --- a/command/flag/trimmed_string_test.go +++ b/command/flag/trimmed_string_test.go @@ -2,7 +2,7 @@ package flag_test import ( . "code.cloudfoundry.org/cli/command/flag" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/minimum_version_check_test.go b/command/minimum_version_check_test.go index 8ae9fc914d2..61aaa94450b 100644 --- a/command/minimum_version_check_test.go +++ b/command/minimum_version_check_test.go @@ -5,7 +5,7 @@ import ( "code.cloudfoundry.org/cli/command/translatableerror" "code.cloudfoundry.org/cli/version" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/plugin/add_plugin_repo_command_test.go b/command/plugin/add_plugin_repo_command_test.go index 81851357b9a..1197642d203 100644 --- a/command/plugin/add_plugin_repo_command_test.go +++ b/command/plugin/add_plugin_repo_command_test.go @@ -6,7 +6,7 @@ import ( . "code.cloudfoundry.org/cli/command/plugin" "code.cloudfoundry.org/cli/command/plugin/pluginfakes" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/plugin/plugin_suite_test.go b/command/plugin/plugin_suite_test.go index ff9b49859d0..78b837b48ed 100644 --- a/command/plugin/plugin_suite_test.go +++ b/command/plugin/plugin_suite_test.go @@ -1,7 +1,7 @@ package plugin_test import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/command/plugin/plugins_command_test.go b/command/plugin/plugins_command_test.go index ac522ad244a..699abd804ef 100644 --- a/command/plugin/plugins_command_test.go +++ b/command/plugin/plugins_command_test.go @@ -12,7 +12,7 @@ import ( "code.cloudfoundry.org/cli/command/translatableerror" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/plugin/uninstall_plugin_command_test.go b/command/plugin/uninstall_plugin_command_test.go index 3438c35b71d..ca15844dff2 100644 --- a/command/plugin/uninstall_plugin_command_test.go +++ b/command/plugin/uninstall_plugin_command_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/command/translatableerror" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/translatableerror/convert_to_translatable_error_test.go b/command/translatableerror/convert_to_translatable_error_test.go index a68c3cd9621..5cb7603b8e3 100644 --- a/command/translatableerror/convert_to_translatable_error_test.go +++ b/command/translatableerror/convert_to_translatable_error_test.go @@ -13,8 +13,8 @@ import ( "code.cloudfoundry.org/cli/util/clissh/ssherror" "code.cloudfoundry.org/cli/util/download" "code.cloudfoundry.org/cli/util/manifest" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/translatableerror/minimum_cf_api_version_not_met_error_test.go b/command/translatableerror/minimum_cf_api_version_not_met_error_test.go index ff6ba6e431b..8d8e06416b5 100644 --- a/command/translatableerror/minimum_cf_api_version_not_met_error_test.go +++ b/command/translatableerror/minimum_cf_api_version_not_met_error_test.go @@ -3,7 +3,7 @@ package translatableerror_test import ( . "code.cloudfoundry.org/cli/command/translatableerror" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/translatableerror/minimum_cli_version_not_met_error_test.go b/command/translatableerror/minimum_cli_version_not_met_error_test.go index 03dd6b4e229..a237531625f 100644 --- a/command/translatableerror/minimum_cli_version_not_met_error_test.go +++ b/command/translatableerror/minimum_cli_version_not_met_error_test.go @@ -3,7 +3,7 @@ package translatableerror_test import ( . "code.cloudfoundry.org/cli/command/translatableerror" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/translatableerror/minimum_uaa_api_version_not_met_error_test.go b/command/translatableerror/minimum_uaa_api_version_not_met_error_test.go index 2190e74b05c..f79c98834be 100644 --- a/command/translatableerror/minimum_uaa_api_version_not_met_error_test.go +++ b/command/translatableerror/minimum_uaa_api_version_not_met_error_test.go @@ -3,7 +3,7 @@ package translatableerror_test import ( . "code.cloudfoundry.org/cli/command/translatableerror" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/translatableerror/missing_credential_error_test.go b/command/translatableerror/missing_credential_error_test.go index a3225d84150..1353cd4f9ee 100644 --- a/command/translatableerror/missing_credential_error_test.go +++ b/command/translatableerror/missing_credential_error_test.go @@ -3,7 +3,7 @@ package translatableerror_test import ( . "code.cloudfoundry.org/cli/command/translatableerror" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/translatableerror/service_instance_not_shareable_error_test.go b/command/translatableerror/service_instance_not_shareable_error_test.go index cf0149f5473..6394d787ee1 100644 --- a/command/translatableerror/service_instance_not_shareable_error_test.go +++ b/command/translatableerror/service_instance_not_shareable_error_test.go @@ -2,7 +2,7 @@ package translatableerror_test import ( . "code.cloudfoundry.org/cli/command/translatableerror" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/translatableerror/service_plan_not_found_error_test.go b/command/translatableerror/service_plan_not_found_error_test.go index 15f11be6c2c..84759b66eb0 100644 --- a/command/translatableerror/service_plan_not_found_error_test.go +++ b/command/translatableerror/service_plan_not_found_error_test.go @@ -2,7 +2,7 @@ package translatableerror_test import ( "code.cloudfoundry.org/cli/command/translatableerror" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/translatableerror/staging_timeout_error_test.go b/command/translatableerror/staging_timeout_error_test.go index dad11893237..0ce31dd5f1e 100644 --- a/command/translatableerror/staging_timeout_error_test.go +++ b/command/translatableerror/staging_timeout_error_test.go @@ -8,7 +8,7 @@ import ( . "code.cloudfoundry.org/cli/command/translatableerror" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/translatableerror/tip_decorator_error_test.go b/command/translatableerror/tip_decorator_error_test.go index 3663c30f91e..a8792e81093 100644 --- a/command/translatableerror/tip_decorator_error_test.go +++ b/command/translatableerror/tip_decorator_error_test.go @@ -6,7 +6,7 @@ import ( . "code.cloudfoundry.org/cli/command/translatableerror" "code.cloudfoundry.org/cli/command/translatableerror/translatableerrorfakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/translatableerror/translatableerror_suite_test.go b/command/translatableerror/translatableerror_suite_test.go index 545e994c716..0654435ad3b 100644 --- a/command/translatableerror/translatableerror_suite_test.go +++ b/command/translatableerror/translatableerror_suite_test.go @@ -1,7 +1,7 @@ package translatableerror_test import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/command/translatableerror/translate_test.go b/command/translatableerror/translate_test.go index a96aad4f4f5..f548fcd57c1 100644 --- a/command/translatableerror/translate_test.go +++ b/command/translatableerror/translate_test.go @@ -7,8 +7,7 @@ import ( . "code.cloudfoundry.org/cli/command/translatableerror" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/translatableerror/unauthorized_error_test.go b/command/translatableerror/unauthorized_error_test.go index d49828de127..339d350d1be 100644 --- a/command/translatableerror/unauthorized_error_test.go +++ b/command/translatableerror/unauthorized_error_test.go @@ -3,8 +3,7 @@ package translatableerror_test import ( . "code.cloudfoundry.org/cli/command/translatableerror" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/v7/add_network_policy_command_test.go b/command/v7/add_network_policy_command_test.go index 90e9a0160de..8f48dae4e3c 100644 --- a/command/v7/add_network_policy_command_test.go +++ b/command/v7/add_network_policy_command_test.go @@ -12,7 +12,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/allow_space_ssh_command_test.go b/command/v7/allow_space_ssh_command_test.go index b8697fa1d1c..7aa9fe7a31b 100644 --- a/command/v7/allow_space_ssh_command_test.go +++ b/command/v7/allow_space_ssh_command_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/api_command_test.go b/command/v7/api_command_test.go index a69afda6996..1c2e3cae883 100644 --- a/command/v7/api_command_test.go +++ b/command/v7/api_command_test.go @@ -9,7 +9,7 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/app_command_test.go b/command/v7/app_command_test.go index 238376ba7b7..0bdd6544a2c 100644 --- a/command/v7/app_command_test.go +++ b/command/v7/app_command_test.go @@ -14,7 +14,7 @@ import ( "code.cloudfoundry.org/cli/types" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/apply_manifest_command_test.go b/command/v7/apply_manifest_command_test.go index bc29e3c54e1..2ae6bc5ded3 100644 --- a/command/v7/apply_manifest_command_test.go +++ b/command/v7/apply_manifest_command_test.go @@ -19,7 +19,7 @@ import ( "code.cloudfoundry.org/cli/util/manifestparser" "code.cloudfoundry.org/cli/util/ui" "github.com/cloudfoundry/bosh-cli/director/template" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/apps_command_test.go b/command/v7/apps_command_test.go index 4da0afec7da..35a3017e2a6 100644 --- a/command/v7/apps_command_test.go +++ b/command/v7/apps_command_test.go @@ -13,7 +13,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/auth_command_test.go b/command/v7/auth_command_test.go index 682aa965bca..0a60884f1cb 100644 --- a/command/v7/auth_command_test.go +++ b/command/v7/auth_command_test.go @@ -12,7 +12,7 @@ import ( . "code.cloudfoundry.org/cli/command/v7" "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/bind_route_service_command_test.go b/command/v7/bind_route_service_command_test.go index 537c529843a..fc3a9178c9a 100644 --- a/command/v7/bind_route_service_command_test.go +++ b/command/v7/bind_route_service_command_test.go @@ -12,7 +12,7 @@ import ( "code.cloudfoundry.org/cli/types" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/bind_running_security_group_command_test.go b/command/v7/bind_running_security_group_command_test.go index 3f8850e9fb5..71dbd866cd4 100644 --- a/command/v7/bind_running_security_group_command_test.go +++ b/command/v7/bind_running_security_group_command_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/bind_security_group_command_test.go b/command/v7/bind_security_group_command_test.go index 17175730fbc..4d5c612e728 100644 --- a/command/v7/bind_security_group_command_test.go +++ b/command/v7/bind_security_group_command_test.go @@ -13,7 +13,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/bind_service_command_test.go b/command/v7/bind_service_command_test.go index f38481905dc..e8e0306940d 100644 --- a/command/v7/bind_service_command_test.go +++ b/command/v7/bind_service_command_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/types" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/bind_staging_security_group_command_test.go b/command/v7/bind_staging_security_group_command_test.go index 634ee60352a..6889f808917 100644 --- a/command/v7/bind_staging_security_group_command_test.go +++ b/command/v7/bind_staging_security_group_command_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/buildpacks_command_test.go b/command/v7/buildpacks_command_test.go index 1d4d275602d..0cb54667243 100644 --- a/command/v7/buildpacks_command_test.go +++ b/command/v7/buildpacks_command_test.go @@ -15,7 +15,7 @@ import ( "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/cancel_deployment_command_test.go b/command/v7/cancel_deployment_command_test.go index ce597a138b2..355349c61ab 100644 --- a/command/v7/cancel_deployment_command_test.go +++ b/command/v7/cancel_deployment_command_test.go @@ -13,7 +13,7 @@ import ( "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/check_route_command_test.go b/command/v7/check_route_command_test.go index 548dd7e28a3..f338b81c472 100644 --- a/command/v7/check_route_command_test.go +++ b/command/v7/check_route_command_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/config_command_test.go b/command/v7/config_command_test.go index a3762f101d1..dcc61aa6e88 100644 --- a/command/v7/config_command_test.go +++ b/command/v7/config_command_test.go @@ -8,7 +8,7 @@ import ( v7 "code.cloudfoundry.org/cli/command/v7" "code.cloudfoundry.org/cli/types" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/copy_source_command_test.go b/command/v7/copy_source_command_test.go index 3b8cedb9c04..17388c3f18b 100644 --- a/command/v7/copy_source_command_test.go +++ b/command/v7/copy_source_command_test.go @@ -15,7 +15,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/create_app_command_test.go b/command/v7/create_app_command_test.go index d4b416a7492..5125dd09b44 100644 --- a/command/v7/create_app_command_test.go +++ b/command/v7/create_app_command_test.go @@ -15,7 +15,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/create_app_manifest_command_test.go b/command/v7/create_app_manifest_command_test.go index 6f132cafdc8..0ecbe58b63e 100644 --- a/command/v7/create_app_manifest_command_test.go +++ b/command/v7/create_app_manifest_command_test.go @@ -15,7 +15,7 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/create_buildpack_command_test.go b/command/v7/create_buildpack_command_test.go index 43b96f17a3f..e8d9556d804 100644 --- a/command/v7/create_buildpack_command_test.go +++ b/command/v7/create_buildpack_command_test.go @@ -17,7 +17,7 @@ import ( "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/create_isolation_segment_command_test.go b/command/v7/create_isolation_segment_command_test.go index 1654035701d..695fbc920ad 100644 --- a/command/v7/create_isolation_segment_command_test.go +++ b/command/v7/create_isolation_segment_command_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/create_org_command_test.go b/command/v7/create_org_command_test.go index e710b03fe42..d2ff5d0de6a 100644 --- a/command/v7/create_org_command_test.go +++ b/command/v7/create_org_command_test.go @@ -15,7 +15,7 @@ import ( v7 "code.cloudfoundry.org/cli/command/v7" "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/create_org_quota_command_test.go b/command/v7/create_org_quota_command_test.go index c964bb964f2..f69371cb0b1 100644 --- a/command/v7/create_org_quota_command_test.go +++ b/command/v7/create_org_quota_command_test.go @@ -12,7 +12,7 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/create_package_command_test.go b/command/v7/create_package_command_test.go index 24dabe17479..c80cf76028b 100644 --- a/command/v7/create_package_command_test.go +++ b/command/v7/create_package_command_test.go @@ -14,7 +14,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/create_private_domain_command_test.go b/command/v7/create_private_domain_command_test.go index 68f2fd6448d..62c5ab96c7e 100644 --- a/command/v7/create_private_domain_command_test.go +++ b/command/v7/create_private_domain_command_test.go @@ -12,7 +12,7 @@ import ( "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/create_route_command_test.go b/command/v7/create_route_command_test.go index b53f14758d9..25e808f69a1 100644 --- a/command/v7/create_route_command_test.go +++ b/command/v7/create_route_command_test.go @@ -14,7 +14,7 @@ import ( "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/create_security_group_command_test.go b/command/v7/create_security_group_command_test.go index 51b23f27e4b..dc7bc65ad5e 100644 --- a/command/v7/create_security_group_command_test.go +++ b/command/v7/create_security_group_command_test.go @@ -14,7 +14,7 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/create_service_broker_command_test.go b/command/v7/create_service_broker_command_test.go index b8637a2a00c..d1e31d2d7a0 100644 --- a/command/v7/create_service_broker_command_test.go +++ b/command/v7/create_service_broker_command_test.go @@ -13,7 +13,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/create_service_command_test.go b/command/v7/create_service_command_test.go index 1deddb8d440..a0686309003 100644 --- a/command/v7/create_service_command_test.go +++ b/command/v7/create_service_command_test.go @@ -12,7 +12,7 @@ import ( "code.cloudfoundry.org/cli/types" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/create_service_key_command_test.go b/command/v7/create_service_key_command_test.go index 83363defefa..85d26518dae 100644 --- a/command/v7/create_service_key_command_test.go +++ b/command/v7/create_service_key_command_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/types" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/create_shared_domain_command_test.go b/command/v7/create_shared_domain_command_test.go index 9484348694d..d39ec8cae1a 100644 --- a/command/v7/create_shared_domain_command_test.go +++ b/command/v7/create_shared_domain_command_test.go @@ -12,7 +12,7 @@ import ( "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/create_space_command_test.go b/command/v7/create_space_command_test.go index d11c05f044f..84f55a7b4f1 100644 --- a/command/v7/create_space_command_test.go +++ b/command/v7/create_space_command_test.go @@ -13,7 +13,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/create_space_quota_command_test.go b/command/v7/create_space_quota_command_test.go index 49f47c4a627..1d6f0314999 100644 --- a/command/v7/create_space_quota_command_test.go +++ b/command/v7/create_space_quota_command_test.go @@ -13,7 +13,7 @@ import ( "code.cloudfoundry.org/cli/types" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/create_user_command_test.go b/command/v7/create_user_command_test.go index f60b5e7ff39..6f42a724227 100644 --- a/command/v7/create_user_command_test.go +++ b/command/v7/create_user_command_test.go @@ -13,7 +13,7 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/create_user_provided_service_command_test.go b/command/v7/create_user_provided_service_command_test.go index 805649e3942..bccc37e67fd 100644 --- a/command/v7/create_user_provided_service_command_test.go +++ b/command/v7/create_user_provided_service_command_test.go @@ -13,7 +13,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/curl_command_test.go b/command/v7/curl_command_test.go index 440a5dc343c..0a68d266d8d 100644 --- a/command/v7/curl_command_test.go +++ b/command/v7/curl_command_test.go @@ -12,7 +12,7 @@ import ( "code.cloudfoundry.org/cli/command/commandfakes" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/delete_buildpack_command_test.go b/command/v7/delete_buildpack_command_test.go index 674b410fd20..ccd53b95b5d 100644 --- a/command/v7/delete_buildpack_command_test.go +++ b/command/v7/delete_buildpack_command_test.go @@ -9,7 +9,7 @@ import ( . "code.cloudfoundry.org/cli/command/v7" "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/delete_command_test.go b/command/v7/delete_command_test.go index 3118c9de29e..2b1a256e1b4 100644 --- a/command/v7/delete_command_test.go +++ b/command/v7/delete_command_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/delete_isolation_segment_command_test.go b/command/v7/delete_isolation_segment_command_test.go index 32f5d672085..560cb71281b 100644 --- a/command/v7/delete_isolation_segment_command_test.go +++ b/command/v7/delete_isolation_segment_command_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/delete_org_command_test.go b/command/v7/delete_org_command_test.go index 8895d0c15fc..70f947c9c7d 100644 --- a/command/v7/delete_org_command_test.go +++ b/command/v7/delete_org_command_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/delete_org_quota_command_test.go b/command/v7/delete_org_quota_command_test.go index b160cad6920..60b2902f7a5 100644 --- a/command/v7/delete_org_quota_command_test.go +++ b/command/v7/delete_org_quota_command_test.go @@ -9,7 +9,7 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/delete_orphaned_routes_command_test.go b/command/v7/delete_orphaned_routes_command_test.go index 8e32faa7d0b..7cd5e1f7acc 100644 --- a/command/v7/delete_orphaned_routes_command_test.go +++ b/command/v7/delete_orphaned_routes_command_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/delete_private_domain_command_test.go b/command/v7/delete_private_domain_command_test.go index d2bea0cffc8..57bf3c40e73 100644 --- a/command/v7/delete_private_domain_command_test.go +++ b/command/v7/delete_private_domain_command_test.go @@ -13,7 +13,7 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/delete_route_command_test.go b/command/v7/delete_route_command_test.go index 3180ad7f0eb..7452857ee50 100644 --- a/command/v7/delete_route_command_test.go +++ b/command/v7/delete_route_command_test.go @@ -12,7 +12,7 @@ import ( "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/delete_security_group_command_test.go b/command/v7/delete_security_group_command_test.go index 4c322dff253..f9573ace688 100644 --- a/command/v7/delete_security_group_command_test.go +++ b/command/v7/delete_security_group_command_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/delete_service_broker_command_test.go b/command/v7/delete_service_broker_command_test.go index da7ab2fbc23..e8beb1216d6 100644 --- a/command/v7/delete_service_broker_command_test.go +++ b/command/v7/delete_service_broker_command_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/delete_service_command_test.go b/command/v7/delete_service_command_test.go index bb8efba7fb5..d9ff8e58f33 100644 --- a/command/v7/delete_service_command_test.go +++ b/command/v7/delete_service_command_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/delete_service_key_command_test.go b/command/v7/delete_service_key_command_test.go index f2d3ec7c885..1e2440635cb 100644 --- a/command/v7/delete_service_key_command_test.go +++ b/command/v7/delete_service_key_command_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/delete_shared_domain_command_test.go b/command/v7/delete_shared_domain_command_test.go index a8fc4cd8eb9..578fea3e99f 100644 --- a/command/v7/delete_shared_domain_command_test.go +++ b/command/v7/delete_shared_domain_command_test.go @@ -14,7 +14,7 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/delete_space_command_test.go b/command/v7/delete_space_command_test.go index 455e544dbe9..67078fa50d4 100644 --- a/command/v7/delete_space_command_test.go +++ b/command/v7/delete_space_command_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/delete_space_quota_command_test.go b/command/v7/delete_space_quota_command_test.go index 224deef5ee1..3100b179245 100644 --- a/command/v7/delete_space_quota_command_test.go +++ b/command/v7/delete_space_quota_command_test.go @@ -9,7 +9,7 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/delete_user_command_test.go b/command/v7/delete_user_command_test.go index 247cd7bfff3..d38ee81e2a8 100644 --- a/command/v7/delete_user_command_test.go +++ b/command/v7/delete_user_command_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/disable_feature_flag_command_test.go b/command/v7/disable_feature_flag_command_test.go index bf8c2f10137..768f1bacf42 100644 --- a/command/v7/disable_feature_flag_command_test.go +++ b/command/v7/disable_feature_flag_command_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/disable_org_isolation_command_test.go b/command/v7/disable_org_isolation_command_test.go index 2b05b519f41..88934934a02 100644 --- a/command/v7/disable_org_isolation_command_test.go +++ b/command/v7/disable_org_isolation_command_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/disable_service_access_command_test.go b/command/v7/disable_service_access_command_test.go index d7c597a2820..e890dbba8b2 100644 --- a/command/v7/disable_service_access_command_test.go +++ b/command/v7/disable_service_access_command_test.go @@ -9,8 +9,8 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/disable_ssh_command_test.go b/command/v7/disable_ssh_command_test.go index b3715c66a0e..de49782edcc 100644 --- a/command/v7/disable_ssh_command_test.go +++ b/command/v7/disable_ssh_command_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/disallow_space_ssh_command_test.go b/command/v7/disallow_space_ssh_command_test.go index d0dbe4bb951..b227e456968 100644 --- a/command/v7/disallow_space_ssh_command_test.go +++ b/command/v7/disallow_space_ssh_command_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/docker_password_getter_test.go b/command/v7/docker_password_getter_test.go index 4c9bb9af121..f649b1a6e94 100644 --- a/command/v7/docker_password_getter_test.go +++ b/command/v7/docker_password_getter_test.go @@ -4,7 +4,7 @@ import ( "code.cloudfoundry.org/cli/command/commandfakes" . "code.cloudfoundry.org/cli/command/v7" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" diff --git a/command/v7/domains_command_test.go b/command/v7/domains_command_test.go index 498e45370a2..6939df7a049 100644 --- a/command/v7/domains_command_test.go +++ b/command/v7/domains_command_test.go @@ -14,7 +14,7 @@ import ( "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/download_droplet_command_test.go b/command/v7/download_droplet_command_test.go index 826ba8b12a6..dc67c935173 100644 --- a/command/v7/download_droplet_command_test.go +++ b/command/v7/download_droplet_command_test.go @@ -16,7 +16,7 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/droplets_command_test.go b/command/v7/droplets_command_test.go index bd9ef93014c..1a8497080f7 100644 --- a/command/v7/droplets_command_test.go +++ b/command/v7/droplets_command_test.go @@ -16,7 +16,7 @@ import ( "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/enable_feature_flag_command_test.go b/command/v7/enable_feature_flag_command_test.go index ae1a14f9676..95dc6121999 100644 --- a/command/v7/enable_feature_flag_command_test.go +++ b/command/v7/enable_feature_flag_command_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/enable_org_isolation_command_test.go b/command/v7/enable_org_isolation_command_test.go index ed6e1f29ad3..b76cb50c7d4 100644 --- a/command/v7/enable_org_isolation_command_test.go +++ b/command/v7/enable_org_isolation_command_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/enable_service_access_command_test.go b/command/v7/enable_service_access_command_test.go index b74631d2737..fa7c39516ad 100644 --- a/command/v7/enable_service_access_command_test.go +++ b/command/v7/enable_service_access_command_test.go @@ -9,8 +9,8 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/enable_ssh_command_test.go b/command/v7/enable_ssh_command_test.go index e4f026913f2..8ef14a64e96 100644 --- a/command/v7/enable_ssh_command_test.go +++ b/command/v7/enable_ssh_command_test.go @@ -12,7 +12,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/env_command_test.go b/command/v7/env_command_test.go index 73ffa2d1baa..03a7c1acaed 100644 --- a/command/v7/env_command_test.go +++ b/command/v7/env_command_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/events_command_test.go b/command/v7/events_command_test.go index 6f1e6faae61..a4a3fccb30c 100644 --- a/command/v7/events_command_test.go +++ b/command/v7/events_command_test.go @@ -16,7 +16,7 @@ import ( "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/feature_flag_command_test.go b/command/v7/feature_flag_command_test.go index 8c6b191a134..01ada75b2d1 100644 --- a/command/v7/feature_flag_command_test.go +++ b/command/v7/feature_flag_command_test.go @@ -12,7 +12,7 @@ import ( "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/feature_flags_command_test.go b/command/v7/feature_flags_command_test.go index c14ae693026..7d3da5ecd41 100644 --- a/command/v7/feature_flags_command_test.go +++ b/command/v7/feature_flags_command_test.go @@ -12,7 +12,7 @@ import ( "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/get_health_check_command_test.go b/command/v7/get_health_check_command_test.go index de730ad5fcb..095a2626251 100644 --- a/command/v7/get_health_check_command_test.go +++ b/command/v7/get_health_check_command_test.go @@ -12,7 +12,7 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/isolation_segments_command_test.go b/command/v7/isolation_segments_command_test.go index 88bd5ce1b42..df543567f47 100644 --- a/command/v7/isolation_segments_command_test.go +++ b/command/v7/isolation_segments_command_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/label_updater_test.go b/command/v7/label_updater_test.go index de8411f0aac..3596a4f5dc8 100644 --- a/command/v7/label_updater_test.go +++ b/command/v7/label_updater_test.go @@ -13,8 +13,8 @@ import ( "code.cloudfoundry.org/cli/types" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/labels_command_test.go b/command/v7/labels_command_test.go index 200e4c78075..5bf64eecd5a 100644 --- a/command/v7/labels_command_test.go +++ b/command/v7/labels_command_test.go @@ -14,8 +14,8 @@ import ( "code.cloudfoundry.org/cli/types" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/login_command_test.go b/command/v7/login_command_test.go index e49ffb52e3d..f9c3e6fc3e7 100644 --- a/command/v7/login_command_test.go +++ b/command/v7/login_command_test.go @@ -18,7 +18,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/logout_command_test.go b/command/v7/logout_command_test.go index e0b09f5cb51..e5abdf28aca 100644 --- a/command/v7/logout_command_test.go +++ b/command/v7/logout_command_test.go @@ -7,7 +7,7 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/logs_command_test.go b/command/v7/logs_command_test.go index bb3cc591cd3..61cf0121764 100644 --- a/command/v7/logs_command_test.go +++ b/command/v7/logs_command_test.go @@ -14,7 +14,7 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/map_route_command_test.go b/command/v7/map_route_command_test.go index 3e7b111edeb..13e78d31459 100644 --- a/command/v7/map_route_command_test.go +++ b/command/v7/map_route_command_test.go @@ -13,7 +13,7 @@ import ( "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/marketplace_command_test.go b/command/v7/marketplace_command_test.go index ca4410c572e..cf27c435c36 100644 --- a/command/v7/marketplace_command_test.go +++ b/command/v7/marketplace_command_test.go @@ -9,8 +9,8 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" "github.com/pkg/errors" diff --git a/command/v7/move_route_command_test.go b/command/v7/move_route_command_test.go index 4ff7b7360bd..9b62af8c8da 100644 --- a/command/v7/move_route_command_test.go +++ b/command/v7/move_route_command_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/network_policies_command_test.go b/command/v7/network_policies_command_test.go index 97b0fb57d0a..0e2b8b51537 100644 --- a/command/v7/network_policies_command_test.go +++ b/command/v7/network_policies_command_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/oauth_token_command_test.go b/command/v7/oauth_token_command_test.go index e9f94cdcc1a..51eac274dcd 100644 --- a/command/v7/oauth_token_command_test.go +++ b/command/v7/oauth_token_command_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/util/ui" "github.com/SermoDigital/jose/crypto" "github.com/SermoDigital/jose/jws" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/org_command_test.go b/command/v7/org_command_test.go index 2dccc3a8c49..2305d75de95 100644 --- a/command/v7/org_command_test.go +++ b/command/v7/org_command_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/org_quota_command_test.go b/command/v7/org_quota_command_test.go index 18d29c157c0..6a6b26d0f8f 100644 --- a/command/v7/org_quota_command_test.go +++ b/command/v7/org_quota_command_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/types" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/org_quotas_command_test.go b/command/v7/org_quotas_command_test.go index e1d20bd4e09..faefb6e9bc5 100644 --- a/command/v7/org_quotas_command_test.go +++ b/command/v7/org_quotas_command_test.go @@ -13,7 +13,7 @@ import ( "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/org_users_command_test.go b/command/v7/org_users_command_test.go index cdba41439e2..f3bce296942 100644 --- a/command/v7/org_users_command_test.go +++ b/command/v7/org_users_command_test.go @@ -12,7 +12,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/orgs_command_test.go b/command/v7/orgs_command_test.go index 161ee27f9c7..15ad5a3a8dd 100644 --- a/command/v7/orgs_command_test.go +++ b/command/v7/orgs_command_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/packages_command_test.go b/command/v7/packages_command_test.go index 87ae1f29039..e9a1a283c18 100644 --- a/command/v7/packages_command_test.go +++ b/command/v7/packages_command_test.go @@ -15,7 +15,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/passwd_command_test.go b/command/v7/passwd_command_test.go index 8a3bf5d3972..3bc9b12466d 100644 --- a/command/v7/passwd_command_test.go +++ b/command/v7/passwd_command_test.go @@ -9,7 +9,7 @@ import ( v7 "code.cloudfoundry.org/cli/command/v7" "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/v7/purge_service_instance_command_test.go b/command/v7/purge_service_instance_command_test.go index d5f3e7e32f3..6c455d84d40 100644 --- a/command/v7/purge_service_instance_command_test.go +++ b/command/v7/purge_service_instance_command_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/purge_service_offering_command_test.go b/command/v7/purge_service_offering_command_test.go index 3d48ea0d109..c52d0335cd4 100644 --- a/command/v7/purge_service_offering_command_test.go +++ b/command/v7/purge_service_offering_command_test.go @@ -10,7 +10,7 @@ import ( . "code.cloudfoundry.org/cli/command/v7" "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/push_command_test.go b/command/v7/push_command_test.go index bedf00eedc0..9bd3c070ab1 100644 --- a/command/v7/push_command_test.go +++ b/command/v7/push_command_test.go @@ -23,8 +23,8 @@ import ( "code.cloudfoundry.org/cli/util/manifestparser" "code.cloudfoundry.org/cli/util/ui" "github.com/cloudfoundry/bosh-cli/director/template" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/remove_network_policy_command_test.go b/command/v7/remove_network_policy_command_test.go index 66247bc31ff..0072802ae59 100644 --- a/command/v7/remove_network_policy_command_test.go +++ b/command/v7/remove_network_policy_command_test.go @@ -12,7 +12,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/rename_command_test.go b/command/v7/rename_command_test.go index 4700666540b..865eddc1e5a 100644 --- a/command/v7/rename_command_test.go +++ b/command/v7/rename_command_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/rename_org_command_test.go b/command/v7/rename_org_command_test.go index 5a61f65bb23..2a1a5a48b05 100644 --- a/command/v7/rename_org_command_test.go +++ b/command/v7/rename_org_command_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/rename_service_broker_command_test.go b/command/v7/rename_service_broker_command_test.go index c5cc9947952..28ff92efb9d 100644 --- a/command/v7/rename_service_broker_command_test.go +++ b/command/v7/rename_service_broker_command_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/rename_service_command_test.go b/command/v7/rename_service_command_test.go index 1a7aeeca305..776f0b70c66 100644 --- a/command/v7/rename_service_command_test.go +++ b/command/v7/rename_service_command_test.go @@ -13,7 +13,7 @@ import ( . "code.cloudfoundry.org/cli/command/v7" "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/rename_space_command_test.go b/command/v7/rename_space_command_test.go index fbb020fdb8e..1dc39eacdde 100644 --- a/command/v7/rename_space_command_test.go +++ b/command/v7/rename_space_command_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/reset_org_default_isolation_segment_command_test.go b/command/v7/reset_org_default_isolation_segment_command_test.go index aa76bf487f8..9529c3d6e30 100644 --- a/command/v7/reset_org_default_isolation_segment_command_test.go +++ b/command/v7/reset_org_default_isolation_segment_command_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/reset_space_isolation_segment_command_test.go b/command/v7/reset_space_isolation_segment_command_test.go index 0a8638d2422..ee99a5ff94b 100644 --- a/command/v7/reset_space_isolation_segment_command_test.go +++ b/command/v7/reset_space_isolation_segment_command_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/restage_command_test.go b/command/v7/restage_command_test.go index 7de6e0488b1..741a2f108da 100644 --- a/command/v7/restage_command_test.go +++ b/command/v7/restage_command_test.go @@ -14,7 +14,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/restart_app_instance_command_test.go b/command/v7/restart_app_instance_command_test.go index 4108024c61a..ad616d14748 100644 --- a/command/v7/restart_app_instance_command_test.go +++ b/command/v7/restart_app_instance_command_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/restart_command_test.go b/command/v7/restart_command_test.go index fbe3f8b6d5c..a339fa05cf1 100644 --- a/command/v7/restart_command_test.go +++ b/command/v7/restart_command_test.go @@ -14,7 +14,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/revision_command_test.go b/command/v7/revision_command_test.go index dbf0391774c..ef20e4b8bdf 100644 --- a/command/v7/revision_command_test.go +++ b/command/v7/revision_command_test.go @@ -5,7 +5,7 @@ import ( v7 "code.cloudfoundry.org/cli/command/v7" "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/revisions_command_test.go b/command/v7/revisions_command_test.go index 8323069fa27..669896448b8 100644 --- a/command/v7/revisions_command_test.go +++ b/command/v7/revisions_command_test.go @@ -14,7 +14,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/rollback_command_test.go b/command/v7/rollback_command_test.go index ac2a0aa7ce5..e5ce2ac4925 100644 --- a/command/v7/rollback_command_test.go +++ b/command/v7/rollback_command_test.go @@ -15,7 +15,7 @@ import ( "code.cloudfoundry.org/cli/types" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/route_command_test.go b/command/v7/route_command_test.go index 2249d13ee7a..7a101409149 100644 --- a/command/v7/route_command_test.go +++ b/command/v7/route_command_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/router_groups_command_test.go b/command/v7/router_groups_command_test.go index 32c64b543b2..2bf4cc47765 100644 --- a/command/v7/router_groups_command_test.go +++ b/command/v7/router_groups_command_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/routes_command_test.go b/command/v7/routes_command_test.go index bc43f357733..0ae594bcd6c 100644 --- a/command/v7/routes_command_test.go +++ b/command/v7/routes_command_test.go @@ -12,7 +12,7 @@ import ( "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/run_task_command_test.go b/command/v7/run_task_command_test.go index 583aaf7ffec..585e40f4556 100644 --- a/command/v7/run_task_command_test.go +++ b/command/v7/run_task_command_test.go @@ -14,7 +14,7 @@ import ( "code.cloudfoundry.org/cli/types" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/running_environment_variable_group_command_test.go b/command/v7/running_environment_variable_group_command_test.go index 7e259a60f5c..3378b273f7c 100644 --- a/command/v7/running_environment_variable_group_command_test.go +++ b/command/v7/running_environment_variable_group_command_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/running_security_groups_command_test.go b/command/v7/running_security_groups_command_test.go index dda4ab5ba08..e0608753189 100644 --- a/command/v7/running_security_groups_command_test.go +++ b/command/v7/running_security_groups_command_test.go @@ -9,7 +9,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/scale_command_test.go b/command/v7/scale_command_test.go index 92638290018..3ab3e56eed5 100644 --- a/command/v7/scale_command_test.go +++ b/command/v7/scale_command_test.go @@ -16,7 +16,7 @@ import ( "code.cloudfoundry.org/cli/types" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/security_group_command_test.go b/command/v7/security_group_command_test.go index faa3ddbabfd..55520061eed 100644 --- a/command/v7/security_group_command_test.go +++ b/command/v7/security_group_command_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/security_groups_command_test.go b/command/v7/security_groups_command_test.go index 0d682e1f4c6..978ea302cd5 100644 --- a/command/v7/security_groups_command_test.go +++ b/command/v7/security_groups_command_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/service_access_command_test.go b/command/v7/service_access_command_test.go index 0424f118218..174d82b719c 100644 --- a/command/v7/service_access_command_test.go +++ b/command/v7/service_access_command_test.go @@ -10,8 +10,8 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/service_brokers_command_test.go b/command/v7/service_brokers_command_test.go index d4f35de0786..b6d3fe4177b 100644 --- a/command/v7/service_brokers_command_test.go +++ b/command/v7/service_brokers_command_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/service_command_test.go b/command/v7/service_command_test.go index 5a0985311e5..dfddade6749 100644 --- a/command/v7/service_command_test.go +++ b/command/v7/service_command_test.go @@ -12,7 +12,7 @@ import ( "code.cloudfoundry.org/cli/types" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/service_key_command_test.go b/command/v7/service_key_command_test.go index 14710e52f85..ceaa655266b 100644 --- a/command/v7/service_key_command_test.go +++ b/command/v7/service_key_command_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/service_keys_command_test.go b/command/v7/service_keys_command_test.go index 7cd2fff5b62..ebf2cc76e74 100644 --- a/command/v7/service_keys_command_test.go +++ b/command/v7/service_keys_command_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/services_command_test.go b/command/v7/services_command_test.go index 24ddaabf1b2..b952885f8fa 100644 --- a/command/v7/services_command_test.go +++ b/command/v7/services_command_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/types" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/set_droplet_command_test.go b/command/v7/set_droplet_command_test.go index 3b1dcfb14e7..3ebbfa8d150 100644 --- a/command/v7/set_droplet_command_test.go +++ b/command/v7/set_droplet_command_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/set_env_command_test.go b/command/v7/set_env_command_test.go index ef109a614b1..f301972349e 100644 --- a/command/v7/set_env_command_test.go +++ b/command/v7/set_env_command_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/set_health_check_command_test.go b/command/v7/set_health_check_command_test.go index 18c7451828c..24ba6d97ebc 100644 --- a/command/v7/set_health_check_command_test.go +++ b/command/v7/set_health_check_command_test.go @@ -13,7 +13,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/set_label_command_test.go b/command/v7/set_label_command_test.go index 5cc16ca2eaa..7f730ce581b 100644 --- a/command/v7/set_label_command_test.go +++ b/command/v7/set_label_command_test.go @@ -5,7 +5,7 @@ import ( . "code.cloudfoundry.org/cli/command/v7" "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/types" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/v7/set_org_default_isolation_segment_command_test.go b/command/v7/set_org_default_isolation_segment_command_test.go index 982064c0a58..839ec9acb55 100644 --- a/command/v7/set_org_default_isolation_segment_command_test.go +++ b/command/v7/set_org_default_isolation_segment_command_test.go @@ -12,7 +12,7 @@ import ( "code.cloudfoundry.org/cli/command/commandfakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/set_org_quota_command_test.go b/command/v7/set_org_quota_command_test.go index 88ac05c07f5..9e3110cf446 100644 --- a/command/v7/set_org_quota_command_test.go +++ b/command/v7/set_org_quota_command_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/util/ui" . "code.cloudfoundry.org/cli/command/v7" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/set_org_role_command_test.go b/command/v7/set_org_role_command_test.go index 6c4ad32269b..998c06c5f5a 100644 --- a/command/v7/set_org_role_command_test.go +++ b/command/v7/set_org_role_command_test.go @@ -14,7 +14,7 @@ import ( "code.cloudfoundry.org/cli/command/commandfakes" . "code.cloudfoundry.org/cli/command/v7" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/set_running_environment_variable_group_command_test.go b/command/v7/set_running_environment_variable_group_command_test.go index a7e5b5d76ac..8793636781e 100644 --- a/command/v7/set_running_environment_variable_group_command_test.go +++ b/command/v7/set_running_environment_variable_group_command_test.go @@ -14,7 +14,7 @@ import ( "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/set_space_isolation_segment_command_test.go b/command/v7/set_space_isolation_segment_command_test.go index c6554154b83..26d4fe76987 100644 --- a/command/v7/set_space_isolation_segment_command_test.go +++ b/command/v7/set_space_isolation_segment_command_test.go @@ -9,7 +9,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/set_space_quota_command_test.go b/command/v7/set_space_quota_command_test.go index e94e62f841e..17edd64be77 100644 --- a/command/v7/set_space_quota_command_test.go +++ b/command/v7/set_space_quota_command_test.go @@ -12,7 +12,7 @@ import ( "code.cloudfoundry.org/cli/util/ui" . "code.cloudfoundry.org/cli/command/v7" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/set_space_role_command_test.go b/command/v7/set_space_role_command_test.go index ac29113070d..29613d0de1d 100644 --- a/command/v7/set_space_role_command_test.go +++ b/command/v7/set_space_role_command_test.go @@ -14,7 +14,7 @@ import ( "code.cloudfoundry.org/cli/command/commandfakes" . "code.cloudfoundry.org/cli/command/v7" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/set_staging_environment_variable_group_command_test.go b/command/v7/set_staging_environment_variable_group_command_test.go index 511a8df6616..c036deb9794 100644 --- a/command/v7/set_staging_environment_variable_group_command_test.go +++ b/command/v7/set_staging_environment_variable_group_command_test.go @@ -14,7 +14,7 @@ import ( "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/share_private_domain_command_test.go b/command/v7/share_private_domain_command_test.go index 6d01497b177..fe0741c5e9f 100644 --- a/command/v7/share_private_domain_command_test.go +++ b/command/v7/share_private_domain_command_test.go @@ -13,7 +13,7 @@ import ( "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/share_route_command_test.go b/command/v7/share_route_command_test.go index 220efdafb30..e3c53506307 100644 --- a/command/v7/share_route_command_test.go +++ b/command/v7/share_route_command_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/share_service_command_test.go b/command/v7/share_service_command_test.go index 46fd5a8f349..b9f5a503284 100644 --- a/command/v7/share_service_command_test.go +++ b/command/v7/share_service_command_test.go @@ -15,7 +15,7 @@ import ( . "code.cloudfoundry.org/cli/command/v7" "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/shared/app_stager_test.go b/command/v7/shared/app_stager_test.go index 58e371b16ef..de22a805a23 100644 --- a/command/v7/shared/app_stager_test.go +++ b/command/v7/shared/app_stager_test.go @@ -16,7 +16,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/shared/app_summary_displayer_test.go b/command/v7/shared/app_summary_displayer_test.go index 1ba958be041..8f3779805ba 100644 --- a/command/v7/shared/app_summary_displayer_test.go +++ b/command/v7/shared/app_summary_displayer_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/types" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/shared/manifest_diff_displayer_test.go b/command/v7/shared/manifest_diff_displayer_test.go index 28c87d9fd3b..9afa5e2e42b 100644 --- a/command/v7/shared/manifest_diff_displayer_test.go +++ b/command/v7/shared/manifest_diff_displayer_test.go @@ -5,7 +5,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/shared/new_clients_test.go b/command/v7/shared/new_clients_test.go index 75a4049f7a7..c8c425b4a11 100644 --- a/command/v7/shared/new_clients_test.go +++ b/command/v7/shared/new_clients_test.go @@ -9,7 +9,7 @@ import ( . "code.cloudfoundry.org/cli/command/v7/shared" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/shared/new_networking_client_test.go b/command/v7/shared/new_networking_client_test.go index 1b9e4b57856..b9e0c344c18 100644 --- a/command/v7/shared/new_networking_client_test.go +++ b/command/v7/shared/new_networking_client_test.go @@ -7,7 +7,7 @@ import ( "code.cloudfoundry.org/cli/api/uaa" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/shared/shared_suite_test.go b/command/v7/shared/shared_suite_test.go index 599b4ca7e1a..83b5cbf8e80 100644 --- a/command/v7/shared/shared_suite_test.go +++ b/command/v7/shared/shared_suite_test.go @@ -1,7 +1,7 @@ package shared_test import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/command/v7/shared/v3_poll_stage_test.go b/command/v7/shared/v3_poll_stage_test.go index a33b59d936a..01483fbcef2 100644 --- a/command/v7/shared/v3_poll_stage_test.go +++ b/command/v7/shared/v3_poll_stage_test.go @@ -10,7 +10,7 @@ import ( . "code.cloudfoundry.org/cli/command/v7/shared" "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/shared/version_checker_test.go b/command/v7/shared/version_checker_test.go index 451ff6e9893..840eab11cf7 100644 --- a/command/v7/shared/version_checker_test.go +++ b/command/v7/shared/version_checker_test.go @@ -2,7 +2,7 @@ package shared_test import ( "code.cloudfoundry.org/cli/command/v7/shared" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/v7/space_command_test.go b/command/v7/space_command_test.go index 5f2a9cbd0fc..259ad0232fd 100644 --- a/command/v7/space_command_test.go +++ b/command/v7/space_command_test.go @@ -13,7 +13,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/space_quota_command_test.go b/command/v7/space_quota_command_test.go index 20952d63888..578b262e27f 100644 --- a/command/v7/space_quota_command_test.go +++ b/command/v7/space_quota_command_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/types" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/space_quotas_command_test.go b/command/v7/space_quotas_command_test.go index 268b6dd9cc0..af99700783b 100644 --- a/command/v7/space_quotas_command_test.go +++ b/command/v7/space_quotas_command_test.go @@ -13,7 +13,7 @@ import ( "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/space_ssh_allowed_command_test.go b/command/v7/space_ssh_allowed_command_test.go index 262f9b48a45..ba208d631f9 100644 --- a/command/v7/space_ssh_allowed_command_test.go +++ b/command/v7/space_ssh_allowed_command_test.go @@ -12,7 +12,7 @@ import ( "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/space_users_command_test.go b/command/v7/space_users_command_test.go index 062e6ab69c8..b7f18b1e3fe 100644 --- a/command/v7/space_users_command_test.go +++ b/command/v7/space_users_command_test.go @@ -12,7 +12,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/spaces_command_test.go b/command/v7/spaces_command_test.go index bd2a53bc1ab..98afb88a885 100644 --- a/command/v7/spaces_command_test.go +++ b/command/v7/spaces_command_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/ssh_code_command_test.go b/command/v7/ssh_code_command_test.go index dcc55d44a23..46dcf5fe599 100644 --- a/command/v7/ssh_code_command_test.go +++ b/command/v7/ssh_code_command_test.go @@ -9,7 +9,7 @@ import ( v7 "code.cloudfoundry.org/cli/command/v7" "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/ssh_command_test.go b/command/v7/ssh_command_test.go index 25721f6c37c..556e25662e6 100644 --- a/command/v7/ssh_command_test.go +++ b/command/v7/ssh_command_test.go @@ -13,8 +13,8 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/ssh_enabled_command_test.go b/command/v7/ssh_enabled_command_test.go index abcd806db66..069b03bdd9d 100644 --- a/command/v7/ssh_enabled_command_test.go +++ b/command/v7/ssh_enabled_command_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/stack_command_test.go b/command/v7/stack_command_test.go index c7127c3b589..ad3faaf0707 100644 --- a/command/v7/stack_command_test.go +++ b/command/v7/stack_command_test.go @@ -12,7 +12,7 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/stacks_command_test.go b/command/v7/stacks_command_test.go index dff97b6ee03..a5be967d3f0 100644 --- a/command/v7/stacks_command_test.go +++ b/command/v7/stacks_command_test.go @@ -12,7 +12,7 @@ import ( "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/stage_package_command_test.go b/command/v7/stage_package_command_test.go index a1906806f47..7a781d724fd 100644 --- a/command/v7/stage_package_command_test.go +++ b/command/v7/stage_package_command_test.go @@ -17,7 +17,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/staging_environment_variable_group_command_test.go b/command/v7/staging_environment_variable_group_command_test.go index 9ecf27e568a..4aac5ffaf75 100644 --- a/command/v7/staging_environment_variable_group_command_test.go +++ b/command/v7/staging_environment_variable_group_command_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/staging_security_groups_command_test.go b/command/v7/staging_security_groups_command_test.go index c0fe38d6f07..022f71dafc8 100644 --- a/command/v7/staging_security_groups_command_test.go +++ b/command/v7/staging_security_groups_command_test.go @@ -9,7 +9,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/start_command_test.go b/command/v7/start_command_test.go index 24ec6f7b185..6575fcca8f7 100644 --- a/command/v7/start_command_test.go +++ b/command/v7/start_command_test.go @@ -15,7 +15,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/stop_command_test.go b/command/v7/stop_command_test.go index 18efa1d4de7..52a3b59e462 100644 --- a/command/v7/stop_command_test.go +++ b/command/v7/stop_command_test.go @@ -13,7 +13,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/target_command_test.go b/command/v7/target_command_test.go index 3d245ad0899..3923e712b7c 100644 --- a/command/v7/target_command_test.go +++ b/command/v7/target_command_test.go @@ -13,7 +13,7 @@ import ( "code.cloudfoundry.org/cli/command/translatableerror" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/tasks_command_test.go b/command/v7/tasks_command_test.go index aeccd989a18..d4d2fb4b4e5 100644 --- a/command/v7/tasks_command_test.go +++ b/command/v7/tasks_command_test.go @@ -13,7 +13,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/terminate_task_command_test.go b/command/v7/terminate_task_command_test.go index 5528bf0fa66..d4e52a5ff10 100644 --- a/command/v7/terminate_task_command_test.go +++ b/command/v7/terminate_task_command_test.go @@ -13,7 +13,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/unbind_route_service_command_test.go b/command/v7/unbind_route_service_command_test.go index 4b0c5e6044f..36f7524c812 100644 --- a/command/v7/unbind_route_service_command_test.go +++ b/command/v7/unbind_route_service_command_test.go @@ -12,7 +12,7 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/unbind_running_group_command_test.go b/command/v7/unbind_running_group_command_test.go index a02066ab052..5cc2476d3d4 100644 --- a/command/v7/unbind_running_group_command_test.go +++ b/command/v7/unbind_running_group_command_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/unbind_security_group_test.go b/command/v7/unbind_security_group_test.go index cfeac315ed0..d5230274033 100644 --- a/command/v7/unbind_security_group_test.go +++ b/command/v7/unbind_security_group_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/unbind_service_command_test.go b/command/v7/unbind_service_command_test.go index 686708b3761..b9f96903539 100644 --- a/command/v7/unbind_service_command_test.go +++ b/command/v7/unbind_service_command_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/unbind_staging_security_group_command_test.go b/command/v7/unbind_staging_security_group_command_test.go index 4658d8ed3ab..8b52a5dbf6b 100644 --- a/command/v7/unbind_staging_security_group_command_test.go +++ b/command/v7/unbind_staging_security_group_command_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/unmap_route_command_test.go b/command/v7/unmap_route_command_test.go index 03ab812213a..a387f4df09c 100644 --- a/command/v7/unmap_route_command_test.go +++ b/command/v7/unmap_route_command_test.go @@ -13,7 +13,7 @@ import ( "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/unset_env_command_test.go b/command/v7/unset_env_command_test.go index 2e1175dc50b..c9b7ad6d535 100644 --- a/command/v7/unset_env_command_test.go +++ b/command/v7/unset_env_command_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/unset_label_command_test.go b/command/v7/unset_label_command_test.go index e5513e83af6..09e5f7ddae2 100644 --- a/command/v7/unset_label_command_test.go +++ b/command/v7/unset_label_command_test.go @@ -5,7 +5,7 @@ import ( v7 "code.cloudfoundry.org/cli/command/v7" "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/types" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/v7/unset_org_role_command_test.go b/command/v7/unset_org_role_command_test.go index 7e4695e4ec9..e79263df0f9 100644 --- a/command/v7/unset_org_role_command_test.go +++ b/command/v7/unset_org_role_command_test.go @@ -13,7 +13,7 @@ import ( "code.cloudfoundry.org/cli/command/commandfakes" . "code.cloudfoundry.org/cli/command/v7" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/unset_space_quota_command_test.go b/command/v7/unset_space_quota_command_test.go index 3a93e9dd666..c0b3f1744fb 100644 --- a/command/v7/unset_space_quota_command_test.go +++ b/command/v7/unset_space_quota_command_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/util/ui" . "code.cloudfoundry.org/cli/command/v7" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/unset_space_role_command_test.go b/command/v7/unset_space_role_command_test.go index e5c9e760943..0123e3753bf 100644 --- a/command/v7/unset_space_role_command_test.go +++ b/command/v7/unset_space_role_command_test.go @@ -13,7 +13,7 @@ import ( "code.cloudfoundry.org/cli/command/commandfakes" . "code.cloudfoundry.org/cli/command/v7" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/unshare_private_domain_command_test.go b/command/v7/unshare_private_domain_command_test.go index 12e92e52b17..04d8ea5e3f7 100644 --- a/command/v7/unshare_private_domain_command_test.go +++ b/command/v7/unshare_private_domain_command_test.go @@ -13,7 +13,7 @@ import ( "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/unshare_route_command_test.go b/command/v7/unshare_route_command_test.go index b3237815755..8a8901f7464 100644 --- a/command/v7/unshare_route_command_test.go +++ b/command/v7/unshare_route_command_test.go @@ -12,7 +12,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/unshare_service_command_test.go b/command/v7/unshare_service_command_test.go index e5ae7caa0fc..0b814c1523f 100644 --- a/command/v7/unshare_service_command_test.go +++ b/command/v7/unshare_service_command_test.go @@ -11,7 +11,7 @@ import ( . "code.cloudfoundry.org/cli/command/v7" "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/update_buildpack_command_test.go b/command/v7/update_buildpack_command_test.go index 05de1f2e8a9..834baffd403 100644 --- a/command/v7/update_buildpack_command_test.go +++ b/command/v7/update_buildpack_command_test.go @@ -17,7 +17,7 @@ import ( . "code.cloudfoundry.org/cli/command/v7" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/update_destination_command_test.go b/command/v7/update_destination_command_test.go index 802a125b7ce..2bbf0de17a7 100644 --- a/command/v7/update_destination_command_test.go +++ b/command/v7/update_destination_command_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/update_org_quota_command_test.go b/command/v7/update_org_quota_command_test.go index d5b9e2253d9..bfb33016ee7 100644 --- a/command/v7/update_org_quota_command_test.go +++ b/command/v7/update_org_quota_command_test.go @@ -13,7 +13,7 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/update_security_group_command_test.go b/command/v7/update_security_group_command_test.go index cc4b82fdbae..3de0df3ce48 100644 --- a/command/v7/update_security_group_command_test.go +++ b/command/v7/update_security_group_command_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/update_service_broker_command_test.go b/command/v7/update_service_broker_command_test.go index f2915c4204c..8574a41bbca 100644 --- a/command/v7/update_service_broker_command_test.go +++ b/command/v7/update_service_broker_command_test.go @@ -13,7 +13,7 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/update_service_command_test.go b/command/v7/update_service_command_test.go index 5e9a55b1f49..f9983b42e4a 100644 --- a/command/v7/update_service_command_test.go +++ b/command/v7/update_service_command_test.go @@ -13,7 +13,7 @@ import ( "code.cloudfoundry.org/cli/types" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/update_space_quota_command_test.go b/command/v7/update_space_quota_command_test.go index 42a7b8079b3..2f75eae5a9f 100644 --- a/command/v7/update_space_quota_command_test.go +++ b/command/v7/update_space_quota_command_test.go @@ -13,7 +13,7 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/update_user_provided_service_command_test.go b/command/v7/update_user_provided_service_command_test.go index ac55f322aa7..2630e31bec9 100644 --- a/command/v7/update_user_provided_service_command_test.go +++ b/command/v7/update_user_provided_service_command_test.go @@ -16,7 +16,7 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/upgrade_service_command_test.go b/command/v7/upgrade_service_command_test.go index 8bbd7d8dcfb..fb66c5880f5 100644 --- a/command/v7/upgrade_service_command_test.go +++ b/command/v7/upgrade_service_command_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/command/v7/v7fakes" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/command/v7/v7_suite_test.go b/command/v7/v7_suite_test.go index 6fc2ad1cd9c..58e5cf35736 100644 --- a/command/v7/v7_suite_test.go +++ b/command/v7/v7_suite_test.go @@ -6,7 +6,7 @@ import ( "strings" uuid "github.com/nu7hatch/gouuid" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" log "github.com/sirupsen/logrus" diff --git a/go.mod b/go.mod index 6d6d0692bec..5122fcd1f0b 100644 --- a/go.mod +++ b/go.mod @@ -31,7 +31,7 @@ require ( github.com/maxbrunsfeld/counterfeiter/v6 v6.8.1 github.com/moby/term v0.5.0 github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d - github.com/onsi/ginkgo v1.16.5 + github.com/onsi/ginkgo/v2 v2.15.0 github.com/onsi/gomega v1.31.1 github.com/pkg/errors v0.9.1 github.com/sabhiram/go-gitignore v0.0.0-20171017070213-362f9845770f @@ -60,10 +60,12 @@ require ( github.com/distribution/reference v0.5.0 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/go-logr/logr v1.3.0 // indirect + github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/gofuzz v1.2.0 // indirect + github.com/google/pprof v0.0.0-20230912144702-c363fe2c2ed8 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 // indirect github.com/imdario/mergo v0.3.6 // indirect github.com/json-iterator/go v1.1.12 // indirect @@ -72,6 +74,7 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/nxadm/tail v1.4.8 // indirect + github.com/onsi/ginkgo v1.16.5 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/rivo/uniseg v0.2.0 // indirect github.com/spf13/pflag v1.0.5 // indirect diff --git a/go.sum b/go.sum index 63c75d266ff..5a0c03ec028 100644 --- a/go.sum +++ b/go.sum @@ -238,6 +238,7 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= diff --git a/integration/assets/hydrabroker/database/database_suite_test.go b/integration/assets/hydrabroker/database/database_suite_test.go index 6b7d74ae096..a22064d8119 100644 --- a/integration/assets/hydrabroker/database/database_suite_test.go +++ b/integration/assets/hydrabroker/database/database_suite_test.go @@ -2,9 +2,6 @@ package database_test import ( "testing" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" ) func TestDatabase(t *testing.T) { diff --git a/integration/assets/hydrabroker/database/database_test.go b/integration/assets/hydrabroker/database/database_test.go index 00faebd56e2..0d9fd8daa49 100644 --- a/integration/assets/hydrabroker/database/database_test.go +++ b/integration/assets/hydrabroker/database/database_test.go @@ -5,8 +5,6 @@ import ( "sync" . "code.cloudfoundry.org/cli/integration/assets/hydrabroker/database" - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" ) var _ = Describe("Database", func() { diff --git a/integration/assets/hydrabroker/integrationtest/integrationtest_suite_test.go b/integration/assets/hydrabroker/integrationtest/integrationtest_suite_test.go index 4d20e0df1ca..62605925395 100644 --- a/integration/assets/hydrabroker/integrationtest/integrationtest_suite_test.go +++ b/integration/assets/hydrabroker/integrationtest/integrationtest_suite_test.go @@ -2,9 +2,6 @@ package integrationtest_test import ( "testing" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" ) func TestIntegrationtest(t *testing.T) { diff --git a/integration/assets/hydrabroker/integrationtest/integrationtest_test.go b/integration/assets/hydrabroker/integrationtest/integrationtest_test.go index 5653454e801..dff3ac01471 100644 --- a/integration/assets/hydrabroker/integrationtest/integrationtest_test.go +++ b/integration/assets/hydrabroker/integrationtest/integrationtest_test.go @@ -16,9 +16,6 @@ import ( "code.cloudfoundry.org/cli/integration/assets/hydrabroker/config" "code.cloudfoundry.org/cli/integration/assets/hydrabroker/resources" uuid2 "github.com/nu7hatch/gouuid" - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - . "github.com/onsi/gomega/gstruct" "github.com/pivotal-cf/brokerapi/v7/domain/apiresponses" ) diff --git a/integration/assets/hydrabroker/store/bindings_test.go b/integration/assets/hydrabroker/store/bindings_test.go index e610eca98d9..fe30b42ef50 100644 --- a/integration/assets/hydrabroker/store/bindings_test.go +++ b/integration/assets/hydrabroker/store/bindings_test.go @@ -7,8 +7,6 @@ import ( "code.cloudfoundry.org/cli/integration/assets/hydrabroker/resources" "code.cloudfoundry.org/cli/integration/assets/hydrabroker/store" uuid "github.com/nu7hatch/gouuid" - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" ) var _ = Describe("Bindings", func() { diff --git a/integration/assets/hydrabroker/store/brokers_test.go b/integration/assets/hydrabroker/store/brokers_test.go index e57d35fac14..d67b3d99850 100644 --- a/integration/assets/hydrabroker/store/brokers_test.go +++ b/integration/assets/hydrabroker/store/brokers_test.go @@ -2,9 +2,6 @@ package store_test import ( "code.cloudfoundry.org/cli/integration/assets/hydrabroker/config" - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - "code.cloudfoundry.org/cli/integration/assets/hydrabroker/store" ) diff --git a/integration/assets/hydrabroker/store/instances_test.go b/integration/assets/hydrabroker/store/instances_test.go index ff285be0526..0fb45a2da1f 100644 --- a/integration/assets/hydrabroker/store/instances_test.go +++ b/integration/assets/hydrabroker/store/instances_test.go @@ -5,11 +5,8 @@ import ( "code.cloudfoundry.org/cli/integration/assets/hydrabroker/config" "code.cloudfoundry.org/cli/integration/assets/hydrabroker/resources" - uuid "github.com/nu7hatch/gouuid" - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - "code.cloudfoundry.org/cli/integration/assets/hydrabroker/store" + uuid "github.com/nu7hatch/gouuid" ) var _ = Describe("Instances", func() { diff --git a/integration/assets/hydrabroker/store/store_suite_test.go b/integration/assets/hydrabroker/store/store_suite_test.go index aa685e16a72..0851085ea1e 100644 --- a/integration/assets/hydrabroker/store/store_suite_test.go +++ b/integration/assets/hydrabroker/store/store_suite_test.go @@ -2,9 +2,6 @@ package store_test import ( "testing" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" ) func TestStore(t *testing.T) { diff --git a/integration/helpers/app_instance_table_test.go b/integration/helpers/app_instance_table_test.go index 6ae03a086a4..47dd9ce0800 100644 --- a/integration/helpers/app_instance_table_test.go +++ b/integration/helpers/app_instance_table_test.go @@ -3,7 +3,7 @@ package helpers_test import ( . "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/integration/helpers/app_test.go b/integration/helpers/app_test.go index 0954de85dd0..facc0321d60 100644 --- a/integration/helpers/app_test.go +++ b/integration/helpers/app_test.go @@ -2,7 +2,7 @@ package helpers_test import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gexec" ) diff --git a/integration/helpers/client_credentials.go b/integration/helpers/client_credentials.go index 8d8a155b00a..4b027e5cb15 100644 --- a/integration/helpers/client_credentials.go +++ b/integration/helpers/client_credentials.go @@ -4,7 +4,7 @@ import ( "os" "strconv" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/integration/helpers/command.go b/integration/helpers/command.go index f8f7cad7375..e43c451b540 100644 --- a/integration/helpers/command.go +++ b/integration/helpers/command.go @@ -8,7 +8,7 @@ import ( "regexp" "strings" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gexec" ) diff --git a/integration/helpers/commonisolated/common_isolated_setup.go b/integration/helpers/commonisolated/common_isolated_setup.go index 77be9adbe40..5a62ef2d032 100644 --- a/integration/helpers/commonisolated/common_isolated_setup.go +++ b/integration/helpers/commonisolated/common_isolated_setup.go @@ -7,7 +7,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccversion" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/integration/helpers/config.go b/integration/helpers/config.go index aff1855997f..b830dfa10f6 100644 --- a/integration/helpers/config.go +++ b/integration/helpers/config.go @@ -8,7 +8,7 @@ import ( "code.cloudfoundry.org/cli/util/configv3" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/integration/helpers/docker.go b/integration/helpers/docker.go index a17b57a34af..961653205d2 100644 --- a/integration/helpers/docker.go +++ b/integration/helpers/docker.go @@ -3,7 +3,7 @@ package helpers import ( "os" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" ) // SkipIfPrivateDockerInfoNotSet skips the test if CF_INT_DOCKER_IMAGE, diff --git a/integration/helpers/environment.go b/integration/helpers/environment.go index 7fc74795a0c..9ce9bfeb055 100644 --- a/integration/helpers/environment.go +++ b/integration/helpers/environment.go @@ -4,7 +4,7 @@ import ( "fmt" "strings" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/helpers/helpers_suite_test.go b/integration/helpers/helpers_suite_test.go index ebb490012ac..c668e16cffc 100644 --- a/integration/helpers/helpers_suite_test.go +++ b/integration/helpers/helpers_suite_test.go @@ -1,7 +1,7 @@ package helpers_test import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/integration/helpers/isolation_segment.go b/integration/helpers/isolation_segment.go index 6ec46996f90..6588abe689f 100644 --- a/integration/helpers/isolation_segment.go +++ b/integration/helpers/isolation_segment.go @@ -4,7 +4,7 @@ import ( "encoding/json" "fmt" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/integration/helpers/login.go b/integration/helpers/login.go index 74445b19fbf..939698a4ce3 100644 --- a/integration/helpers/login.go +++ b/integration/helpers/login.go @@ -7,7 +7,7 @@ import ( "strings" "time" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gexec" ) diff --git a/integration/helpers/os.go b/integration/helpers/os.go index f9b117e7c7d..d06014e592f 100644 --- a/integration/helpers/os.go +++ b/integration/helpers/os.go @@ -3,7 +3,7 @@ package helpers import ( "runtime" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" ) func IsWindows() bool { diff --git a/integration/helpers/servicebrokerstub/app_deploy.go b/integration/helpers/servicebrokerstub/app_deploy.go index a411e681723..9b7b4d6da4b 100644 --- a/integration/helpers/servicebrokerstub/app_deploy.go +++ b/integration/helpers/servicebrokerstub/app_deploy.go @@ -9,7 +9,7 @@ import ( "sync" "time" - "github.com/onsi/ginkgo" + "github.com/onsi/ginkgo/v2" "code.cloudfoundry.org/cli/integration/helpers" . "github.com/onsi/gomega" diff --git a/integration/helpers/version.go b/integration/helpers/version.go index d5418d069b0..1546cfea686 100644 --- a/integration/helpers/version.go +++ b/integration/helpers/version.go @@ -13,7 +13,7 @@ import ( "code.cloudfoundry.org/cli/actor/versioncheck" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gexec" ) diff --git a/integration/helpers/version_v7.go b/integration/helpers/version_v7.go index a392e8aa9b7..800ede10f5f 100644 --- a/integration/helpers/version_v7.go +++ b/integration/helpers/version_v7.go @@ -3,7 +3,7 @@ package helpers import ( "fmt" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" ) const V7 = true diff --git a/integration/shared/experimental/experimental_suite_test.go b/integration/shared/experimental/experimental_suite_test.go index 028d93b2dd4..fb60b700c16 100644 --- a/integration/shared/experimental/experimental_suite_test.go +++ b/integration/shared/experimental/experimental_suite_test.go @@ -6,7 +6,7 @@ import ( "time" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/integration/shared/global/global_suite_test.go b/integration/shared/global/global_suite_test.go index 0b5c246a056..04e8be3c60b 100644 --- a/integration/shared/global/global_suite_test.go +++ b/integration/shared/global/global_suite_test.go @@ -6,7 +6,7 @@ import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/integration/shared/global/running_environment_variable_group_command_test.go b/integration/shared/global/running_environment_variable_group_command_test.go index 9ffd173e61c..7ccd5fa7d18 100644 --- a/integration/shared/global/running_environment_variable_group_command_test.go +++ b/integration/shared/global/running_environment_variable_group_command_test.go @@ -4,7 +4,7 @@ import ( "fmt" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gexec" ) diff --git a/integration/shared/global/staging_environment_variable_group_command_test.go b/integration/shared/global/staging_environment_variable_group_command_test.go index fcf1f6c1780..612822bd839 100644 --- a/integration/shared/global/staging_environment_variable_group_command_test.go +++ b/integration/shared/global/staging_environment_variable_group_command_test.go @@ -4,7 +4,7 @@ import ( "fmt" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gexec" ) diff --git a/integration/shared/isolated/apps_command_test.go b/integration/shared/isolated/apps_command_test.go index 984898d8942..68167ac179d 100644 --- a/integration/shared/isolated/apps_command_test.go +++ b/integration/shared/isolated/apps_command_test.go @@ -2,7 +2,7 @@ package isolated import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/shared/isolated/config_test.go b/integration/shared/isolated/config_test.go index 2870b9ac0ba..f8dc92da996 100644 --- a/integration/shared/isolated/config_test.go +++ b/integration/shared/isolated/config_test.go @@ -5,7 +5,7 @@ import ( "path/filepath" helpers "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/shared/isolated/error_handling_test.go b/integration/shared/isolated/error_handling_test.go index 6e4563173f5..2926bc20ca3 100644 --- a/integration/shared/isolated/error_handling_test.go +++ b/integration/shared/isolated/error_handling_test.go @@ -2,7 +2,7 @@ package isolated import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/shared/isolated/internationalization_test.go b/integration/shared/isolated/internationalization_test.go index ca55650c0d4..8b317d4d4aa 100644 --- a/integration/shared/isolated/internationalization_test.go +++ b/integration/shared/isolated/internationalization_test.go @@ -2,8 +2,7 @@ package isolated import ( helpers "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/shared/isolated/logs_command_test.go b/integration/shared/isolated/logs_command_test.go index 40ac936eea4..5929bef7736 100644 --- a/integration/shared/isolated/logs_command_test.go +++ b/integration/shared/isolated/logs_command_test.go @@ -9,7 +9,7 @@ import ( "time" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/shared/isolated/restart_app_instance_command_test.go b/integration/shared/isolated/restart_app_instance_command_test.go index 20cfb37f036..0e801ea7886 100644 --- a/integration/shared/isolated/restart_app_instance_command_test.go +++ b/integration/shared/isolated/restart_app_instance_command_test.go @@ -2,7 +2,7 @@ package isolated import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/shared/isolated/spaces_command_test.go b/integration/shared/isolated/spaces_command_test.go index 7fb2f4bea65..2fca098d47a 100644 --- a/integration/shared/isolated/spaces_command_test.go +++ b/integration/shared/isolated/spaces_command_test.go @@ -2,7 +2,7 @@ package isolated import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/shared/isolated/version_command_test.go b/integration/shared/isolated/version_command_test.go index d8f01c495a2..35da3f34c1a 100644 --- a/integration/shared/isolated/version_command_test.go +++ b/integration/shared/isolated/version_command_test.go @@ -6,8 +6,7 @@ import ( "code.cloudfoundry.org/cli/integration/helpers" "github.com/blang/semver/v4" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/shared/performance/performance_suite_test.go b/integration/shared/performance/performance_suite_test.go index d36919b1360..a32dce35ab4 100644 --- a/integration/shared/performance/performance_suite_test.go +++ b/integration/shared/performance/performance_suite_test.go @@ -6,7 +6,7 @@ import ( "time" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/integration/shared/plugin/add_plugin_repo_test.go b/integration/shared/plugin/add_plugin_repo_test.go index befa5f31549..41f9ec43d96 100644 --- a/integration/shared/plugin/add_plugin_repo_test.go +++ b/integration/shared/plugin/add_plugin_repo_test.go @@ -8,7 +8,7 @@ import ( "net/http" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/shared/plugin/api_test.go b/integration/shared/plugin/api_test.go index 99bce5d40ba..8b2b4a56dde 100644 --- a/integration/shared/plugin/api_test.go +++ b/integration/shared/plugin/api_test.go @@ -6,7 +6,7 @@ import ( "code.cloudfoundry.org/cli/integration/helpers/servicebrokerstub" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/shared/plugin/help_test.go b/integration/shared/plugin/help_test.go index 649ae6c3486..73c7bfdd637 100644 --- a/integration/shared/plugin/help_test.go +++ b/integration/shared/plugin/help_test.go @@ -2,8 +2,7 @@ package plugin import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/shared/plugin/install_plugin_command_test.go b/integration/shared/plugin/install_plugin_command_test.go index 3917214e28c..52ad2b261e7 100644 --- a/integration/shared/plugin/install_plugin_command_test.go +++ b/integration/shared/plugin/install_plugin_command_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/util/generic" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/shared/plugin/install_plugin_command_unix_test.go b/integration/shared/plugin/install_plugin_command_unix_test.go index cca2ffeee18..4deae1aaed2 100644 --- a/integration/shared/plugin/install_plugin_command_unix_test.go +++ b/integration/shared/plugin/install_plugin_command_unix_test.go @@ -8,7 +8,7 @@ import ( "path/filepath" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gexec" ) diff --git a/integration/shared/plugin/install_plugin_from_repo_command_test.go b/integration/shared/plugin/install_plugin_from_repo_command_test.go index 541aa04bd11..15d707292ac 100644 --- a/integration/shared/plugin/install_plugin_from_repo_command_test.go +++ b/integration/shared/plugin/install_plugin_from_repo_command_test.go @@ -6,7 +6,7 @@ import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/util/generic" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/shared/plugin/logs_test.go b/integration/shared/plugin/logs_test.go index 43491cfc416..fd7df06f8e3 100644 --- a/integration/shared/plugin/logs_test.go +++ b/integration/shared/plugin/logs_test.go @@ -2,7 +2,7 @@ package plugin import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/shared/plugin/plugin_suite_test.go b/integration/shared/plugin/plugin_suite_test.go index ce67c21d879..4411dd6fe7d 100644 --- a/integration/shared/plugin/plugin_suite_test.go +++ b/integration/shared/plugin/plugin_suite_test.go @@ -5,7 +5,7 @@ import ( "time" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/shared/plugin/plugins_command_test.go b/integration/shared/plugin/plugins_command_test.go index 7c596a47897..f02ce4f7c8d 100644 --- a/integration/shared/plugin/plugins_command_test.go +++ b/integration/shared/plugin/plugins_command_test.go @@ -6,7 +6,7 @@ import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/util/generic" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/shared/plugin/runner_test.go b/integration/shared/plugin/runner_test.go index 31bdcc6c0f6..0f2bc869334 100644 --- a/integration/shared/plugin/runner_test.go +++ b/integration/shared/plugin/runner_test.go @@ -4,7 +4,7 @@ import ( "os" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/shared/plugin/uninstall_plugin_command_test.go b/integration/shared/plugin/uninstall_plugin_command_test.go index 732b7e24aac..f937e9e842d 100644 --- a/integration/shared/plugin/uninstall_plugin_command_test.go +++ b/integration/shared/plugin/uninstall_plugin_command_test.go @@ -6,7 +6,7 @@ import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/util/generic" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/shared/plugin/uninstall_plugin_command_unix_test.go b/integration/shared/plugin/uninstall_plugin_command_unix_test.go index 6d812450bf0..7458c325f6f 100644 --- a/integration/shared/plugin/uninstall_plugin_command_unix_test.go +++ b/integration/shared/plugin/uninstall_plugin_command_unix_test.go @@ -9,7 +9,7 @@ import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/util/generic" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/global/bind_running_security_group_command_test.go b/integration/v7/global/bind_running_security_group_command_test.go index cc294c417d6..081d4407c99 100644 --- a/integration/v7/global/bind_running_security_group_command_test.go +++ b/integration/v7/global/bind_running_security_group_command_test.go @@ -3,7 +3,7 @@ package global import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/global/bind_security_group_command_test.go b/integration/v7/global/bind_security_group_command_test.go index cc881ecb38a..efba3e4f316 100644 --- a/integration/v7/global/bind_security_group_command_test.go +++ b/integration/v7/global/bind_security_group_command_test.go @@ -3,7 +3,7 @@ package global import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/global/bind_staging_security_group_command_test.go b/integration/v7/global/bind_staging_security_group_command_test.go index 460926466bd..ea120e6e91b 100644 --- a/integration/v7/global/bind_staging_security_group_command_test.go +++ b/integration/v7/global/bind_staging_security_group_command_test.go @@ -3,7 +3,7 @@ package global import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/global/create_buildpack_command_test.go b/integration/v7/global/create_buildpack_command_test.go index 3ec5cb2d6ee..f697e58bf03 100644 --- a/integration/v7/global/create_buildpack_command_test.go +++ b/integration/v7/global/create_buildpack_command_test.go @@ -9,7 +9,7 @@ import ( "regexp" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/global/create_security_group_command_test.go b/integration/v7/global/create_security_group_command_test.go index 6a171f7a36b..e0ff1afed9b 100644 --- a/integration/v7/global/create_security_group_command_test.go +++ b/integration/v7/global/create_security_group_command_test.go @@ -8,7 +8,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/global/delete_buildpack_command_test.go b/integration/v7/global/delete_buildpack_command_test.go index 9ade0a8b247..b00775a7ce4 100644 --- a/integration/v7/global/delete_buildpack_command_test.go +++ b/integration/v7/global/delete_buildpack_command_test.go @@ -2,7 +2,7 @@ package global import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/global/disable_feature_flag_command_test.go b/integration/v7/global/disable_feature_flag_command_test.go index 840fc312c41..646f7063b41 100644 --- a/integration/v7/global/disable_feature_flag_command_test.go +++ b/integration/v7/global/disable_feature_flag_command_test.go @@ -2,7 +2,7 @@ package global import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/global/enable_feature_flag_command_test.go b/integration/v7/global/enable_feature_flag_command_test.go index 05526ae8271..fcda96b1789 100644 --- a/integration/v7/global/enable_feature_flag_command_test.go +++ b/integration/v7/global/enable_feature_flag_command_test.go @@ -2,7 +2,7 @@ package global import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/global/env_command_test.go b/integration/v7/global/env_command_test.go index 8b7858aa7d6..fc547e3c274 100644 --- a/integration/v7/global/env_command_test.go +++ b/integration/v7/global/env_command_test.go @@ -4,7 +4,7 @@ import ( "fmt" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/global/global_suite_test.go b/integration/v7/global/global_suite_test.go index 0b5c246a056..04e8be3c60b 100644 --- a/integration/v7/global/global_suite_test.go +++ b/integration/v7/global/global_suite_test.go @@ -6,7 +6,7 @@ import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/integration/v7/global/org_quota_command_test.go b/integration/v7/global/org_quota_command_test.go index ccd33cde2ba..a24ebc9327a 100644 --- a/integration/v7/global/org_quota_command_test.go +++ b/integration/v7/global/org_quota_command_test.go @@ -2,7 +2,7 @@ package global import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/global/org_quotas_command_test.go b/integration/v7/global/org_quotas_command_test.go index 4327504b7b5..28d3c0acae0 100644 --- a/integration/v7/global/org_quotas_command_test.go +++ b/integration/v7/global/org_quotas_command_test.go @@ -2,7 +2,7 @@ package global import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/global/running_environment_variable_group_command_test.go b/integration/v7/global/running_environment_variable_group_command_test.go index 892f0ddb873..6da1c04182d 100644 --- a/integration/v7/global/running_environment_variable_group_command_test.go +++ b/integration/v7/global/running_environment_variable_group_command_test.go @@ -2,7 +2,7 @@ package global import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/global/running_security_groups_command_test.go b/integration/v7/global/running_security_groups_command_test.go index 8fcb31b45cb..e253e821d98 100644 --- a/integration/v7/global/running_security_groups_command_test.go +++ b/integration/v7/global/running_security_groups_command_test.go @@ -3,7 +3,7 @@ package global import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/global/security_group_command_test.go b/integration/v7/global/security_group_command_test.go index 5b12514f659..782d05fe036 100644 --- a/integration/v7/global/security_group_command_test.go +++ b/integration/v7/global/security_group_command_test.go @@ -3,7 +3,7 @@ package global import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/global/set_org_role_command_test.go b/integration/v7/global/set_org_role_command_test.go index 843581fcdb9..12a5739aed0 100644 --- a/integration/v7/global/set_org_role_command_test.go +++ b/integration/v7/global/set_org_role_command_test.go @@ -1,7 +1,7 @@ package global import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/global/set_running_environment_variable_group_command_test.go b/integration/v7/global/set_running_environment_variable_group_command_test.go index bc433f82c4b..eef6f8c5867 100644 --- a/integration/v7/global/set_running_environment_variable_group_command_test.go +++ b/integration/v7/global/set_running_environment_variable_group_command_test.go @@ -4,7 +4,7 @@ import ( "fmt" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/global/set_space_role_command_test.go b/integration/v7/global/set_space_role_command_test.go index 49423502bf1..9e2f99df4e2 100644 --- a/integration/v7/global/set_space_role_command_test.go +++ b/integration/v7/global/set_space_role_command_test.go @@ -1,7 +1,7 @@ package global import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/global/set_staging_environment_variable_group_command_test.go b/integration/v7/global/set_staging_environment_variable_group_command_test.go index 44f406f1147..05a1e79aa2b 100644 --- a/integration/v7/global/set_staging_environment_variable_group_command_test.go +++ b/integration/v7/global/set_staging_environment_variable_group_command_test.go @@ -4,7 +4,7 @@ import ( "fmt" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/global/staging_environment_variable_group_command_test.go b/integration/v7/global/staging_environment_variable_group_command_test.go index de2192dfde5..bb03b84dcf8 100644 --- a/integration/v7/global/staging_environment_variable_group_command_test.go +++ b/integration/v7/global/staging_environment_variable_group_command_test.go @@ -2,7 +2,7 @@ package global import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/global/staging_security_groups_command_test.go b/integration/v7/global/staging_security_groups_command_test.go index 05145368cf7..49049c28379 100644 --- a/integration/v7/global/staging_security_groups_command_test.go +++ b/integration/v7/global/staging_security_groups_command_test.go @@ -3,7 +3,7 @@ package global import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/global/unbind_running_security_group_command_test.go b/integration/v7/global/unbind_running_security_group_command_test.go index 73d3c8c9e17..ef2c8a4b5fd 100644 --- a/integration/v7/global/unbind_running_security_group_command_test.go +++ b/integration/v7/global/unbind_running_security_group_command_test.go @@ -3,7 +3,7 @@ package global import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/global/unbind_security_group_command_test.go b/integration/v7/global/unbind_security_group_command_test.go index c42bbdc5152..18af34f653d 100644 --- a/integration/v7/global/unbind_security_group_command_test.go +++ b/integration/v7/global/unbind_security_group_command_test.go @@ -2,7 +2,7 @@ package global import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/global/unbind_staging_security_group_command_test.go b/integration/v7/global/unbind_staging_security_group_command_test.go index 19916d0e063..9a28ea277c4 100644 --- a/integration/v7/global/unbind_staging_security_group_command_test.go +++ b/integration/v7/global/unbind_staging_security_group_command_test.go @@ -3,7 +3,7 @@ package global import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/global/update_buildpack_command_test.go b/integration/v7/global/update_buildpack_command_test.go index e3dbfda1828..7780ca36b0e 100644 --- a/integration/v7/global/update_buildpack_command_test.go +++ b/integration/v7/global/update_buildpack_command_test.go @@ -9,7 +9,7 @@ import ( "regexp" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/global/update_security_group_command_test.go b/integration/v7/global/update_security_group_command_test.go index 57c7a9ffb44..44c2fc94a6b 100644 --- a/integration/v7/global/update_security_group_command_test.go +++ b/integration/v7/global/update_security_group_command_test.go @@ -8,7 +8,7 @@ import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/add_network_policy_command_test.go b/integration/v7/isolated/add_network_policy_command_test.go index 7accd458416..db2da6cb241 100644 --- a/integration/v7/isolated/add_network_policy_command_test.go +++ b/integration/v7/isolated/add_network_policy_command_test.go @@ -4,7 +4,7 @@ import ( "regexp" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/allow_space_ssh_command_test.go b/integration/v7/isolated/allow_space_ssh_command_test.go index d80a460f386..c7fcabe338a 100644 --- a/integration/v7/isolated/allow_space_ssh_command_test.go +++ b/integration/v7/isolated/allow_space_ssh_command_test.go @@ -4,7 +4,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/api_command_test.go b/integration/v7/isolated/api_command_test.go index b3339b84679..638a7b4ed0a 100644 --- a/integration/v7/isolated/api_command_test.go +++ b/integration/v7/isolated/api_command_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/util/configv3" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/app_command_test.go b/integration/v7/isolated/app_command_test.go index 4c91a401b56..e0489918a76 100644 --- a/integration/v7/isolated/app_command_test.go +++ b/integration/v7/isolated/app_command_test.go @@ -9,7 +9,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/apply_manifest_command_test.go b/integration/v7/isolated/apply_manifest_command_test.go index 194aec66d00..e9f94af4b44 100644 --- a/integration/v7/isolated/apply_manifest_command_test.go +++ b/integration/v7/isolated/apply_manifest_command_test.go @@ -9,7 +9,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/apps_command_test.go b/integration/v7/isolated/apps_command_test.go index 727621e8d8c..d7ca99920f4 100644 --- a/integration/v7/isolated/apps_command_test.go +++ b/integration/v7/isolated/apps_command_test.go @@ -5,7 +5,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/auth_command_test.go b/integration/v7/isolated/auth_command_test.go index a8b675e627e..4ecc062d165 100644 --- a/integration/v7/isolated/auth_command_test.go +++ b/integration/v7/isolated/auth_command_test.go @@ -8,7 +8,7 @@ import ( "code.cloudfoundry.org/cli/api/uaa/uaaversion" "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/util/configv3" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/bind_route_service_command_test.go b/integration/v7/isolated/bind_route_service_command_test.go index 42895584933..939e6312dce 100644 --- a/integration/v7/isolated/bind_route_service_command_test.go +++ b/integration/v7/isolated/bind_route_service_command_test.go @@ -7,7 +7,7 @@ import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/integration/helpers/servicebrokerstub" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/bind_service_command_test.go b/integration/v7/isolated/bind_service_command_test.go index 46c3473376d..b766f8352c1 100644 --- a/integration/v7/isolated/bind_service_command_test.go +++ b/integration/v7/isolated/bind_service_command_test.go @@ -7,7 +7,7 @@ import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/integration/helpers/servicebrokerstub" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/buildpacks_command_test.go b/integration/v7/isolated/buildpacks_command_test.go index 5968c7253e6..9fde265dc8c 100644 --- a/integration/v7/isolated/buildpacks_command_test.go +++ b/integration/v7/isolated/buildpacks_command_test.go @@ -5,7 +5,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/cancel_deployment_test.go b/integration/v7/isolated/cancel_deployment_test.go index 12f5e8d5ea3..7b0d4dc01ec 100644 --- a/integration/v7/isolated/cancel_deployment_test.go +++ b/integration/v7/isolated/cancel_deployment_test.go @@ -7,7 +7,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/check_route_command_test.go b/integration/v7/isolated/check_route_command_test.go index 21d2915e221..70067930741 100644 --- a/integration/v7/isolated/check_route_command_test.go +++ b/integration/v7/isolated/check_route_command_test.go @@ -5,7 +5,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/config_command_test.go b/integration/v7/isolated/config_command_test.go index f01c21d5da8..549af21a49f 100644 --- a/integration/v7/isolated/config_command_test.go +++ b/integration/v7/isolated/config_command_test.go @@ -4,8 +4,8 @@ import ( "strings" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/config_test.go b/integration/v7/isolated/config_test.go index caf5c0aff5f..985e3e40808 100644 --- a/integration/v7/isolated/config_test.go +++ b/integration/v7/isolated/config_test.go @@ -3,7 +3,7 @@ package isolated import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/util/configv3" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/integration/v7/isolated/copy_source_command_test.go b/integration/v7/isolated/copy_source_command_test.go index 4fb385cf4a5..cd5660e488b 100644 --- a/integration/v7/isolated/copy_source_command_test.go +++ b/integration/v7/isolated/copy_source_command_test.go @@ -7,7 +7,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/create_app_command_test.go b/integration/v7/isolated/create_app_command_test.go index d51842fb4dd..e10dc1872ea 100644 --- a/integration/v7/isolated/create_app_command_test.go +++ b/integration/v7/isolated/create_app_command_test.go @@ -3,7 +3,7 @@ package isolated import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/create_app_manifest_command_test.go b/integration/v7/isolated/create_app_manifest_command_test.go index 6c0782e2c86..13d86ac5237 100644 --- a/integration/v7/isolated/create_app_manifest_command_test.go +++ b/integration/v7/isolated/create_app_manifest_command_test.go @@ -10,7 +10,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/create_isolation_segment_command_test.go b/integration/v7/isolated/create_isolation_segment_command_test.go index e74d5ae44da..5ed9ed9bd4b 100644 --- a/integration/v7/isolated/create_isolation_segment_command_test.go +++ b/integration/v7/isolated/create_isolation_segment_command_test.go @@ -2,7 +2,7 @@ package isolated import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/create_org_command_test.go b/integration/v7/isolated/create_org_command_test.go index bcf40ecb8d6..3c6b1e2a14b 100644 --- a/integration/v7/isolated/create_org_command_test.go +++ b/integration/v7/isolated/create_org_command_test.go @@ -3,7 +3,7 @@ package isolated import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/create_org_quota_command_test.go b/integration/v7/isolated/create_org_quota_command_test.go index 45c05873888..833101d40a7 100644 --- a/integration/v7/isolated/create_org_quota_command_test.go +++ b/integration/v7/isolated/create_org_quota_command_test.go @@ -4,7 +4,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccversion" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/create_package_cfignore_test.go b/integration/v7/isolated/create_package_cfignore_test.go index d9b00745b0f..9641984ec0b 100644 --- a/integration/v7/isolated/create_package_cfignore_test.go +++ b/integration/v7/isolated/create_package_cfignore_test.go @@ -6,7 +6,7 @@ import ( "path/filepath" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gexec" ) diff --git a/integration/v7/isolated/create_package_command_test.go b/integration/v7/isolated/create_package_command_test.go index 891934d5d6c..9b890cc22cc 100644 --- a/integration/v7/isolated/create_package_command_test.go +++ b/integration/v7/isolated/create_package_command_test.go @@ -8,7 +8,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/create_private_domain_test.go b/integration/v7/isolated/create_private_domain_test.go index 6c2ce0ff687..84bb1ff88f9 100644 --- a/integration/v7/isolated/create_private_domain_test.go +++ b/integration/v7/isolated/create_private_domain_test.go @@ -5,7 +5,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/create_route_command_test.go b/integration/v7/isolated/create_route_command_test.go index 7c1a97dcf4d..60e64ba82a6 100644 --- a/integration/v7/isolated/create_route_command_test.go +++ b/integration/v7/isolated/create_route_command_test.go @@ -5,7 +5,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/create_service_broker_command_test.go b/integration/v7/isolated/create_service_broker_command_test.go index b39c0457578..2bd168935b7 100644 --- a/integration/v7/isolated/create_service_broker_command_test.go +++ b/integration/v7/isolated/create_service_broker_command_test.go @@ -7,7 +7,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccversion" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/create_service_command_test.go b/integration/v7/isolated/create_service_command_test.go index 8d2973c24cb..e35aa6f28fc 100644 --- a/integration/v7/isolated/create_service_command_test.go +++ b/integration/v7/isolated/create_service_command_test.go @@ -8,7 +8,7 @@ import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/integration/helpers/servicebrokerstub" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/create_service_key_command_test.go b/integration/v7/isolated/create_service_key_command_test.go index 5101a60998d..ee194622651 100644 --- a/integration/v7/isolated/create_service_key_command_test.go +++ b/integration/v7/isolated/create_service_key_command_test.go @@ -7,7 +7,7 @@ import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/integration/helpers/servicebrokerstub" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/create_shared_domain_test.go b/integration/v7/isolated/create_shared_domain_test.go index 0d38e1ebc40..c16129dadef 100644 --- a/integration/v7/isolated/create_shared_domain_test.go +++ b/integration/v7/isolated/create_shared_domain_test.go @@ -6,7 +6,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/create_space_command_test.go b/integration/v7/isolated/create_space_command_test.go index 55af227a89e..7bb6115720a 100644 --- a/integration/v7/isolated/create_space_command_test.go +++ b/integration/v7/isolated/create_space_command_test.go @@ -3,7 +3,7 @@ package isolated import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/create_space_quota_command_test.go b/integration/v7/isolated/create_space_quota_command_test.go index ae73c5aa8e2..424023515df 100644 --- a/integration/v7/isolated/create_space_quota_command_test.go +++ b/integration/v7/isolated/create_space_quota_command_test.go @@ -4,7 +4,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccversion" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/create_user_command_test.go b/integration/v7/isolated/create_user_command_test.go index 2123fb70d7a..6cda9958ee9 100644 --- a/integration/v7/isolated/create_user_command_test.go +++ b/integration/v7/isolated/create_user_command_test.go @@ -4,8 +4,8 @@ import ( "fmt" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/create_user_provided_service_command_test.go b/integration/v7/isolated/create_user_provided_service_command_test.go index 4a86b1f6174..868217ccd49 100644 --- a/integration/v7/isolated/create_user_provided_service_command_test.go +++ b/integration/v7/isolated/create_user_provided_service_command_test.go @@ -4,7 +4,7 @@ import ( "os" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/curl_command_test.go b/integration/v7/isolated/curl_command_test.go index 600d9b12608..d61be0ebedf 100644 --- a/integration/v7/isolated/curl_command_test.go +++ b/integration/v7/isolated/curl_command_test.go @@ -10,7 +10,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/delete_command_test.go b/integration/v7/isolated/delete_command_test.go index 9d9e942dba1..829ab4f2515 100644 --- a/integration/v7/isolated/delete_command_test.go +++ b/integration/v7/isolated/delete_command_test.go @@ -5,7 +5,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/delete_isolation_segment_command_test.go b/integration/v7/isolated/delete_isolation_segment_command_test.go index 7c34c92ece6..d6869e814bb 100644 --- a/integration/v7/isolated/delete_isolation_segment_command_test.go +++ b/integration/v7/isolated/delete_isolation_segment_command_test.go @@ -2,7 +2,7 @@ package isolated import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/delete_org_command_test.go b/integration/v7/isolated/delete_org_command_test.go index 231d3e7155f..f8134fd3d73 100644 --- a/integration/v7/isolated/delete_org_command_test.go +++ b/integration/v7/isolated/delete_org_command_test.go @@ -3,7 +3,7 @@ package isolated import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/delete_org_quota_command_test.go b/integration/v7/isolated/delete_org_quota_command_test.go index 7ff2af4ae67..c0b613497af 100644 --- a/integration/v7/isolated/delete_org_quota_command_test.go +++ b/integration/v7/isolated/delete_org_quota_command_test.go @@ -2,7 +2,7 @@ package isolated import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/delete_orphaned_routes_command_test.go b/integration/v7/isolated/delete_orphaned_routes_command_test.go index e09b5c2911f..ca34b582531 100644 --- a/integration/v7/isolated/delete_orphaned_routes_command_test.go +++ b/integration/v7/isolated/delete_orphaned_routes_command_test.go @@ -5,7 +5,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/delete_private_domain_command_test.go b/integration/v7/isolated/delete_private_domain_command_test.go index 1f17c1979f9..af707bd6a9a 100644 --- a/integration/v7/isolated/delete_private_domain_command_test.go +++ b/integration/v7/isolated/delete_private_domain_command_test.go @@ -5,7 +5,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/delete_route_command_test.go b/integration/v7/isolated/delete_route_command_test.go index 5d3848cfd81..74842472685 100644 --- a/integration/v7/isolated/delete_route_command_test.go +++ b/integration/v7/isolated/delete_route_command_test.go @@ -6,7 +6,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/delete_security_group_command_test.go b/integration/v7/isolated/delete_security_group_command_test.go index 6cf0746204e..5a902dad8d9 100644 --- a/integration/v7/isolated/delete_security_group_command_test.go +++ b/integration/v7/isolated/delete_security_group_command_test.go @@ -3,7 +3,7 @@ package isolated import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/delete_service_broker_command_test.go b/integration/v7/isolated/delete_service_broker_command_test.go index fb078ba3a59..a1808622113 100644 --- a/integration/v7/isolated/delete_service_broker_command_test.go +++ b/integration/v7/isolated/delete_service_broker_command_test.go @@ -4,7 +4,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/integration/helpers/servicebrokerstub" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/delete_service_command_test.go b/integration/v7/isolated/delete_service_command_test.go index b2281a327f7..051d886c8ac 100644 --- a/integration/v7/isolated/delete_service_command_test.go +++ b/integration/v7/isolated/delete_service_command_test.go @@ -5,7 +5,7 @@ import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/integration/helpers/servicebrokerstub" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/delete_service_key_command_test.go b/integration/v7/isolated/delete_service_key_command_test.go index 4a055a2254b..c5fdb3d8add 100644 --- a/integration/v7/isolated/delete_service_key_command_test.go +++ b/integration/v7/isolated/delete_service_key_command_test.go @@ -5,7 +5,7 @@ import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/integration/helpers/servicebrokerstub" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/delete_shared_domain_command_test.go b/integration/v7/isolated/delete_shared_domain_command_test.go index e24f174c642..8740084568c 100644 --- a/integration/v7/isolated/delete_shared_domain_command_test.go +++ b/integration/v7/isolated/delete_shared_domain_command_test.go @@ -5,7 +5,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/delete_space_command_test.go b/integration/v7/isolated/delete_space_command_test.go index 9c6201426c1..6538dcb2991 100644 --- a/integration/v7/isolated/delete_space_command_test.go +++ b/integration/v7/isolated/delete_space_command_test.go @@ -2,7 +2,7 @@ package isolated import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/delete_space_quota_command_test.go b/integration/v7/isolated/delete_space_quota_command_test.go index 6874a03544e..bc5d0c884a5 100644 --- a/integration/v7/isolated/delete_space_quota_command_test.go +++ b/integration/v7/isolated/delete_space_quota_command_test.go @@ -2,7 +2,7 @@ package isolated import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/delete_user_command_test.go b/integration/v7/isolated/delete_user_command_test.go index d1632ad3544..c5740557daf 100644 --- a/integration/v7/isolated/delete_user_command_test.go +++ b/integration/v7/isolated/delete_user_command_test.go @@ -2,7 +2,7 @@ package isolated import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/disable_org_isolation_command_test.go b/integration/v7/isolated/disable_org_isolation_command_test.go index 943ef2e2f33..bb47b2d7571 100644 --- a/integration/v7/isolated/disable_org_isolation_command_test.go +++ b/integration/v7/isolated/disable_org_isolation_command_test.go @@ -2,7 +2,7 @@ package isolated import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/disable_service_access_command_test.go b/integration/v7/isolated/disable_service_access_command_test.go index 579cf4de727..ca78b0bc630 100644 --- a/integration/v7/isolated/disable_service_access_command_test.go +++ b/integration/v7/isolated/disable_service_access_command_test.go @@ -3,7 +3,7 @@ package isolated import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/integration/helpers/servicebrokerstub" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/disable_ssh_command_test.go b/integration/v7/isolated/disable_ssh_command_test.go index d68dc0c58da..9de1ddbbafe 100644 --- a/integration/v7/isolated/disable_ssh_command_test.go +++ b/integration/v7/isolated/disable_ssh_command_test.go @@ -6,7 +6,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/disallow_space_ssh_command_test.go b/integration/v7/isolated/disallow_space_ssh_command_test.go index 9fad10a6263..cc1f3502e36 100644 --- a/integration/v7/isolated/disallow_space_ssh_command_test.go +++ b/integration/v7/isolated/disallow_space_ssh_command_test.go @@ -4,7 +4,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/domains_command_test.go b/integration/v7/isolated/domains_command_test.go index 1fe17725ad2..39ec17e2f41 100644 --- a/integration/v7/isolated/domains_command_test.go +++ b/integration/v7/isolated/domains_command_test.go @@ -3,7 +3,7 @@ package isolated import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/download_droplet_command_test.go b/integration/v7/isolated/download_droplet_command_test.go index 8f302b22792..6a701730c01 100644 --- a/integration/v7/isolated/download_droplet_command_test.go +++ b/integration/v7/isolated/download_droplet_command_test.go @@ -9,7 +9,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/droplets_command_test.go b/integration/v7/isolated/droplets_command_test.go index f9bc0d39d10..186700f08b5 100644 --- a/integration/v7/isolated/droplets_command_test.go +++ b/integration/v7/isolated/droplets_command_test.go @@ -3,7 +3,7 @@ package isolated import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/enable_org_isolation_command_test.go b/integration/v7/isolated/enable_org_isolation_command_test.go index c295d97e567..5f8ded92b22 100644 --- a/integration/v7/isolated/enable_org_isolation_command_test.go +++ b/integration/v7/isolated/enable_org_isolation_command_test.go @@ -2,7 +2,7 @@ package isolated import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/enable_service_access_command_test.go b/integration/v7/isolated/enable_service_access_command_test.go index 90b62be2e0b..aabff91eb51 100644 --- a/integration/v7/isolated/enable_service_access_command_test.go +++ b/integration/v7/isolated/enable_service_access_command_test.go @@ -3,7 +3,7 @@ package isolated import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/integration/helpers/servicebrokerstub" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/enable_ssh_command_test.go b/integration/v7/isolated/enable_ssh_command_test.go index 7948361041b..014791f83b6 100644 --- a/integration/v7/isolated/enable_ssh_command_test.go +++ b/integration/v7/isolated/enable_ssh_command_test.go @@ -6,7 +6,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/error_on_extra_arguments_test.go b/integration/v7/isolated/error_on_extra_arguments_test.go index 1f437759cbe..a744ded8a01 100644 --- a/integration/v7/isolated/error_on_extra_arguments_test.go +++ b/integration/v7/isolated/error_on_extra_arguments_test.go @@ -2,7 +2,7 @@ package isolated import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/events_command_test.go b/integration/v7/isolated/events_command_test.go index 7442cefaac5..9b6ddb295c5 100644 --- a/integration/v7/isolated/events_command_test.go +++ b/integration/v7/isolated/events_command_test.go @@ -3,7 +3,7 @@ package isolated import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/feature_flag_command_test.go b/integration/v7/isolated/feature_flag_command_test.go index ae1b10fd07c..bcec97a4bd6 100644 --- a/integration/v7/isolated/feature_flag_command_test.go +++ b/integration/v7/isolated/feature_flag_command_test.go @@ -3,7 +3,7 @@ package isolated import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/feature_flags_command_test.go b/integration/v7/isolated/feature_flags_command_test.go index 171d4628c5f..26f7c7e4c43 100644 --- a/integration/v7/isolated/feature_flags_command_test.go +++ b/integration/v7/isolated/feature_flags_command_test.go @@ -3,7 +3,7 @@ package isolated import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/get_health_check_command_test.go b/integration/v7/isolated/get_health_check_command_test.go index d3fcf3a680a..a1b64a9f566 100644 --- a/integration/v7/isolated/get_health_check_command_test.go +++ b/integration/v7/isolated/get_health_check_command_test.go @@ -3,7 +3,7 @@ package isolated import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/help_command_test.go b/integration/v7/isolated/help_command_test.go index 46db19f9a9b..43991701ea0 100644 --- a/integration/v7/isolated/help_command_test.go +++ b/integration/v7/isolated/help_command_test.go @@ -6,8 +6,8 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/isolation_segments_command_test.go b/integration/v7/isolated/isolation_segments_command_test.go index 7a598102eea..bb5243e785a 100644 --- a/integration/v7/isolated/isolation_segments_command_test.go +++ b/integration/v7/isolated/isolation_segments_command_test.go @@ -2,7 +2,7 @@ package isolated import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/labels_command_test.go b/integration/v7/isolated/labels_command_test.go index f2d45d7a2c0..a5400152a15 100644 --- a/integration/v7/isolated/labels_command_test.go +++ b/integration/v7/isolated/labels_command_test.go @@ -8,7 +8,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/login_command_test.go b/integration/v7/isolated/login_command_test.go index a4c5d0227e4..fb113921e50 100644 --- a/integration/v7/isolated/login_command_test.go +++ b/integration/v7/isolated/login_command_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/util/configv3" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/logout_command_test.go b/integration/v7/isolated/logout_command_test.go index fb8ab630ac3..e275aaed577 100644 --- a/integration/v7/isolated/logout_command_test.go +++ b/integration/v7/isolated/logout_command_test.go @@ -3,7 +3,7 @@ package isolated import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/util/configv3" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/logs_command_test.go b/integration/v7/isolated/logs_command_test.go index 73cc08eac5f..241a3c1a9f7 100644 --- a/integration/v7/isolated/logs_command_test.go +++ b/integration/v7/isolated/logs_command_test.go @@ -9,7 +9,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/map_route_command_test.go b/integration/v7/isolated/map_route_command_test.go index 3aaec9b04e5..a22b82c0c35 100644 --- a/integration/v7/isolated/map_route_command_test.go +++ b/integration/v7/isolated/map_route_command_test.go @@ -7,7 +7,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/marketplace_command_test.go b/integration/v7/isolated/marketplace_command_test.go index 86ae14f4412..08567ea41b6 100644 --- a/integration/v7/isolated/marketplace_command_test.go +++ b/integration/v7/isolated/marketplace_command_test.go @@ -6,7 +6,7 @@ import ( "code.cloudfoundry.org/cli/integration/assets/hydrabroker/config" "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/integration/helpers/servicebrokerstub" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/move_route_command_test.go b/integration/v7/isolated/move_route_command_test.go index b973fb1d007..242871705a0 100644 --- a/integration/v7/isolated/move_route_command_test.go +++ b/integration/v7/isolated/move_route_command_test.go @@ -4,7 +4,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccversion" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/network_policies_command_test.go b/integration/v7/isolated/network_policies_command_test.go index 2181839bdba..05469eccd89 100644 --- a/integration/v7/isolated/network_policies_command_test.go +++ b/integration/v7/isolated/network_policies_command_test.go @@ -4,7 +4,7 @@ import ( "regexp" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/oauth_client_test.go b/integration/v7/isolated/oauth_client_test.go index 5cdeb54cb82..ccf182b5a86 100644 --- a/integration/v7/isolated/oauth_client_test.go +++ b/integration/v7/isolated/oauth_client_test.go @@ -8,7 +8,7 @@ import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/util/configv3" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/oauth_token_command_test.go b/integration/v7/isolated/oauth_token_command_test.go index 148e5f5df38..8cabb8b142b 100644 --- a/integration/v7/isolated/oauth_token_command_test.go +++ b/integration/v7/isolated/oauth_token_command_test.go @@ -5,7 +5,7 @@ import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/util/configv3" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/org_command_test.go b/integration/v7/isolated/org_command_test.go index d970a12074f..ddfece678e6 100644 --- a/integration/v7/isolated/org_command_test.go +++ b/integration/v7/isolated/org_command_test.go @@ -4,7 +4,7 @@ import ( "sort" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/org_users_command_test.go b/integration/v7/isolated/org_users_command_test.go index d2dfe13b272..f2f6ec63871 100644 --- a/integration/v7/isolated/org_users_command_test.go +++ b/integration/v7/isolated/org_users_command_test.go @@ -4,7 +4,7 @@ import ( "regexp" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/orgs_command_test.go b/integration/v7/isolated/orgs_command_test.go index 2ff94fb174a..db77e0eac99 100644 --- a/integration/v7/isolated/orgs_command_test.go +++ b/integration/v7/isolated/orgs_command_test.go @@ -4,7 +4,7 @@ import ( "regexp" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/packages_command_test.go b/integration/v7/isolated/packages_command_test.go index 83d65b59d7c..f81f6b47dcf 100644 --- a/integration/v7/isolated/packages_command_test.go +++ b/integration/v7/isolated/packages_command_test.go @@ -3,7 +3,7 @@ package isolated import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/passwd_command_test.go b/integration/v7/isolated/passwd_command_test.go index 30181f64574..f5caa3685fd 100644 --- a/integration/v7/isolated/passwd_command_test.go +++ b/integration/v7/isolated/passwd_command_test.go @@ -7,7 +7,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/proxy_connection_test.go b/integration/v7/isolated/proxy_connection_test.go index ca2f8eb17e6..1c25e4fc26d 100644 --- a/integration/v7/isolated/proxy_connection_test.go +++ b/integration/v7/isolated/proxy_connection_test.go @@ -2,7 +2,7 @@ package isolated import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/purge_service_instance_command_test.go b/integration/v7/isolated/purge_service_instance_command_test.go index 09cc600fcb7..60c13a7a742 100644 --- a/integration/v7/isolated/purge_service_instance_command_test.go +++ b/integration/v7/isolated/purge_service_instance_command_test.go @@ -3,7 +3,7 @@ package isolated import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/integration/helpers/servicebrokerstub" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/purge_service_offering_command_test.go b/integration/v7/isolated/purge_service_offering_command_test.go index 142a3c75878..ac09419e92a 100644 --- a/integration/v7/isolated/purge_service_offering_command_test.go +++ b/integration/v7/isolated/purge_service_offering_command_test.go @@ -3,7 +3,7 @@ package isolated import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/integration/helpers/servicebrokerstub" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/remove_network_policy_command_test.go b/integration/v7/isolated/remove_network_policy_command_test.go index ffeb9369944..22c3871f7a0 100644 --- a/integration/v7/isolated/remove_network_policy_command_test.go +++ b/integration/v7/isolated/remove_network_policy_command_test.go @@ -5,7 +5,7 @@ import ( "regexp" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/rename_command_test.go b/integration/v7/isolated/rename_command_test.go index bdcf63054f2..29e5d58eb2e 100644 --- a/integration/v7/isolated/rename_command_test.go +++ b/integration/v7/isolated/rename_command_test.go @@ -3,7 +3,7 @@ package isolated import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/rename_org_command_test.go b/integration/v7/isolated/rename_org_command_test.go index ecbda727b18..ad5accf8993 100644 --- a/integration/v7/isolated/rename_org_command_test.go +++ b/integration/v7/isolated/rename_org_command_test.go @@ -3,7 +3,7 @@ package isolated import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/rename_service_broker_command_test.go b/integration/v7/isolated/rename_service_broker_command_test.go index dc0e1a9fead..bac5aa88f2e 100644 --- a/integration/v7/isolated/rename_service_broker_command_test.go +++ b/integration/v7/isolated/rename_service_broker_command_test.go @@ -3,7 +3,7 @@ package isolated import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/integration/helpers/servicebrokerstub" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/rename_service_command_test.go b/integration/v7/isolated/rename_service_command_test.go index 69d46920891..235b34840c5 100644 --- a/integration/v7/isolated/rename_service_command_test.go +++ b/integration/v7/isolated/rename_service_command_test.go @@ -3,7 +3,7 @@ package isolated import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/integration/helpers/servicebrokerstub" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/rename_space_command_test.go b/integration/v7/isolated/rename_space_command_test.go index 1896018d980..3360df69e44 100644 --- a/integration/v7/isolated/rename_space_command_test.go +++ b/integration/v7/isolated/rename_space_command_test.go @@ -3,7 +3,7 @@ package isolated import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/reset_org_default_isolation_segment_command_test.go b/integration/v7/isolated/reset_org_default_isolation_segment_command_test.go index 181ede0e070..2cd88a1505d 100644 --- a/integration/v7/isolated/reset_org_default_isolation_segment_command_test.go +++ b/integration/v7/isolated/reset_org_default_isolation_segment_command_test.go @@ -2,7 +2,7 @@ package isolated import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/reset_space_isolation_segment_test.go b/integration/v7/isolated/reset_space_isolation_segment_test.go index 5891bfe2ae8..effd49f7260 100644 --- a/integration/v7/isolated/reset_space_isolation_segment_test.go +++ b/integration/v7/isolated/reset_space_isolation_segment_test.go @@ -2,7 +2,7 @@ package isolated import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/restage_command_test.go b/integration/v7/isolated/restage_command_test.go index 1306df7d2bd..7f63f55e08a 100644 --- a/integration/v7/isolated/restage_command_test.go +++ b/integration/v7/isolated/restage_command_test.go @@ -7,7 +7,7 @@ import ( "path/filepath" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/restart_app_instance_command_test.go b/integration/v7/isolated/restart_app_instance_command_test.go index d9102949725..0958599b94a 100644 --- a/integration/v7/isolated/restart_app_instance_command_test.go +++ b/integration/v7/isolated/restart_app_instance_command_test.go @@ -7,7 +7,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/restart_command_test.go b/integration/v7/isolated/restart_command_test.go index 64bdf0cb274..2bf370d3c07 100644 --- a/integration/v7/isolated/restart_command_test.go +++ b/integration/v7/isolated/restart_command_test.go @@ -5,7 +5,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/revision_command_test.go b/integration/v7/isolated/revision_command_test.go index 3daac4c21c4..47cf099fc4f 100644 --- a/integration/v7/isolated/revision_command_test.go +++ b/integration/v7/isolated/revision_command_test.go @@ -3,7 +3,7 @@ package isolated import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/revisions_command_test.go b/integration/v7/isolated/revisions_command_test.go index 8795bdb7479..c5816d0aa80 100644 --- a/integration/v7/isolated/revisions_command_test.go +++ b/integration/v7/isolated/revisions_command_test.go @@ -7,7 +7,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/rollback_command_test.go b/integration/v7/isolated/rollback_command_test.go index 458f3799274..b5523c40741 100644 --- a/integration/v7/isolated/rollback_command_test.go +++ b/integration/v7/isolated/rollback_command_test.go @@ -7,7 +7,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/route_command_test.go b/integration/v7/isolated/route_command_test.go index 85d50275c44..140cd1178ae 100644 --- a/integration/v7/isolated/route_command_test.go +++ b/integration/v7/isolated/route_command_test.go @@ -6,7 +6,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccversion" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/router_groups_command_test.go b/integration/v7/isolated/router_groups_command_test.go index f4b5d3cd964..b49a79cf088 100644 --- a/integration/v7/isolated/router_groups_command_test.go +++ b/integration/v7/isolated/router_groups_command_test.go @@ -2,7 +2,7 @@ package isolated import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/routes_command_test.go b/integration/v7/isolated/routes_command_test.go index 221594140b8..4f5ff25fcd4 100644 --- a/integration/v7/isolated/routes_command_test.go +++ b/integration/v7/isolated/routes_command_test.go @@ -7,7 +7,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/run_task_command_test.go b/integration/v7/isolated/run_task_command_test.go index 3b3c7167f16..cbbdd446eec 100644 --- a/integration/v7/isolated/run_task_command_test.go +++ b/integration/v7/isolated/run_task_command_test.go @@ -6,7 +6,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccversion" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/scale_command_test.go b/integration/v7/isolated/scale_command_test.go index 7850cbad815..abbc4c48143 100644 --- a/integration/v7/isolated/scale_command_test.go +++ b/integration/v7/isolated/scale_command_test.go @@ -9,7 +9,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/security_groups_command_test.go b/integration/v7/isolated/security_groups_command_test.go index e92e78c24b7..8581aa8f1db 100644 --- a/integration/v7/isolated/security_groups_command_test.go +++ b/integration/v7/isolated/security_groups_command_test.go @@ -3,7 +3,7 @@ package isolated import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/service_access_command_test.go b/integration/v7/isolated/service_access_command_test.go index b69614a9b05..3cd24fc51a4 100644 --- a/integration/v7/isolated/service_access_command_test.go +++ b/integration/v7/isolated/service_access_command_test.go @@ -3,7 +3,7 @@ package isolated import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/integration/helpers/servicebrokerstub" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/service_brokers_command_test.go b/integration/v7/isolated/service_brokers_command_test.go index 84e050170ea..b27126d02f9 100644 --- a/integration/v7/isolated/service_brokers_command_test.go +++ b/integration/v7/isolated/service_brokers_command_test.go @@ -3,7 +3,7 @@ package isolated import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/integration/helpers/servicebrokerstub" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/service_command_test.go b/integration/v7/isolated/service_command_test.go index 58c7c10f382..c2f1c340c8a 100644 --- a/integration/v7/isolated/service_command_test.go +++ b/integration/v7/isolated/service_command_test.go @@ -7,7 +7,7 @@ import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/integration/helpers/servicebrokerstub" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/service_key_command_test.go b/integration/v7/isolated/service_key_command_test.go index 28ba833ca96..735eae8ba8f 100644 --- a/integration/v7/isolated/service_key_command_test.go +++ b/integration/v7/isolated/service_key_command_test.go @@ -7,7 +7,7 @@ import ( . "github.com/onsi/gomega/gbytes" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/integration/v7/isolated/service_keys_command_test.go b/integration/v7/isolated/service_keys_command_test.go index f018986d684..053e0b99cbf 100644 --- a/integration/v7/isolated/service_keys_command_test.go +++ b/integration/v7/isolated/service_keys_command_test.go @@ -5,7 +5,7 @@ import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/integration/helpers/servicebrokerstub" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/services_command_test.go b/integration/v7/isolated/services_command_test.go index 348313e7b40..6afe49ffa03 100644 --- a/integration/v7/isolated/services_command_test.go +++ b/integration/v7/isolated/services_command_test.go @@ -4,7 +4,7 @@ import ( "code.cloudfoundry.org/cli/integration/assets/hydrabroker/config" "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/integration/helpers/servicebrokerstub" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/set_droplet_command_test.go b/integration/v7/isolated/set_droplet_command_test.go index b75a4349df9..a5db7cbdf74 100644 --- a/integration/v7/isolated/set_droplet_command_test.go +++ b/integration/v7/isolated/set_droplet_command_test.go @@ -5,7 +5,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/set_env_command_test.go b/integration/v7/isolated/set_env_command_test.go index 2f2c29d1fca..1e3a71fa642 100644 --- a/integration/v7/isolated/set_env_command_test.go +++ b/integration/v7/isolated/set_env_command_test.go @@ -6,7 +6,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/set_health_check_command_test.go b/integration/v7/isolated/set_health_check_command_test.go index a03fcf675aa..5d9d48b054a 100644 --- a/integration/v7/isolated/set_health_check_command_test.go +++ b/integration/v7/isolated/set_health_check_command_test.go @@ -6,7 +6,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/set_label_command_test.go b/integration/v7/isolated/set_label_command_test.go index fcd7a321cd0..3b7cc72ed21 100644 --- a/integration/v7/isolated/set_label_command_test.go +++ b/integration/v7/isolated/set_label_command_test.go @@ -8,7 +8,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/set_org_default_isolation_segment_command_test.go b/integration/v7/isolated/set_org_default_isolation_segment_command_test.go index f15ef040468..3c00315471d 100644 --- a/integration/v7/isolated/set_org_default_isolation_segment_command_test.go +++ b/integration/v7/isolated/set_org_default_isolation_segment_command_test.go @@ -2,7 +2,7 @@ package isolated import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/set_org_quota_command_test.go b/integration/v7/isolated/set_org_quota_command_test.go index fd1fd1bcc66..0288818c69b 100644 --- a/integration/v7/isolated/set_org_quota_command_test.go +++ b/integration/v7/isolated/set_org_quota_command_test.go @@ -3,7 +3,7 @@ package isolated import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/set_org_role_command_test.go b/integration/v7/isolated/set_org_role_command_test.go index 4428cf074f8..60967ccef8e 100644 --- a/integration/v7/isolated/set_org_role_command_test.go +++ b/integration/v7/isolated/set_org_role_command_test.go @@ -3,7 +3,7 @@ package isolated import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/set_space_isolation_segment_command_test.go b/integration/v7/isolated/set_space_isolation_segment_command_test.go index 44050980843..64915b1890a 100644 --- a/integration/v7/isolated/set_space_isolation_segment_command_test.go +++ b/integration/v7/isolated/set_space_isolation_segment_command_test.go @@ -2,7 +2,7 @@ package isolated import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/set_space_quota_command_test.go b/integration/v7/isolated/set_space_quota_command_test.go index d92344b6cd5..19f2f451c66 100644 --- a/integration/v7/isolated/set_space_quota_command_test.go +++ b/integration/v7/isolated/set_space_quota_command_test.go @@ -3,7 +3,7 @@ package isolated import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/set_space_role_command_test.go b/integration/v7/isolated/set_space_role_command_test.go index 8cce52ff55f..647345df2fb 100644 --- a/integration/v7/isolated/set_space_role_command_test.go +++ b/integration/v7/isolated/set_space_role_command_test.go @@ -2,7 +2,7 @@ package isolated import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/share_private_domain_test.go b/integration/v7/isolated/share_private_domain_test.go index c4be911f8e3..e9e62700353 100644 --- a/integration/v7/isolated/share_private_domain_test.go +++ b/integration/v7/isolated/share_private_domain_test.go @@ -6,7 +6,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/share_route_command_test.go b/integration/v7/isolated/share_route_command_test.go index c1a646982a2..8697ac71e95 100644 --- a/integration/v7/isolated/share_route_command_test.go +++ b/integration/v7/isolated/share_route_command_test.go @@ -4,7 +4,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccversion" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/share_service_command_test.go b/integration/v7/isolated/share_service_command_test.go index ee67eb057c0..7d0ca44167e 100644 --- a/integration/v7/isolated/share_service_command_test.go +++ b/integration/v7/isolated/share_service_command_test.go @@ -4,7 +4,7 @@ import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/integration/helpers/servicebrokerstub" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/space_command_test.go b/integration/v7/isolated/space_command_test.go index 60334800966..86a786222e0 100644 --- a/integration/v7/isolated/space_command_test.go +++ b/integration/v7/isolated/space_command_test.go @@ -7,7 +7,7 @@ import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/space_quota_command_test.go b/integration/v7/isolated/space_quota_command_test.go index d30a0fa7aee..99203a033b3 100644 --- a/integration/v7/isolated/space_quota_command_test.go +++ b/integration/v7/isolated/space_quota_command_test.go @@ -2,7 +2,7 @@ package isolated import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/space_quotas_command_test.go b/integration/v7/isolated/space_quotas_command_test.go index c70a7392f60..4953883c6a3 100644 --- a/integration/v7/isolated/space_quotas_command_test.go +++ b/integration/v7/isolated/space_quotas_command_test.go @@ -2,7 +2,7 @@ package isolated import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/space_ssh_allowed_command_test.go b/integration/v7/isolated/space_ssh_allowed_command_test.go index b6203ef9610..f2bdc27eb8b 100644 --- a/integration/v7/isolated/space_ssh_allowed_command_test.go +++ b/integration/v7/isolated/space_ssh_allowed_command_test.go @@ -2,7 +2,7 @@ package isolated import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/space_users_command_test.go b/integration/v7/isolated/space_users_command_test.go index 5d090b2f576..2932a3af070 100644 --- a/integration/v7/isolated/space_users_command_test.go +++ b/integration/v7/isolated/space_users_command_test.go @@ -3,7 +3,7 @@ package isolated import ( "regexp" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/spaces_command_test.go b/integration/v7/isolated/spaces_command_test.go index 0357a5e9ea1..5ae047e821c 100644 --- a/integration/v7/isolated/spaces_command_test.go +++ b/integration/v7/isolated/spaces_command_test.go @@ -4,7 +4,7 @@ import ( "regexp" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/ssh_code_command_test.go b/integration/v7/isolated/ssh_code_command_test.go index 54316f2e638..2866e47d449 100644 --- a/integration/v7/isolated/ssh_code_command_test.go +++ b/integration/v7/isolated/ssh_code_command_test.go @@ -3,7 +3,7 @@ package isolated import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/ssh_command_test.go b/integration/v7/isolated/ssh_command_test.go index 69229a4adf9..064ef13c024 100644 --- a/integration/v7/isolated/ssh_command_test.go +++ b/integration/v7/isolated/ssh_command_test.go @@ -8,7 +8,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/ssh_enabled_command_test.go b/integration/v7/isolated/ssh_enabled_command_test.go index f5f13781c82..0c920497b87 100644 --- a/integration/v7/isolated/ssh_enabled_command_test.go +++ b/integration/v7/isolated/ssh_enabled_command_test.go @@ -4,7 +4,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/stack_command_test.go b/integration/v7/isolated/stack_command_test.go index 73e138e34d2..dde2aadfa4e 100644 --- a/integration/v7/isolated/stack_command_test.go +++ b/integration/v7/isolated/stack_command_test.go @@ -7,7 +7,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/stacks_command_test.go b/integration/v7/isolated/stacks_command_test.go index 8911396ddcf..3403d3cda63 100644 --- a/integration/v7/isolated/stacks_command_test.go +++ b/integration/v7/isolated/stacks_command_test.go @@ -5,7 +5,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/stage_package_command_test.go b/integration/v7/isolated/stage_package_command_test.go index 29091d49a22..51080f94746 100644 --- a/integration/v7/isolated/stage_package_command_test.go +++ b/integration/v7/isolated/stage_package_command_test.go @@ -6,7 +6,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/start_command_test.go b/integration/v7/isolated/start_command_test.go index 12f4f588e62..17cbf0a3daf 100644 --- a/integration/v7/isolated/start_command_test.go +++ b/integration/v7/isolated/start_command_test.go @@ -9,7 +9,7 @@ import ( "regexp" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/stop_command_test.go b/integration/v7/isolated/stop_command_test.go index 4ceb44b77d3..698d51a6e1b 100644 --- a/integration/v7/isolated/stop_command_test.go +++ b/integration/v7/isolated/stop_command_test.go @@ -3,7 +3,7 @@ package isolated import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/suggest_command_test.go b/integration/v7/isolated/suggest_command_test.go index d602c2b30a6..d7c3bac87ee 100644 --- a/integration/v7/isolated/suggest_command_test.go +++ b/integration/v7/isolated/suggest_command_test.go @@ -3,7 +3,7 @@ package isolated import ( "os/exec" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/table_alignment_test.go b/integration/v7/isolated/table_alignment_test.go index 46e3cfc7cff..0bd51ca4cd1 100644 --- a/integration/v7/isolated/table_alignment_test.go +++ b/integration/v7/isolated/table_alignment_test.go @@ -2,7 +2,7 @@ package isolated import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/target_command_test.go b/integration/v7/isolated/target_command_test.go index 6741b7e59a0..24ce9aa0085 100644 --- a/integration/v7/isolated/target_command_test.go +++ b/integration/v7/isolated/target_command_test.go @@ -4,8 +4,8 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/util/configv3" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/tasks_command_test.go b/integration/v7/isolated/tasks_command_test.go index 4c19fa0d484..8d1bb2d23da 100644 --- a/integration/v7/isolated/tasks_command_test.go +++ b/integration/v7/isolated/tasks_command_test.go @@ -4,7 +4,7 @@ import ( "fmt" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/terminate_task_command_test.go b/integration/v7/isolated/terminate_task_command_test.go index 93d5937739c..8214016dc13 100644 --- a/integration/v7/isolated/terminate_task_command_test.go +++ b/integration/v7/isolated/terminate_task_command_test.go @@ -4,7 +4,7 @@ import ( "fmt" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/token_refresh_test.go b/integration/v7/isolated/token_refresh_test.go index 0eec8352a38..17bdbf10e6e 100644 --- a/integration/v7/isolated/token_refresh_test.go +++ b/integration/v7/isolated/token_refresh_test.go @@ -4,7 +4,7 @@ import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/util/configv3" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/unbind_route_service_command_test.go b/integration/v7/isolated/unbind_route_service_command_test.go index 1db4aa1eace..52c4782b8f7 100644 --- a/integration/v7/isolated/unbind_route_service_command_test.go +++ b/integration/v7/isolated/unbind_route_service_command_test.go @@ -7,7 +7,7 @@ import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/integration/helpers/servicebrokerstub" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/unbind_service_command_test.go b/integration/v7/isolated/unbind_service_command_test.go index f5c4a921cf9..b6646c7d3eb 100644 --- a/integration/v7/isolated/unbind_service_command_test.go +++ b/integration/v7/isolated/unbind_service_command_test.go @@ -6,7 +6,7 @@ import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/integration/helpers/servicebrokerstub" "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/unmap_route_command_test.go b/integration/v7/isolated/unmap_route_command_test.go index c8e0778ef9c..13bd47c4b7e 100644 --- a/integration/v7/isolated/unmap_route_command_test.go +++ b/integration/v7/isolated/unmap_route_command_test.go @@ -5,7 +5,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/unset_env_command_test.go b/integration/v7/isolated/unset_env_command_test.go index 866181eb176..b1f1a2ea4a1 100644 --- a/integration/v7/isolated/unset_env_command_test.go +++ b/integration/v7/isolated/unset_env_command_test.go @@ -6,7 +6,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/unset_label_command_test.go b/integration/v7/isolated/unset_label_command_test.go index 813312b170a..46434a3da7f 100644 --- a/integration/v7/isolated/unset_label_command_test.go +++ b/integration/v7/isolated/unset_label_command_test.go @@ -7,7 +7,7 @@ import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/integration/helpers/servicebrokerstub" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/unset_org_role_command_test.go b/integration/v7/isolated/unset_org_role_command_test.go index 3cc336c15ad..c8710d15e57 100644 --- a/integration/v7/isolated/unset_org_role_command_test.go +++ b/integration/v7/isolated/unset_org_role_command_test.go @@ -4,7 +4,7 @@ import ( "fmt" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/unset_space_quota_command_test.go b/integration/v7/isolated/unset_space_quota_command_test.go index c3183e69fdb..54eea9df6d4 100644 --- a/integration/v7/isolated/unset_space_quota_command_test.go +++ b/integration/v7/isolated/unset_space_quota_command_test.go @@ -3,7 +3,7 @@ package isolated import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/unset_space_role_command_test.go b/integration/v7/isolated/unset_space_role_command_test.go index f6cf0937ced..c6bd9f09233 100644 --- a/integration/v7/isolated/unset_space_role_command_test.go +++ b/integration/v7/isolated/unset_space_role_command_test.go @@ -4,7 +4,7 @@ import ( "fmt" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/unshare_private_domain_test.go b/integration/v7/isolated/unshare_private_domain_test.go index 2287b5e8cb0..aa30eea5552 100644 --- a/integration/v7/isolated/unshare_private_domain_test.go +++ b/integration/v7/isolated/unshare_private_domain_test.go @@ -3,7 +3,7 @@ package isolated import ( . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/unshare_route_command_test.go b/integration/v7/isolated/unshare_route_command_test.go index b58260bd0f4..8520edf2b5f 100644 --- a/integration/v7/isolated/unshare_route_command_test.go +++ b/integration/v7/isolated/unshare_route_command_test.go @@ -6,7 +6,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccversion" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/unshare_service_command_test.go b/integration/v7/isolated/unshare_service_command_test.go index 5fb64f8edcb..174576601ab 100644 --- a/integration/v7/isolated/unshare_service_command_test.go +++ b/integration/v7/isolated/unshare_service_command_test.go @@ -3,7 +3,7 @@ package isolated import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/integration/helpers/servicebrokerstub" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/update_destination_command_test.go b/integration/v7/isolated/update_destination_command_test.go index 6052d8795b3..0345cacc3bd 100644 --- a/integration/v7/isolated/update_destination_command_test.go +++ b/integration/v7/isolated/update_destination_command_test.go @@ -4,7 +4,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccversion" . "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/update_org_quota_command_test.go b/integration/v7/isolated/update_org_quota_command_test.go index 381c4004f44..af05857720d 100644 --- a/integration/v7/isolated/update_org_quota_command_test.go +++ b/integration/v7/isolated/update_org_quota_command_test.go @@ -3,7 +3,7 @@ package isolated import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccversion" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/update_service_broker_command_test.go b/integration/v7/isolated/update_service_broker_command_test.go index 0b0d654a5c3..04b888a2872 100644 --- a/integration/v7/isolated/update_service_broker_command_test.go +++ b/integration/v7/isolated/update_service_broker_command_test.go @@ -3,7 +3,7 @@ package isolated import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/integration/helpers/servicebrokerstub" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/update_service_command_test.go b/integration/v7/isolated/update_service_command_test.go index 6f18d8fea84..d569fd2afd1 100644 --- a/integration/v7/isolated/update_service_command_test.go +++ b/integration/v7/isolated/update_service_command_test.go @@ -6,8 +6,8 @@ import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/integration/helpers/servicebrokerstub" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/update_space_quota_command_test.go b/integration/v7/isolated/update_space_quota_command_test.go index 4b2637d9610..e76527be52c 100644 --- a/integration/v7/isolated/update_space_quota_command_test.go +++ b/integration/v7/isolated/update_space_quota_command_test.go @@ -3,7 +3,7 @@ package isolated import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccversion" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/update_user_provided_service_command_test.go b/integration/v7/isolated/update_user_provided_service_command_test.go index 833ed47bffc..25ac544784e 100644 --- a/integration/v7/isolated/update_user_provided_service_command_test.go +++ b/integration/v7/isolated/update_user_provided_service_command_test.go @@ -4,7 +4,7 @@ import ( "os" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/upgrade_service_command_test.go b/integration/v7/isolated/upgrade_service_command_test.go index 0a1650bf3e6..9cdc10d8bfe 100644 --- a/integration/v7/isolated/upgrade_service_command_test.go +++ b/integration/v7/isolated/upgrade_service_command_test.go @@ -6,7 +6,7 @@ import ( "code.cloudfoundry.org/cli/integration/assets/hydrabroker/config" "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/integration/helpers/servicebrokerstub" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/isolated/verbose_flag_test.go b/integration/v7/isolated/verbose_flag_test.go index 466266c9d7a..0201a9cde24 100644 --- a/integration/v7/isolated/verbose_flag_test.go +++ b/integration/v7/isolated/verbose_flag_test.go @@ -9,8 +9,8 @@ import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/util/configv3" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/push/app_start_timeout_flag_test.go b/integration/v7/push/app_start_timeout_flag_test.go index a8c703dc2bd..32e1f109405 100644 --- a/integration/v7/push/app_start_timeout_flag_test.go +++ b/integration/v7/push/app_start_timeout_flag_test.go @@ -7,7 +7,7 @@ import ( "path/filepath" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gexec" ) diff --git a/integration/v7/push/buildpacks_test.go b/integration/v7/push/buildpacks_test.go index 9420272d70d..3a9ab46d746 100644 --- a/integration/v7/push/buildpacks_test.go +++ b/integration/v7/push/buildpacks_test.go @@ -2,7 +2,7 @@ package push import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/push/cfignore_test.go b/integration/v7/push/cfignore_test.go index 45c735fdcff..8b31ddef3a9 100644 --- a/integration/v7/push/cfignore_test.go +++ b/integration/v7/push/cfignore_test.go @@ -6,7 +6,7 @@ import ( "path/filepath" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gexec" ) diff --git a/integration/v7/push/combination_manifest_and_flag_test.go b/integration/v7/push/combination_manifest_and_flag_test.go index f870b9fff7b..3b89bc02b8d 100644 --- a/integration/v7/push/combination_manifest_and_flag_test.go +++ b/integration/v7/push/combination_manifest_and_flag_test.go @@ -7,8 +7,8 @@ import ( "regexp" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/push/disk_flag_test.go b/integration/v7/push/disk_flag_test.go index 2729bd1d29b..c53fb699453 100644 --- a/integration/v7/push/disk_flag_test.go +++ b/integration/v7/push/disk_flag_test.go @@ -2,7 +2,7 @@ package push import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/push/docker_test.go b/integration/v7/push/docker_test.go index a6ad720d08b..3c4e99c350e 100644 --- a/integration/v7/push/docker_test.go +++ b/integration/v7/push/docker_test.go @@ -5,7 +5,7 @@ import ( "path/filepath" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/push/droplet_flag_test.go b/integration/v7/push/droplet_flag_test.go index 66d3e24b25f..3294f22be34 100644 --- a/integration/v7/push/droplet_flag_test.go +++ b/integration/v7/push/droplet_flag_test.go @@ -6,7 +6,7 @@ import ( "os" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/push/health_check_test.go b/integration/v7/push/health_check_test.go index 1f0f764515a..0e60a5ebe6e 100644 --- a/integration/v7/push/health_check_test.go +++ b/integration/v7/push/health_check_test.go @@ -4,7 +4,7 @@ import ( "path/filepath" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/push/help_test.go b/integration/v7/push/help_test.go index 1529492af15..c86d0b9999b 100644 --- a/integration/v7/push/help_test.go +++ b/integration/v7/push/help_test.go @@ -5,7 +5,7 @@ import ( "strings" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/push/ignore_app_files_test.go b/integration/v7/push/ignore_app_files_test.go index 8bc27d10586..e78f869643e 100644 --- a/integration/v7/push/ignore_app_files_test.go +++ b/integration/v7/push/ignore_app_files_test.go @@ -6,7 +6,7 @@ import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/push/input_errors_test.go b/integration/v7/push/input_errors_test.go index 413ab6e40be..3384ad5b230 100644 --- a/integration/v7/push/input_errors_test.go +++ b/integration/v7/push/input_errors_test.go @@ -2,7 +2,7 @@ package push import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/push/instances_flag_test.go b/integration/v7/push/instances_flag_test.go index ec5ed668bc3..d4387b2b328 100644 --- a/integration/v7/push/instances_flag_test.go +++ b/integration/v7/push/instances_flag_test.go @@ -4,7 +4,7 @@ import ( "time" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/push/log_rate_limit_flag_test.go b/integration/v7/push/log_rate_limit_flag_test.go index a8797b43db7..d1be10ef632 100644 --- a/integration/v7/push/log_rate_limit_flag_test.go +++ b/integration/v7/push/log_rate_limit_flag_test.go @@ -3,7 +3,7 @@ package push import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccversion" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gexec" ) diff --git a/integration/v7/push/manifest_diff_test.go b/integration/v7/push/manifest_diff_test.go index cd3a56ce4f3..05b520de77d 100644 --- a/integration/v7/push/manifest_diff_test.go +++ b/integration/v7/push/manifest_diff_test.go @@ -4,7 +4,7 @@ import ( "path/filepath" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/push/manifest_location_test.go b/integration/v7/push/manifest_location_test.go index 0761441a704..2564e031d6a 100644 --- a/integration/v7/push/manifest_location_test.go +++ b/integration/v7/push/manifest_location_test.go @@ -5,7 +5,7 @@ import ( "path/filepath" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/push/manifest_with_app_name_and_no_route_flag_test.go b/integration/v7/push/manifest_with_app_name_and_no_route_flag_test.go index c490c6e2225..2494eddc7c1 100644 --- a/integration/v7/push/manifest_with_app_name_and_no_route_flag_test.go +++ b/integration/v7/push/manifest_with_app_name_and_no_route_flag_test.go @@ -7,7 +7,7 @@ import ( "path/filepath" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/push/manifest_with_app_name_test.go b/integration/v7/push/manifest_with_app_name_test.go index 3d004dae3f3..c2ddc987ed4 100644 --- a/integration/v7/push/manifest_with_app_name_test.go +++ b/integration/v7/push/manifest_with_app_name_test.go @@ -7,7 +7,7 @@ import ( "path/filepath" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/push/memory_flag_test.go b/integration/v7/push/memory_flag_test.go index 28e81bf476b..0b577371f7f 100644 --- a/integration/v7/push/memory_flag_test.go +++ b/integration/v7/push/memory_flag_test.go @@ -4,7 +4,7 @@ import ( "time" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/push/name_only_test.go b/integration/v7/push/name_only_test.go index 2d80d195d0c..28fbe161965 100644 --- a/integration/v7/push/name_only_test.go +++ b/integration/v7/push/name_only_test.go @@ -2,7 +2,7 @@ package push import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/push/no_route_test.go b/integration/v7/push/no_route_test.go index 3fdea25f1ff..a776ee0eb50 100644 --- a/integration/v7/push/no_route_test.go +++ b/integration/v7/push/no_route_test.go @@ -4,7 +4,7 @@ import ( "path/filepath" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/push/no_start_test.go b/integration/v7/push/no_start_test.go index 2708692551e..e95975427cc 100644 --- a/integration/v7/push/no_start_test.go +++ b/integration/v7/push/no_start_test.go @@ -3,7 +3,7 @@ package push import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/push/no_wait_test.go b/integration/v7/push/no_wait_test.go index ca7798dda55..b17fd4fd01b 100644 --- a/integration/v7/push/no_wait_test.go +++ b/integration/v7/push/no_wait_test.go @@ -2,7 +2,7 @@ package push import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/push/path_test.go b/integration/v7/push/path_test.go index f1b0914afec..11c29ab6c63 100644 --- a/integration/v7/push/path_test.go +++ b/integration/v7/push/path_test.go @@ -9,7 +9,7 @@ import ( "runtime" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/push/push_output_test.go b/integration/v7/push/push_output_test.go index a47373158ea..03224742ce9 100644 --- a/integration/v7/push/push_output_test.go +++ b/integration/v7/push/push_output_test.go @@ -7,7 +7,7 @@ import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/push/push_suite_test.go b/integration/v7/push/push_suite_test.go index edf730363bc..f1d17efd824 100644 --- a/integration/v7/push/push_suite_test.go +++ b/integration/v7/push/push_suite_test.go @@ -8,7 +8,7 @@ import ( "time" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/integration/v7/push/random_route_test.go b/integration/v7/push/random_route_test.go index 2dc130ac882..f50d7e4c2a4 100644 --- a/integration/v7/push/random_route_test.go +++ b/integration/v7/push/random_route_test.go @@ -6,7 +6,7 @@ import ( "time" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/push/resource_matching_test.go b/integration/v7/push/resource_matching_test.go index 2af37efb83c..078f1787260 100644 --- a/integration/v7/push/resource_matching_test.go +++ b/integration/v7/push/resource_matching_test.go @@ -8,7 +8,7 @@ import ( "time" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/push/rolling_push_test.go b/integration/v7/push/rolling_push_test.go index 1b4739e507c..689faf5244f 100644 --- a/integration/v7/push/rolling_push_test.go +++ b/integration/v7/push/rolling_push_test.go @@ -4,7 +4,7 @@ import ( "fmt" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/push/simple_manifest_only_test.go b/integration/v7/push/simple_manifest_only_test.go index 2b8e2017c79..6e755643e44 100644 --- a/integration/v7/push/simple_manifest_only_test.go +++ b/integration/v7/push/simple_manifest_only_test.go @@ -6,8 +6,7 @@ import ( "path/filepath" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/push/stacks_test.go b/integration/v7/push/stacks_test.go index ea384ed31a9..9fc5a0e378b 100644 --- a/integration/v7/push/stacks_test.go +++ b/integration/v7/push/stacks_test.go @@ -2,7 +2,7 @@ package push import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/push/start_command_test.go b/integration/v7/push/start_command_test.go index 893fbf0fe1b..efe675f513f 100644 --- a/integration/v7/push/start_command_test.go +++ b/integration/v7/push/start_command_test.go @@ -5,8 +5,7 @@ import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/integration/v7/push/symlink_resources_test.go b/integration/v7/push/symlink_resources_test.go index ee2918c3dc7..e2413af8a59 100644 --- a/integration/v7/push/symlink_resources_test.go +++ b/integration/v7/push/symlink_resources_test.go @@ -7,7 +7,7 @@ import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gexec" ) diff --git a/integration/v7/push/symlink_test.go b/integration/v7/push/symlink_test.go index 93bc7f842b2..1e838520420 100644 --- a/integration/v7/push/symlink_test.go +++ b/integration/v7/push/symlink_test.go @@ -6,7 +6,7 @@ import ( "path/filepath" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gexec" ) diff --git a/integration/v7/push/targeting_test.go b/integration/v7/push/targeting_test.go index eb532fcbd88..e109f058eb8 100644 --- a/integration/v7/push/targeting_test.go +++ b/integration/v7/push/targeting_test.go @@ -2,7 +2,7 @@ package push import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" ) var _ = Describe("targeting the correct environment", func() { diff --git a/integration/v7/push/tasks_test.go b/integration/v7/push/tasks_test.go index 63f2f566095..4b85976ea2a 100644 --- a/integration/v7/push/tasks_test.go +++ b/integration/v7/push/tasks_test.go @@ -3,7 +3,7 @@ package push import ( "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" "github.com/onsi/gomega/gexec" diff --git a/integration/v7/selfcontained/api_command_test.go b/integration/v7/selfcontained/api_command_test.go index 3347cb83b1a..4d5bee2df0a 100644 --- a/integration/v7/selfcontained/api_command_test.go +++ b/integration/v7/selfcontained/api_command_test.go @@ -7,7 +7,7 @@ import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/integration/v7/selfcontained/fake" "code.cloudfoundry.org/cli/util/configv3" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/onsi/gomega/gexec" ) diff --git a/integration/v7/selfcontained/create_space_command_test.go b/integration/v7/selfcontained/create_space_command_test.go index 21c7e65ccb4..5ba5e2324e0 100644 --- a/integration/v7/selfcontained/create_space_command_test.go +++ b/integration/v7/selfcontained/create_space_command_test.go @@ -8,7 +8,7 @@ import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/integration/v7/selfcontained/fake" "code.cloudfoundry.org/cli/util/configv3" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/onsi/gomega/gbytes" "github.com/onsi/gomega/gexec" diff --git a/integration/v7/selfcontained/kubernetes_auth_log_test.go b/integration/v7/selfcontained/kubernetes_auth_log_test.go index 8d2d244c4c3..3785de18395 100644 --- a/integration/v7/selfcontained/kubernetes_auth_log_test.go +++ b/integration/v7/selfcontained/kubernetes_auth_log_test.go @@ -7,7 +7,7 @@ import ( "code.cloudfoundry.org/cli/integration/helpers" "code.cloudfoundry.org/cli/integration/v7/selfcontained/fake" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/onsi/gomega/gexec" apiv1 "k8s.io/client-go/tools/clientcmd/api/v1" diff --git a/integration/v7/selfcontained/kubernetes_auth_test.go b/integration/v7/selfcontained/kubernetes_auth_test.go index dfaa8d8bfa0..44fae9f3a50 100644 --- a/integration/v7/selfcontained/kubernetes_auth_test.go +++ b/integration/v7/selfcontained/kubernetes_auth_test.go @@ -4,7 +4,7 @@ import ( "net/http" "path/filepath" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/onsi/gomega/gexec" apiv1 "k8s.io/client-go/tools/clientcmd/api/v1" diff --git a/integration/v7/selfcontained/login_command_test.go b/integration/v7/selfcontained/login_command_test.go index 5def6b7b457..9476df9bff5 100644 --- a/integration/v7/selfcontained/login_command_test.go +++ b/integration/v7/selfcontained/login_command_test.go @@ -6,7 +6,7 @@ import ( "os" "path/filepath" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/onsi/gomega/gbytes" "github.com/onsi/gomega/gexec" diff --git a/integration/v7/selfcontained/logout_command_test.go b/integration/v7/selfcontained/logout_command_test.go index b607be4146a..647273c3899 100644 --- a/integration/v7/selfcontained/logout_command_test.go +++ b/integration/v7/selfcontained/logout_command_test.go @@ -4,7 +4,7 @@ import ( "net/http" "path/filepath" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/onsi/gomega/gexec" apiv1 "k8s.io/client-go/tools/clientcmd/api/v1" diff --git a/integration/v7/selfcontained/selfcontained_suite_test.go b/integration/v7/selfcontained/selfcontained_suite_test.go index 403915d2aed..336ec8bcc8b 100644 --- a/integration/v7/selfcontained/selfcontained_suite_test.go +++ b/integration/v7/selfcontained/selfcontained_suite_test.go @@ -17,7 +17,7 @@ import ( "code.cloudfoundry.org/cli/util/configv3" "github.com/SermoDigital/jose/crypto" "github.com/SermoDigital/jose/jws" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "gopkg.in/yaml.v2" apiv1 "k8s.io/client-go/tools/clientcmd/api/v1" diff --git a/plugin/plugin_examples/test_rpc_server_example/test_rpc_server_example_suite_test.go b/plugin/plugin_examples/test_rpc_server_example/test_rpc_server_example_suite_test.go index ec3e95fbb87..a31acf07fac 100644 --- a/plugin/plugin_examples/test_rpc_server_example/test_rpc_server_example_suite_test.go +++ b/plugin/plugin_examples/test_rpc_server_example/test_rpc_server_example_suite_test.go @@ -4,7 +4,7 @@ import ( "time" "code.cloudfoundry.org/cli/cf/util/testhelpers/pluginbuilder" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/plugin/plugin_examples/test_rpc_server_example/test_rpc_server_example_test.go b/plugin/plugin_examples/test_rpc_server_example/test_rpc_server_example_test.go index 5e506e0514f..26bf1c7ed4c 100644 --- a/plugin/plugin_examples/test_rpc_server_example/test_rpc_server_example_test.go +++ b/plugin/plugin_examples/test_rpc_server_example/test_rpc_server_example_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/cf/util/testhelpers/rpcserver" "code.cloudfoundry.org/cli/cf/util/testhelpers/rpcserver/rpcserverfakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/onsi/gomega/gbytes" "github.com/onsi/gomega/gexec" diff --git a/plugin/plugin_shim_test.go b/plugin/plugin_shim_test.go index c7495d62d7a..24b49226655 100644 --- a/plugin/plugin_shim_test.go +++ b/plugin/plugin_shim_test.go @@ -7,7 +7,7 @@ import ( "code.cloudfoundry.org/cli/cf/util/testhelpers/rpcserver" "code.cloudfoundry.org/cli/cf/util/testhelpers/rpcserver/rpcserverfakes" "code.cloudfoundry.org/cli/plugin" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" diff --git a/plugin/plugin_suite_test.go b/plugin/plugin_suite_test.go index e05394e937a..4b02e049580 100644 --- a/plugin/plugin_suite_test.go +++ b/plugin/plugin_suite_test.go @@ -4,7 +4,7 @@ import ( "path/filepath" "code.cloudfoundry.org/cli/cf/util/testhelpers/pluginbuilder" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/plugin/rpc/call_command_registry_test.go b/plugin/rpc/call_command_registry_test.go index 1cc3b48149d..6d21be85aa9 100644 --- a/plugin/rpc/call_command_registry_test.go +++ b/plugin/rpc/call_command_registry_test.go @@ -8,7 +8,7 @@ import ( "code.cloudfoundry.org/cli/cf/trace/tracefakes" . "code.cloudfoundry.org/cli/plugin/rpc" . "code.cloudfoundry.org/cli/plugin/rpc/fakecommand" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/plugin/rpc/cli_rpc_server_test.go b/plugin/rpc/cli_rpc_server_test.go index 9c863767f4d..5f55b1594d3 100644 --- a/plugin/rpc/cli_rpc_server_test.go +++ b/plugin/rpc/cli_rpc_server_test.go @@ -19,7 +19,7 @@ import ( cmdRunner "code.cloudfoundry.org/cli/plugin/rpc" . "code.cloudfoundry.org/cli/plugin/rpc/fakecommand" "code.cloudfoundry.org/cli/plugin/rpc/rpcfakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/plugin/rpc/rpc_suite_test.go b/plugin/rpc/rpc_suite_test.go index 3d55040f792..e67a82a6263 100644 --- a/plugin/rpc/rpc_suite_test.go +++ b/plugin/rpc/rpc_suite_test.go @@ -2,7 +2,7 @@ package rpc_test import ( "code.cloudfoundry.org/cli/plugin/rpc" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/resources/last_operation_resource_test.go b/resources/last_operation_resource_test.go index 87267b65bbe..c4325206ccc 100644 --- a/resources/last_operation_resource_test.go +++ b/resources/last_operation_resource_test.go @@ -4,8 +4,8 @@ import ( "encoding/json" . "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/resources/process_resource_test.go b/resources/process_resource_test.go index 946c6ab9c70..ff4a36d9780 100644 --- a/resources/process_resource_test.go +++ b/resources/process_resource_test.go @@ -6,7 +6,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/types" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gstruct" ) diff --git a/resources/quota_resource_test.go b/resources/quota_resource_test.go index 14273d96ee1..be6c2aeb381 100644 --- a/resources/quota_resource_test.go +++ b/resources/quota_resource_test.go @@ -4,8 +4,7 @@ import ( "encoding/json" "code.cloudfoundry.org/cli/types" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/resources/resources_suite_test.go b/resources/resources_suite_test.go index 3b4f1a6335a..dd8d7c3e7dd 100644 --- a/resources/resources_suite_test.go +++ b/resources/resources_suite_test.go @@ -3,7 +3,7 @@ package resources_test import ( "testing" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/resources/route_binding_test.go b/resources/route_binding_test.go index 2979101eb4b..8817335942f 100644 --- a/resources/route_binding_test.go +++ b/resources/route_binding_test.go @@ -4,8 +4,8 @@ import ( "encoding/json" "code.cloudfoundry.org/cli/types" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/resources/security_group_resource_test.go b/resources/security_group_resource_test.go index 5370d473923..b4e5e284f0c 100644 --- a/resources/security_group_resource_test.go +++ b/resources/security_group_resource_test.go @@ -4,8 +4,8 @@ import ( "encoding/json" . "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/resources/service_broker_resource_test.go b/resources/service_broker_resource_test.go index c89ffda1426..024346b08d3 100644 --- a/resources/service_broker_resource_test.go +++ b/resources/service_broker_resource_test.go @@ -5,8 +5,7 @@ import ( . "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/types" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/resources/service_credential_binding_resource_test.go b/resources/service_credential_binding_resource_test.go index f73c02079ae..bb7c0d27334 100644 --- a/resources/service_credential_binding_resource_test.go +++ b/resources/service_credential_binding_resource_test.go @@ -5,8 +5,7 @@ import ( . "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/types" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/resources/service_instance_resource_test.go b/resources/service_instance_resource_test.go index 66e0e217168..2f8beea737f 100644 --- a/resources/service_instance_resource_test.go +++ b/resources/service_instance_resource_test.go @@ -6,8 +6,7 @@ import ( "code.cloudfoundry.org/cli/types" . "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/resources/service_instance_usage_summary_resource_test.go b/resources/service_instance_usage_summary_resource_test.go index d411c89b408..0f2a3293a5a 100644 --- a/resources/service_instance_usage_summary_resource_test.go +++ b/resources/service_instance_usage_summary_resource_test.go @@ -4,8 +4,7 @@ import ( "encoding/json" . "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/resources/service_offering_resource_test.go b/resources/service_offering_resource_test.go index 5ed65584d03..8c699b1655b 100644 --- a/resources/service_offering_resource_test.go +++ b/resources/service_offering_resource_test.go @@ -5,8 +5,7 @@ import ( . "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/types" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/resources/service_plan_resource_test.go b/resources/service_plan_resource_test.go index 27df2e3b14a..fbe932baf30 100644 --- a/resources/service_plan_resource_test.go +++ b/resources/service_plan_resource_test.go @@ -5,8 +5,7 @@ import ( . "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/types" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/resources/service_plan_visibility_resource_test.go b/resources/service_plan_visibility_resource_test.go index 51c08820751..7661b0f9a3a 100644 --- a/resources/service_plan_visibility_resource_test.go +++ b/resources/service_plan_visibility_resource_test.go @@ -4,8 +4,7 @@ import ( "encoding/json" . "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/resources/shared_to_spaces_resource_test.go b/resources/shared_to_spaces_resource_test.go index fc3322458f1..bd976368c2f 100644 --- a/resources/shared_to_spaces_resource_test.go +++ b/resources/shared_to_spaces_resource_test.go @@ -6,8 +6,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" . "code.cloudfoundry.org/cli/resources" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/types/filtered_interface_test.go b/types/filtered_interface_test.go index bf10aaf8515..09da42ec708 100644 --- a/types/filtered_interface_test.go +++ b/types/filtered_interface_test.go @@ -2,7 +2,7 @@ package types_test import ( . "code.cloudfoundry.org/cli/types" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/types/filtered_string_test.go b/types/filtered_string_test.go index bad9d09fa9c..bb0dd23090f 100644 --- a/types/filtered_string_test.go +++ b/types/filtered_string_test.go @@ -2,8 +2,8 @@ package types_test import ( . "code.cloudfoundry.org/cli/types" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/types/json_object_test.go b/types/json_object_test.go index 5291979e293..45390c1ef13 100644 --- a/types/json_object_test.go +++ b/types/json_object_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" . "code.cloudfoundry.org/cli/types" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/types/null_bool_test.go b/types/null_bool_test.go index 03e63ff77bf..9e73bcbc917 100644 --- a/types/null_bool_test.go +++ b/types/null_bool_test.go @@ -2,8 +2,7 @@ package types_test import ( . "code.cloudfoundry.org/cli/types" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/types/null_bytesize_in_mb_test.go b/types/null_bytesize_in_mb_test.go index 1bb4c20f205..f713e3d270a 100644 --- a/types/null_bytesize_in_mb_test.go +++ b/types/null_bytesize_in_mb_test.go @@ -2,7 +2,7 @@ package types_test import ( . "code.cloudfoundry.org/cli/types" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/types/null_int_test.go b/types/null_int_test.go index c24bda0f666..455a9eec1d6 100644 --- a/types/null_int_test.go +++ b/types/null_int_test.go @@ -3,8 +3,8 @@ package types_test import ( . "code.cloudfoundry.org/cli/types" "github.com/jessevdk/go-flags" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/types/null_string_test.go b/types/null_string_test.go index 816397cce32..ddeca89c2be 100644 --- a/types/null_string_test.go +++ b/types/null_string_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" . "code.cloudfoundry.org/cli/types" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/types/null_uint64_test.go b/types/null_uint64_test.go index 329d282200a..884a69d3113 100644 --- a/types/null_uint64_test.go +++ b/types/null_uint64_test.go @@ -2,7 +2,7 @@ package types_test import ( . "code.cloudfoundry.org/cli/types" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/types/optional_boolean_test.go b/types/optional_boolean_test.go index 146c5a33764..77ee7627018 100644 --- a/types/optional_boolean_test.go +++ b/types/optional_boolean_test.go @@ -3,8 +3,7 @@ package types_test import ( "code.cloudfoundry.org/cli/types" "code.cloudfoundry.org/jsonry" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/types/optional_object_test.go b/types/optional_object_test.go index 9dab7eb5144..6ba1e53dd60 100644 --- a/types/optional_object_test.go +++ b/types/optional_object_test.go @@ -3,7 +3,7 @@ package types_test import ( "code.cloudfoundry.org/cli/types" "code.cloudfoundry.org/jsonry" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/types/optional_string_slice_test.go b/types/optional_string_slice_test.go index e2eb6baf6ca..63e7ca0c39f 100644 --- a/types/optional_string_slice_test.go +++ b/types/optional_string_slice_test.go @@ -3,7 +3,7 @@ package types_test import ( "code.cloudfoundry.org/cli/types" "code.cloudfoundry.org/jsonry" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/types/optional_string_test.go b/types/optional_string_test.go index 7c84ed661dd..6539dd72b90 100644 --- a/types/optional_string_test.go +++ b/types/optional_string_test.go @@ -3,7 +3,7 @@ package types_test import ( "code.cloudfoundry.org/cli/types" "code.cloudfoundry.org/jsonry" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/types/types_suite_test.go b/types/types_suite_test.go index b026169c12b..5cd5acbcb2a 100644 --- a/types/types_suite_test.go +++ b/types/types_suite_test.go @@ -1,7 +1,7 @@ package types_test import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/util/batcher/batcher_suite_test.go b/util/batcher/batcher_suite_test.go index 1f0a5c4e9fb..b3ac7ff6ac8 100644 --- a/util/batcher/batcher_suite_test.go +++ b/util/batcher/batcher_suite_test.go @@ -3,7 +3,7 @@ package batcher_test import ( "testing" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/util/batcher/batcher_test.go b/util/batcher/batcher_test.go index 8189ee43c6f..bf7531a888b 100644 --- a/util/batcher/batcher_test.go +++ b/util/batcher/batcher_test.go @@ -7,7 +7,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/util/batcher" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/util/checksum_test.go b/util/checksum_test.go index bcd4b712820..d7dfe1cd299 100644 --- a/util/checksum_test.go +++ b/util/checksum_test.go @@ -7,7 +7,7 @@ import ( . "code.cloudfoundry.org/cli/util" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/util/clissh/ssh_suite_test.go b/util/clissh/ssh_suite_test.go index 0adf40c9b9d..9d157c12c19 100644 --- a/util/clissh/ssh_suite_test.go +++ b/util/clissh/ssh_suite_test.go @@ -5,7 +5,7 @@ import ( "path/filepath" "time" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" log "github.com/sirupsen/logrus" "golang.org/x/crypto/ssh" diff --git a/util/clissh/ssh_test.go b/util/clissh/ssh_test.go index c232f1c3661..a8e6851520d 100644 --- a/util/clissh/ssh_test.go +++ b/util/clissh/ssh_test.go @@ -29,7 +29,7 @@ import ( "code.cloudfoundry.org/lager/lagertest" "github.com/kr/pty" "github.com/moby/term" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "golang.org/x/crypto/ssh" ) diff --git a/util/command_parser/command_parser_test.go b/util/command_parser/command_parser_test.go index 7023594e583..6beb0d6846f 100644 --- a/util/command_parser/command_parser_test.go +++ b/util/command_parser/command_parser_test.go @@ -5,7 +5,7 @@ import ( "code.cloudfoundry.org/cli/util/command_parser" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "io/ioutil" ) diff --git a/util/command_parser/parser_suite_test.go b/util/command_parser/parser_suite_test.go index 73090e428ea..1e796cb6cfb 100644 --- a/util/command_parser/parser_suite_test.go +++ b/util/command_parser/parser_suite_test.go @@ -1,7 +1,7 @@ package command_parser_test import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" log "github.com/sirupsen/logrus" diff --git a/util/configv3/color_test.go b/util/configv3/color_test.go index 249784077e2..d3ae227e00a 100644 --- a/util/configv3/color_test.go +++ b/util/configv3/color_test.go @@ -5,8 +5,7 @@ import ( "os" . "code.cloudfoundry.org/cli/util/configv3" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/util/configv3/config_suite_test.go b/util/configv3/config_suite_test.go index 07630b8b33d..95c6c00c320 100644 --- a/util/configv3/config_suite_test.go +++ b/util/configv3/config_suite_test.go @@ -6,7 +6,7 @@ import ( "path/filepath" "code.cloudfoundry.org/cli/integration/helpers" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/util/configv3/config_test.go b/util/configv3/config_test.go index b8f6e35aff2..81418a9e980 100644 --- a/util/configv3/config_test.go +++ b/util/configv3/config_test.go @@ -4,7 +4,7 @@ import ( "os" "code.cloudfoundry.org/cli/util/configv3" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/util/configv3/config_unix_test.go b/util/configv3/config_unix_test.go index 6af4f29361b..21b972f9069 100644 --- a/util/configv3/config_unix_test.go +++ b/util/configv3/config_unix_test.go @@ -11,8 +11,7 @@ import ( . "code.cloudfoundry.org/cli/util/configv3" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/util/configv3/config_windows_test.go b/util/configv3/config_windows_test.go index fad8241b3ac..e478e4da39a 100644 --- a/util/configv3/config_windows_test.go +++ b/util/configv3/config_windows_test.go @@ -10,8 +10,7 @@ import ( . "code.cloudfoundry.org/cli/util/configv3" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/util/configv3/default_user_config_test.go b/util/configv3/default_user_config_test.go index 350a94b6ff0..496de4924d5 100644 --- a/util/configv3/default_user_config_test.go +++ b/util/configv3/default_user_config_test.go @@ -2,7 +2,7 @@ package configv3_test import ( "code.cloudfoundry.org/cli/util/configv3" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/util/configv3/dynamic_user_config_test.go b/util/configv3/dynamic_user_config_test.go index 907250acb10..e4d11aaa226 100644 --- a/util/configv3/dynamic_user_config_test.go +++ b/util/configv3/dynamic_user_config_test.go @@ -5,7 +5,7 @@ import ( "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/configv3/configv3fakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/util/configv3/env_test.go b/util/configv3/env_test.go index aa77499d6f0..0f7a060f6cd 100644 --- a/util/configv3/env_test.go +++ b/util/configv3/env_test.go @@ -5,8 +5,7 @@ import ( . "code.cloudfoundry.org/cli/util/configv3" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/util/configv3/json_config_test.go b/util/configv3/json_config_test.go index 19c16b1c420..236579b4280 100644 --- a/util/configv3/json_config_test.go +++ b/util/configv3/json_config_test.go @@ -7,7 +7,7 @@ import ( "code.cloudfoundry.org/cli/util/configv3" . "code.cloudfoundry.org/cli/util/configv3" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/util/configv3/k8s_test.go b/util/configv3/k8s_test.go index 2b6dfd6b209..83dbc839cc7 100644 --- a/util/configv3/k8s_test.go +++ b/util/configv3/k8s_test.go @@ -1,7 +1,7 @@ package configv3_test import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "code.cloudfoundry.org/cli/util/configv3" diff --git a/util/configv3/kubernetes_user_config_test.go b/util/configv3/kubernetes_user_config_test.go index 6229df54ebd..4e74a2e3442 100644 --- a/util/configv3/kubernetes_user_config_test.go +++ b/util/configv3/kubernetes_user_config_test.go @@ -2,7 +2,7 @@ package configv3_test import ( "code.cloudfoundry.org/cli/util/configv3" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/util/configv3/load_config_test.go b/util/configv3/load_config_test.go index cd98d810e2d..9fdb6a9286b 100644 --- a/util/configv3/load_config_test.go +++ b/util/configv3/load_config_test.go @@ -11,7 +11,7 @@ import ( "code.cloudfoundry.org/cli/util/configv3" . "code.cloudfoundry.org/cli/util/configv3" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/util/configv3/locale_test.go b/util/configv3/locale_test.go index 6049d87c235..53d2c3b77c8 100644 --- a/util/configv3/locale_test.go +++ b/util/configv3/locale_test.go @@ -6,8 +6,7 @@ import ( . "code.cloudfoundry.org/cli/util/configv3" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/util/configv3/plugin_repository_test.go b/util/configv3/plugin_repository_test.go index 6a8b9dc5c95..4ed60b41e41 100644 --- a/util/configv3/plugin_repository_test.go +++ b/util/configv3/plugin_repository_test.go @@ -3,7 +3,7 @@ package configv3_test import ( . "code.cloudfoundry.org/cli/util/configv3" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/util/configv3/plugins_config_test.go b/util/configv3/plugins_config_test.go index d537db68fbf..3639f80e733 100644 --- a/util/configv3/plugins_config_test.go +++ b/util/configv3/plugins_config_test.go @@ -7,8 +7,8 @@ import ( "syscall" . "code.cloudfoundry.org/cli/util/configv3" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/util/configv3/write_config_test.go b/util/configv3/write_config_test.go index 2e1bf574a6f..aeb9778c411 100644 --- a/util/configv3/write_config_test.go +++ b/util/configv3/write_config_test.go @@ -10,7 +10,7 @@ import ( "code.cloudfoundry.org/cli/util/configv3" "gopkg.in/yaml.v2" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/util/download/download_suite_test.go b/util/download/download_suite_test.go index 329010ea23a..ea48ecc88b1 100644 --- a/util/download/download_suite_test.go +++ b/util/download/download_suite_test.go @@ -3,7 +3,7 @@ package download_test import ( "testing" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/util/download/downloader_test.go b/util/download/downloader_test.go index cc5b4f56581..ea285c9358f 100644 --- a/util/download/downloader_test.go +++ b/util/download/downloader_test.go @@ -7,7 +7,7 @@ import ( "os" "strings" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "code.cloudfoundry.org/cli/util/download" diff --git a/util/extract/extract_suite_test.go b/util/extract/extract_suite_test.go index bf5dce81754..e6c74bf8312 100644 --- a/util/extract/extract_suite_test.go +++ b/util/extract/extract_suite_test.go @@ -3,7 +3,7 @@ package extract_test import ( "testing" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/util/extract/extract_test.go b/util/extract/extract_test.go index 309d91407c9..035bbefc0ee 100644 --- a/util/extract/extract_test.go +++ b/util/extract/extract_test.go @@ -2,7 +2,7 @@ package extract_test import ( "code.cloudfoundry.org/cli/util/extract" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/util/generic/architecture_test.go b/util/generic/architecture_test.go index 89cd081dcdd..1dc8775d3dd 100644 --- a/util/generic/architecture_test.go +++ b/util/generic/architecture_test.go @@ -2,8 +2,7 @@ package generic_test import ( . "code.cloudfoundry.org/cli/util/generic" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/util/generic/executable_filename_unix_test.go b/util/generic/executable_filename_unix_test.go index 84f4e3fd7db..d6700b0456d 100644 --- a/util/generic/executable_filename_unix_test.go +++ b/util/generic/executable_filename_unix_test.go @@ -7,7 +7,7 @@ import ( "path/filepath" . "code.cloudfoundry.org/cli/util/generic" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/util/generic/executable_filename_windows_test.go b/util/generic/executable_filename_windows_test.go index bbcb8a33577..95fd6a4b8d2 100644 --- a/util/generic/executable_filename_windows_test.go +++ b/util/generic/executable_filename_windows_test.go @@ -8,7 +8,7 @@ import ( "path/filepath" . "code.cloudfoundry.org/cli/util/generic" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/util/generic/generic_suite_test.go b/util/generic/generic_suite_test.go index da96edae237..0352c6f9584 100644 --- a/util/generic/generic_suite_test.go +++ b/util/generic/generic_suite_test.go @@ -1,7 +1,7 @@ package generic_test import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/util/generic/map_test.go b/util/generic/map_test.go index c3471fe81cb..9b51c82a3d6 100644 --- a/util/generic/map_test.go +++ b/util/generic/map_test.go @@ -2,7 +2,7 @@ package generic_test import ( . "code.cloudfoundry.org/cli/util/generic" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/util/generic/slice_test.go b/util/generic/slice_test.go index e24def73d2e..48403e9b3ba 100644 --- a/util/generic/slice_test.go +++ b/util/generic/slice_test.go @@ -2,7 +2,7 @@ package generic_test import ( "code.cloudfoundry.org/cli/util/generic" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/util/lookuptable/lookuptable_suite_test.go b/util/lookuptable/lookuptable_suite_test.go index d5b9c294b9b..cf9ea276954 100644 --- a/util/lookuptable/lookuptable_suite_test.go +++ b/util/lookuptable/lookuptable_suite_test.go @@ -3,7 +3,7 @@ package lookuptable_test import ( "testing" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/util/lookuptable/name_from_guid_test.go b/util/lookuptable/name_from_guid_test.go index 3bc95936932..5e07fe54567 100644 --- a/util/lookuptable/name_from_guid_test.go +++ b/util/lookuptable/name_from_guid_test.go @@ -2,7 +2,7 @@ package lookuptable_test import ( "code.cloudfoundry.org/cli/util/lookuptable" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/util/manifest/manifest_suite_test.go b/util/manifest/manifest_suite_test.go index 2d894f1dec8..8cb408bd8ba 100644 --- a/util/manifest/manifest_suite_test.go +++ b/util/manifest/manifest_suite_test.go @@ -1,7 +1,7 @@ package manifest_test import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/util/manifest/manifest_test.go b/util/manifest/manifest_test.go index cb91fdbed03..3d3e3262594 100644 --- a/util/manifest/manifest_test.go +++ b/util/manifest/manifest_test.go @@ -11,8 +11,8 @@ import ( "code.cloudfoundry.org/cli/types" . "code.cloudfoundry.org/cli/util/manifest" "github.com/cloudfoundry/bosh-cli/director/template" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gstruct" ) diff --git a/util/manifest/manifest_unix_test.go b/util/manifest/manifest_unix_test.go index be5775ae881..dfb40924316 100644 --- a/util/manifest/manifest_unix_test.go +++ b/util/manifest/manifest_unix_test.go @@ -10,7 +10,7 @@ import ( . "code.cloudfoundry.org/cli/util/manifest" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/util/manifest/manifest_windows_test.go b/util/manifest/manifest_windows_test.go index 719b4870543..14b2107762f 100644 --- a/util/manifest/manifest_windows_test.go +++ b/util/manifest/manifest_windows_test.go @@ -10,7 +10,7 @@ import ( . "code.cloudfoundry.org/cli/util/manifest" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/util/manifestparser/application_test.go b/util/manifestparser/application_test.go index fb8b8ce9ac7..eb0474b58bf 100644 --- a/util/manifestparser/application_test.go +++ b/util/manifestparser/application_test.go @@ -4,7 +4,7 @@ import ( . "code.cloudfoundry.org/cli/util/manifestparser" "gopkg.in/yaml.v2" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/util/manifestparser/locator_test.go b/util/manifestparser/locator_test.go index 64483923a15..c64c1984013 100644 --- a/util/manifestparser/locator_test.go +++ b/util/manifestparser/locator_test.go @@ -8,7 +8,7 @@ import ( . "code.cloudfoundry.org/cli/util/manifestparser" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/util/manifestparser/manifest_test.go b/util/manifestparser/manifest_test.go index b4e11d6133a..0a8fcde3db9 100644 --- a/util/manifestparser/manifest_test.go +++ b/util/manifestparser/manifest_test.go @@ -2,7 +2,7 @@ package manifestparser_test import ( . "code.cloudfoundry.org/cli/util/manifestparser" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "gopkg.in/yaml.v2" ) diff --git a/util/manifestparser/manifestparser_suite_test.go b/util/manifestparser/manifestparser_suite_test.go index a612b2f47ec..3034178ef52 100644 --- a/util/manifestparser/manifestparser_suite_test.go +++ b/util/manifestparser/manifestparser_suite_test.go @@ -3,7 +3,7 @@ package manifestparser_test import ( "testing" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/util/manifestparser/parser_test.go b/util/manifestparser/parser_test.go index 5720fcd24bd..98e29f7df20 100644 --- a/util/manifestparser/parser_test.go +++ b/util/manifestparser/parser_test.go @@ -8,7 +8,7 @@ import ( . "code.cloudfoundry.org/cli/util/manifestparser" "github.com/cloudfoundry/bosh-cli/director/template" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "gopkg.in/yaml.v2" ) diff --git a/util/manifestparser/process_test.go b/util/manifestparser/process_test.go index 564c2dbea3e..618a7939300 100644 --- a/util/manifestparser/process_test.go +++ b/util/manifestparser/process_test.go @@ -2,7 +2,7 @@ package manifestparser_test import ( . "code.cloudfoundry.org/cli/util/manifestparser" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "gopkg.in/yaml.v2" ) diff --git a/util/railway/railway_suite_test.go b/util/railway/railway_suite_test.go index 04e72c78003..0582af51a94 100644 --- a/util/railway/railway_suite_test.go +++ b/util/railway/railway_suite_test.go @@ -1,7 +1,7 @@ package railway_test import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/util/railway/railway_test.go b/util/railway/railway_test.go index e250b375fab..3caea2dad72 100644 --- a/util/railway/railway_test.go +++ b/util/railway/railway_test.go @@ -5,7 +5,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/util/railway" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/util/randomword/generator_test.go b/util/randomword/generator_test.go index 1ba1bb58798..944d4abe51d 100644 --- a/util/randomword/generator_test.go +++ b/util/randomword/generator_test.go @@ -3,7 +3,7 @@ package randomword_test import ( . "code.cloudfoundry.org/cli/util/randomword" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/util/randomword/randomword_suite_test.go b/util/randomword/randomword_suite_test.go index e19bc398e9e..2f6ebd45a26 100644 --- a/util/randomword/randomword_suite_test.go +++ b/util/randomword/randomword_suite_test.go @@ -1,7 +1,7 @@ package randomword_test import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/util/sorting/alphabetic_test.go b/util/sorting/alphabetic_test.go index 807056a0308..14756731ac8 100644 --- a/util/sorting/alphabetic_test.go +++ b/util/sorting/alphabetic_test.go @@ -5,8 +5,7 @@ import ( . "code.cloudfoundry.org/cli/util/sorting" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/util/sorting/sorting_suite_test.go b/util/sorting/sorting_suite_test.go index ad6b83ae553..f11f3692b98 100644 --- a/util/sorting/sorting_suite_test.go +++ b/util/sorting/sorting_suite_test.go @@ -1,7 +1,7 @@ package sorting_test import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/util/tls_test.go b/util/tls_test.go index 96e6570d2c1..b176522447c 100644 --- a/util/tls_test.go +++ b/util/tls_test.go @@ -6,7 +6,7 @@ import ( "encoding/pem" . "code.cloudfoundry.org/cli/util" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/util/ui/i18n_test.go b/util/ui/i18n_test.go index 115997cb040..01f85f7d09b 100644 --- a/util/ui/i18n_test.go +++ b/util/ui/i18n_test.go @@ -4,8 +4,7 @@ import ( . "code.cloudfoundry.org/cli/util/ui" "code.cloudfoundry.org/cli/util/ui/uifakes" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/util/ui/log_message_test.go b/util/ui/log_message_test.go index b1314528494..66790b582c7 100644 --- a/util/ui/log_message_test.go +++ b/util/ui/log_message_test.go @@ -6,7 +6,7 @@ import ( "code.cloudfoundry.org/cli/util/configv3" . "code.cloudfoundry.org/cli/util/ui" "code.cloudfoundry.org/cli/util/ui/uifakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/util/ui/prompt_test.go b/util/ui/prompt_test.go index 475019ebbac..1234e003aa7 100644 --- a/util/ui/prompt_test.go +++ b/util/ui/prompt_test.go @@ -6,7 +6,7 @@ import ( "code.cloudfoundry.org/cli/util/configv3" . "code.cloudfoundry.org/cli/util/ui" "code.cloudfoundry.org/cli/util/ui/uifakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" "github.com/vito/go-interact/interact" diff --git a/util/ui/request_logger_file_writer_test.go b/util/ui/request_logger_file_writer_test.go index be9ab823cea..43d11b5530a 100644 --- a/util/ui/request_logger_file_writer_test.go +++ b/util/ui/request_logger_file_writer_test.go @@ -11,7 +11,7 @@ import ( . "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/util/ui/request_logger_terminal_display_test.go b/util/ui/request_logger_terminal_display_test.go index 054871a26c1..77b780954f3 100644 --- a/util/ui/request_logger_terminal_display_test.go +++ b/util/ui/request_logger_terminal_display_test.go @@ -7,7 +7,7 @@ import ( . "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/util/ui/sanitize_json_test.go b/util/ui/sanitize_json_test.go index 1ee4faa1829..82c48558f61 100644 --- a/util/ui/sanitize_json_test.go +++ b/util/ui/sanitize_json_test.go @@ -5,8 +5,7 @@ import ( . "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/util/ui/table_test.go b/util/ui/table_test.go index 3156f797d86..aeef5fe9578 100644 --- a/util/ui/table_test.go +++ b/util/ui/table_test.go @@ -6,7 +6,7 @@ import ( "code.cloudfoundry.org/cli/util/configv3" . "code.cloudfoundry.org/cli/util/ui" "code.cloudfoundry.org/cli/util/ui/uifakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/util/ui/ui_for_app_test.go b/util/ui/ui_for_app_test.go index f6805659a8d..7051f807698 100644 --- a/util/ui/ui_for_app_test.go +++ b/util/ui/ui_for_app_test.go @@ -4,7 +4,7 @@ import ( "code.cloudfoundry.org/cli/util/configv3" . "code.cloudfoundry.org/cli/util/ui" "code.cloudfoundry.org/cli/util/ui/uifakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/util/ui/ui_for_push_test.go b/util/ui/ui_for_push_test.go index 4fa4d0474db..92738b8b40e 100644 --- a/util/ui/ui_for_push_test.go +++ b/util/ui/ui_for_push_test.go @@ -7,7 +7,7 @@ import ( "code.cloudfoundry.org/cli/util/configv3" . "code.cloudfoundry.org/cli/util/ui" "code.cloudfoundry.org/cli/util/ui/uifakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/util/ui/ui_suite_test.go b/util/ui/ui_suite_test.go index 02ca8eaecfb..d10331eb82f 100644 --- a/util/ui/ui_suite_test.go +++ b/util/ui/ui_suite_test.go @@ -1,7 +1,7 @@ package ui_test import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/util/ui/ui_test.go b/util/ui/ui_test.go index 06d13e1eef1..256fb895426 100644 --- a/util/ui/ui_test.go +++ b/util/ui/ui_test.go @@ -8,7 +8,7 @@ import ( "code.cloudfoundry.org/cli/util/configv3" . "code.cloudfoundry.org/cli/util/ui" "code.cloudfoundry.org/cli/util/ui/uifakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/util/ui/ui_v7_test.go b/util/ui/ui_v7_test.go index 4f716c8149b..f33445c1a60 100644 --- a/util/ui/ui_v7_test.go +++ b/util/ui/ui_v7_test.go @@ -4,7 +4,7 @@ import ( "code.cloudfoundry.org/cli/util/configv3" . "code.cloudfoundry.org/cli/util/ui" "code.cloudfoundry.org/cli/util/ui/uifakes" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" ) diff --git a/util/unique/string_slice_test.go b/util/unique/string_slice_test.go index 04779d60a9c..acab41a0ee4 100644 --- a/util/unique/string_slice_test.go +++ b/util/unique/string_slice_test.go @@ -2,7 +2,7 @@ package unique_test import ( "code.cloudfoundry.org/cli/util/unique" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/util/unique/unique_suite_test.go b/util/unique/unique_suite_test.go index 98d24b9746f..b58ce50dab7 100644 --- a/util/unique/unique_suite_test.go +++ b/util/unique/unique_suite_test.go @@ -3,7 +3,7 @@ package unique_test import ( "testing" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/util/url_test.go b/util/url_test.go index 238f63ad6d2..2a4cf89d2e8 100644 --- a/util/url_test.go +++ b/util/url_test.go @@ -2,8 +2,8 @@ package util_test import ( . "code.cloudfoundry.org/cli/util" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" + + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/util/util_suite_test.go b/util/util_suite_test.go index f712f1f5943..0bfd51422dd 100644 --- a/util/util_suite_test.go +++ b/util/util_suite_test.go @@ -1,7 +1,7 @@ package util_test import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/version/version_suite_test.go b/version/version_suite_test.go index 342abdc626d..43f16dd2f4c 100644 --- a/version/version_suite_test.go +++ b/version/version_suite_test.go @@ -1,7 +1,7 @@ package version_test import ( - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "testing" diff --git a/version/version_test.go b/version/version_test.go index 587eca3330b..2d1c3337403 100644 --- a/version/version_test.go +++ b/version/version_test.go @@ -2,7 +2,7 @@ package version_test import ( "code.cloudfoundry.org/cli/version" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) From 17d801ad73f4e96527596a2fcb3fe74fc875bc94 Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Fri, 15 Sep 2023 15:01:52 -0700 Subject: [PATCH 02/15] Fix a few more v2 misses - still have the seed redefined problem in clissh tests --- actor/sharedaction/check_target_test.go | 2 +- command/flag/org_role_test.go | 2 +- command/v7/label_updater_test.go | 10 +++++----- command/v7/labels_command_test.go | 10 +++++----- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/actor/sharedaction/check_target_test.go b/actor/sharedaction/check_target_test.go index dae7d4f892e..d59d7e0994d 100644 --- a/actor/sharedaction/check_target_test.go +++ b/actor/sharedaction/check_target_test.go @@ -6,7 +6,7 @@ import ( "code.cloudfoundry.org/cli/actor/actionerror" . "code.cloudfoundry.org/cli/actor/sharedaction" "code.cloudfoundry.org/cli/actor/sharedaction/sharedactionfakes" - + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/flag/org_role_test.go b/command/flag/org_role_test.go index 6fad9f76fb2..6419d6ef93e 100644 --- a/command/flag/org_role_test.go +++ b/command/flag/org_role_test.go @@ -3,7 +3,7 @@ package flag_test import ( . "code.cloudfoundry.org/cli/command/flag" flags "github.com/jessevdk/go-flags" - + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/command/v7/label_updater_test.go b/command/v7/label_updater_test.go index 3596a4f5dc8..8c07196e533 100644 --- a/command/v7/label_updater_test.go +++ b/command/v7/label_updater_test.go @@ -141,7 +141,7 @@ var _ = Describe("LabelUpdater", func() { } Expect(err).To(MatchError(argumentCombinationError)) }, - labelSubcommands("buildpack")..., + labelSubcommands("buildpack"), ) DescribeTable( @@ -159,7 +159,7 @@ var _ = Describe("LabelUpdater", func() { } Expect(err).To(MatchError(argumentCombinationError)) }, - labelSubcommands("service-offering", "service-plan")..., + labelSubcommands("service-offering", "service-plan"), ) DescribeTable( @@ -177,7 +177,7 @@ var _ = Describe("LabelUpdater", func() { } Expect(err).To(MatchError(argumentCombinationError)) }, - labelSubcommands("service-plan")..., + labelSubcommands("service-plan"), ) DescribeTable( @@ -191,7 +191,7 @@ var _ = Describe("LabelUpdater", func() { err := cmd.Execute(targetResource, nil) Expect(err).To(MatchError("Target not found")) }, - labelSubcommands()..., + labelSubcommands(), ) DescribeTable( @@ -218,7 +218,7 @@ var _ = Describe("LabelUpdater", func() { Expect(checkSpace).To(BeFalse()) } }, - labelSubcommands()..., + labelSubcommands(), ) }) diff --git a/command/v7/labels_command_test.go b/command/v7/labels_command_test.go index 5bf64eecd5a..09dba552751 100644 --- a/command/v7/labels_command_test.go +++ b/command/v7/labels_command_test.go @@ -82,7 +82,7 @@ var _ = Describe("labels command", func() { } Expect(executeErr).To(MatchError(argumentCombinationError)) }, - labelSubcommands("buildpack")..., + labelSubcommands("buildpack"), ) DescribeTable( @@ -98,7 +98,7 @@ var _ = Describe("labels command", func() { } Expect(executeErr).To(MatchError(argumentCombinationError)) }, - labelSubcommands("service-offering", "service-plan")..., + labelSubcommands("service-offering", "service-plan"), ) DescribeTable( @@ -114,7 +114,7 @@ var _ = Describe("labels command", func() { } Expect(err).To(MatchError(argumentCombinationError)) }, - labelSubcommands("service-plan")..., + labelSubcommands("service-plan"), ) DescribeTable( @@ -125,7 +125,7 @@ var _ = Describe("labels command", func() { err := cmd.Execute(nil) Expect(err).To(MatchError("Target not found")) }, - labelSubcommands()..., + labelSubcommands(), ) DescribeTable( @@ -150,7 +150,7 @@ var _ = Describe("labels command", func() { Expect(checkSpace).To(BeFalse()) } }, - labelSubcommands()..., + labelSubcommands(), ) type MethodCallCountType func() int From a92362ce672ab7689fc33bbd036298697af630c4 Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Fri, 15 Sep 2023 16:09:04 -0700 Subject: [PATCH 03/15] move https://github.com/cloudfoundry-incubator/cfnetworking-cli-api back to cli - it's been deprecated/archived so not getting updates - and it was using ginkgo v1 - bumped to ginkgo v2 - attempted to fix networking_connection.go to use errors.As since that's a go 1.20 thing we fixed in https://github.com/cloudfoundry/cli/commit/325af3c342289b73f317f3873b1fe5f98f758019 - but it only fixed one test and I don't understand why the other is failing - still seed flag errors --- .../fake_networking_client.go | 2 +- actor/cfnetworkingaction/networking_client.go | 2 +- actor/cfnetworkingaction/policy.go | 2 +- actor/cfnetworkingaction/policy_test.go | 2 +- .../cfnetv1/cfnetv1_suite_test.go | 56 ++ .../cfnetv1fakes/fake_connection_wrapper.go | 162 +++++ api/cfnetworking/cfnetv1/client.go | 138 ++++ .../cfnetv1/connection_wrapper.go | 17 + api/cfnetworking/cfnetv1/internal/routes.go | 21 + api/cfnetworking/cfnetv1/policy.go | 105 +++ api/cfnetworking/cfnetv1/policy_test.go | 339 ++++++++++ api/cfnetworking/cfnetv1/ports.go | 6 + api/cfnetworking/cfnetv1/request.go | 70 ++ api/cfnetworking/cfnetworking_suite_test.go | 35 + .../cfnetworkingfakes/fake_connection.go | 100 +++ .../cfnetworkingfakes/fake_read_seeker.go | 176 +++++ api/cfnetworking/connection.go | 8 + api/cfnetworking/errors.go | 64 ++ api/cfnetworking/errors_test.go | 36 + .../networkerror/bad_request_error.go | 9 + .../networkerror/conflict_error.go | 9 + .../networkerror/error_response.go | 9 + .../networkerror/forbidden_error.go | 9 + .../networkerror/invalid_auth_token_error.go | 11 + .../networkerror/not_acceptable_error.go | 9 + .../networkerror/not_found_error.go | 10 + .../networkerror/raw_http_status_error.go | 14 + .../networkerror/request_error.go | 11 + .../ssl_validation_hostname_error.go | 13 + .../networkerror/unauthorized_error.go | 9 + .../networkerror/unexpected_response_error.go | 20 + .../networkerror/unverified_server_error.go | 11 + api/cfnetworking/networking_connection.go | 130 ++++ .../networking_connection_test.go | 251 +++++++ api/cfnetworking/request.go | 35 + api/cfnetworking/response.go | 29 + api/cfnetworking/wrapper/request_logger.go | 156 +++++ .../wrapper/request_logger_test.go | 328 ++++++++++ api/cfnetworking/wrapper/retry_request.go | 54 ++ .../wrapper/retry_request_test.go | 110 ++++ .../wrapper/uaa_authentication.go | 81 +++ .../wrapper/uaa_authentication_test.go | 174 +++++ .../wrapper/util/in_memory_cache.go | 26 + .../wrapper/wrapper_suite_test.go | 36 + .../fake_request_logger_output.go | 613 ++++++++++++++++++ .../wrapper/wrapperfakes/fake_token_cache.go | 201 ++++++ .../wrapper/wrapperfakes/fake_uaaclient.go | 104 +++ command/v7/shared/new_networking_client.go | 4 +- go.mod | 1 - go.sum | 2 - 50 files changed, 3811 insertions(+), 9 deletions(-) create mode 100644 api/cfnetworking/cfnetv1/cfnetv1_suite_test.go create mode 100644 api/cfnetworking/cfnetv1/cfnetv1fakes/fake_connection_wrapper.go create mode 100644 api/cfnetworking/cfnetv1/client.go create mode 100644 api/cfnetworking/cfnetv1/connection_wrapper.go create mode 100644 api/cfnetworking/cfnetv1/internal/routes.go create mode 100644 api/cfnetworking/cfnetv1/policy.go create mode 100644 api/cfnetworking/cfnetv1/policy_test.go create mode 100644 api/cfnetworking/cfnetv1/ports.go create mode 100644 api/cfnetworking/cfnetv1/request.go create mode 100644 api/cfnetworking/cfnetworking_suite_test.go create mode 100644 api/cfnetworking/cfnetworkingfakes/fake_connection.go create mode 100644 api/cfnetworking/cfnetworkingfakes/fake_read_seeker.go create mode 100644 api/cfnetworking/connection.go create mode 100644 api/cfnetworking/errors.go create mode 100644 api/cfnetworking/errors_test.go create mode 100644 api/cfnetworking/networkerror/bad_request_error.go create mode 100644 api/cfnetworking/networkerror/conflict_error.go create mode 100644 api/cfnetworking/networkerror/error_response.go create mode 100644 api/cfnetworking/networkerror/forbidden_error.go create mode 100644 api/cfnetworking/networkerror/invalid_auth_token_error.go create mode 100644 api/cfnetworking/networkerror/not_acceptable_error.go create mode 100644 api/cfnetworking/networkerror/not_found_error.go create mode 100644 api/cfnetworking/networkerror/raw_http_status_error.go create mode 100644 api/cfnetworking/networkerror/request_error.go create mode 100644 api/cfnetworking/networkerror/ssl_validation_hostname_error.go create mode 100644 api/cfnetworking/networkerror/unauthorized_error.go create mode 100644 api/cfnetworking/networkerror/unexpected_response_error.go create mode 100644 api/cfnetworking/networkerror/unverified_server_error.go create mode 100644 api/cfnetworking/networking_connection.go create mode 100644 api/cfnetworking/networking_connection_test.go create mode 100644 api/cfnetworking/request.go create mode 100644 api/cfnetworking/response.go create mode 100644 api/cfnetworking/wrapper/request_logger.go create mode 100644 api/cfnetworking/wrapper/request_logger_test.go create mode 100644 api/cfnetworking/wrapper/retry_request.go create mode 100644 api/cfnetworking/wrapper/retry_request_test.go create mode 100644 api/cfnetworking/wrapper/uaa_authentication.go create mode 100644 api/cfnetworking/wrapper/uaa_authentication_test.go create mode 100644 api/cfnetworking/wrapper/util/in_memory_cache.go create mode 100644 api/cfnetworking/wrapper/wrapper_suite_test.go create mode 100644 api/cfnetworking/wrapper/wrapperfakes/fake_request_logger_output.go create mode 100644 api/cfnetworking/wrapper/wrapperfakes/fake_token_cache.go create mode 100644 api/cfnetworking/wrapper/wrapperfakes/fake_uaaclient.go diff --git a/actor/cfnetworkingaction/cfnetworkingactionfakes/fake_networking_client.go b/actor/cfnetworkingaction/cfnetworkingactionfakes/fake_networking_client.go index ce5fc06a3e2..e0dd1dc55f7 100644 --- a/actor/cfnetworkingaction/cfnetworkingactionfakes/fake_networking_client.go +++ b/actor/cfnetworkingaction/cfnetworkingactionfakes/fake_networking_client.go @@ -4,7 +4,7 @@ package cfnetworkingactionfakes import ( "sync" - "code.cloudfoundry.org/cfnetworking-cli-api/cfnetworking/cfnetv1" + "code.cloudfoundry.org/cli/api/cfnetworking/cfnetv1" "code.cloudfoundry.org/cli/actor/cfnetworkingaction" ) diff --git a/actor/cfnetworkingaction/networking_client.go b/actor/cfnetworkingaction/networking_client.go index 46fe668573a..ad404a01b51 100644 --- a/actor/cfnetworkingaction/networking_client.go +++ b/actor/cfnetworkingaction/networking_client.go @@ -1,6 +1,6 @@ package cfnetworkingaction -import "code.cloudfoundry.org/cfnetworking-cli-api/cfnetworking/cfnetv1" +import "code.cloudfoundry.org/cli/api/cfnetworking/cfnetv1" //go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . NetworkingClient diff --git a/actor/cfnetworkingaction/policy.go b/actor/cfnetworkingaction/policy.go index a0e44b246ed..8aca6747a1f 100644 --- a/actor/cfnetworkingaction/policy.go +++ b/actor/cfnetworkingaction/policy.go @@ -1,8 +1,8 @@ package cfnetworkingaction import ( - "code.cloudfoundry.org/cfnetworking-cli-api/cfnetworking/cfnetv1" "code.cloudfoundry.org/cli/actor/actionerror" + "code.cloudfoundry.org/cli/api/cfnetworking/cfnetv1" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" "code.cloudfoundry.org/cli/resources" diff --git a/actor/cfnetworkingaction/policy_test.go b/actor/cfnetworkingaction/policy_test.go index 539a7aab427..3325f4505d9 100644 --- a/actor/cfnetworkingaction/policy_test.go +++ b/actor/cfnetworkingaction/policy_test.go @@ -9,10 +9,10 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/batcher" - "code.cloudfoundry.org/cfnetworking-cli-api/cfnetworking/cfnetv1" "code.cloudfoundry.org/cli/actor/actionerror" . "code.cloudfoundry.org/cli/actor/cfnetworkingaction" "code.cloudfoundry.org/cli/actor/cfnetworkingaction/cfnetworkingactionfakes" + "code.cloudfoundry.org/cli/api/cfnetworking/cfnetv1" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/api/cfnetworking/cfnetv1/cfnetv1_suite_test.go b/api/cfnetworking/cfnetv1/cfnetv1_suite_test.go new file mode 100644 index 00000000000..d2eb5339351 --- /dev/null +++ b/api/cfnetworking/cfnetv1/cfnetv1_suite_test.go @@ -0,0 +1,56 @@ +package cfnetv1_test + +import ( + "bytes" + "log" + + . "code.cloudfoundry.org/cli/api/cfnetworking/cfnetv1" + + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + . "github.com/onsi/gomega/ghttp" + + "testing" +) + +func TestCFNetV1(t *testing.T) { + RegisterFailHandler(Fail) + RunSpecs(t, "CF Networking V1 Client Suite") +} + +var server *Server + +var _ = SynchronizedBeforeSuite(func() []byte { + return []byte{} +}, func(data []byte) { + server = NewTLSServer() + + // Suppresses ginkgo server logs + server.HTTPTestServer.Config.ErrorLog = log.New(&bytes.Buffer{}, "", 0) +}) + +var _ = SynchronizedAfterSuite(func() { + server.Close() +}, func() {}) + +var _ = BeforeEach(func() { + server.Reset() +}) + +func NewTestClient(passed ...Config) *Client { + var config Config + if len(passed) > 0 { + config = passed[0] + } else { + config = Config{} + } + config.AppName = "CF Networking V1 Test" + config.AppVersion = "Unknown" + config.SkipSSLValidation = true + + if config.URL == "" { + config.URL = server.URL() + } + + return NewClient(config) +} diff --git a/api/cfnetworking/cfnetv1/cfnetv1fakes/fake_connection_wrapper.go b/api/cfnetworking/cfnetv1/cfnetv1fakes/fake_connection_wrapper.go new file mode 100644 index 00000000000..39b81985e8a --- /dev/null +++ b/api/cfnetworking/cfnetv1/cfnetv1fakes/fake_connection_wrapper.go @@ -0,0 +1,162 @@ +// Code generated by counterfeiter. DO NOT EDIT. +package cfnetv1fakes + +import ( + "sync" + + "code.cloudfoundry.org/cli/api/cfnetworking" + "code.cloudfoundry.org/cli/api/cfnetworking/cfnetv1" +) + +type FakeConnectionWrapper struct { + MakeStub func(request *cfnetworking.Request, passedResponse *cfnetworking.Response) error + makeMutex sync.RWMutex + makeArgsForCall []struct { + request *cfnetworking.Request + passedResponse *cfnetworking.Response + } + makeReturns struct { + result1 error + } + makeReturnsOnCall map[int]struct { + result1 error + } + WrapStub func(innerconnection cfnetworking.Connection) cfnetworking.Connection + wrapMutex sync.RWMutex + wrapArgsForCall []struct { + innerconnection cfnetworking.Connection + } + wrapReturns struct { + result1 cfnetworking.Connection + } + wrapReturnsOnCall map[int]struct { + result1 cfnetworking.Connection + } + invocations map[string][][]interface{} + invocationsMutex sync.RWMutex +} + +func (fake *FakeConnectionWrapper) Make(request *cfnetworking.Request, passedResponse *cfnetworking.Response) error { + fake.makeMutex.Lock() + ret, specificReturn := fake.makeReturnsOnCall[len(fake.makeArgsForCall)] + fake.makeArgsForCall = append(fake.makeArgsForCall, struct { + request *cfnetworking.Request + passedResponse *cfnetworking.Response + }{request, passedResponse}) + fake.recordInvocation("Make", []interface{}{request, passedResponse}) + fake.makeMutex.Unlock() + if fake.MakeStub != nil { + return fake.MakeStub(request, passedResponse) + } + if specificReturn { + return ret.result1 + } + return fake.makeReturns.result1 +} + +func (fake *FakeConnectionWrapper) MakeCallCount() int { + fake.makeMutex.RLock() + defer fake.makeMutex.RUnlock() + return len(fake.makeArgsForCall) +} + +func (fake *FakeConnectionWrapper) MakeArgsForCall(i int) (*cfnetworking.Request, *cfnetworking.Response) { + fake.makeMutex.RLock() + defer fake.makeMutex.RUnlock() + return fake.makeArgsForCall[i].request, fake.makeArgsForCall[i].passedResponse +} + +func (fake *FakeConnectionWrapper) MakeReturns(result1 error) { + fake.MakeStub = nil + fake.makeReturns = struct { + result1 error + }{result1} +} + +func (fake *FakeConnectionWrapper) MakeReturnsOnCall(i int, result1 error) { + fake.MakeStub = nil + if fake.makeReturnsOnCall == nil { + fake.makeReturnsOnCall = make(map[int]struct { + result1 error + }) + } + fake.makeReturnsOnCall[i] = struct { + result1 error + }{result1} +} + +func (fake *FakeConnectionWrapper) Wrap(innerconnection cfnetworking.Connection) cfnetworking.Connection { + fake.wrapMutex.Lock() + ret, specificReturn := fake.wrapReturnsOnCall[len(fake.wrapArgsForCall)] + fake.wrapArgsForCall = append(fake.wrapArgsForCall, struct { + innerconnection cfnetworking.Connection + }{innerconnection}) + fake.recordInvocation("Wrap", []interface{}{innerconnection}) + fake.wrapMutex.Unlock() + if fake.WrapStub != nil { + return fake.WrapStub(innerconnection) + } + if specificReturn { + return ret.result1 + } + return fake.wrapReturns.result1 +} + +func (fake *FakeConnectionWrapper) WrapCallCount() int { + fake.wrapMutex.RLock() + defer fake.wrapMutex.RUnlock() + return len(fake.wrapArgsForCall) +} + +func (fake *FakeConnectionWrapper) WrapArgsForCall(i int) cfnetworking.Connection { + fake.wrapMutex.RLock() + defer fake.wrapMutex.RUnlock() + return fake.wrapArgsForCall[i].innerconnection +} + +func (fake *FakeConnectionWrapper) WrapReturns(result1 cfnetworking.Connection) { + fake.WrapStub = nil + fake.wrapReturns = struct { + result1 cfnetworking.Connection + }{result1} +} + +func (fake *FakeConnectionWrapper) WrapReturnsOnCall(i int, result1 cfnetworking.Connection) { + fake.WrapStub = nil + if fake.wrapReturnsOnCall == nil { + fake.wrapReturnsOnCall = make(map[int]struct { + result1 cfnetworking.Connection + }) + } + fake.wrapReturnsOnCall[i] = struct { + result1 cfnetworking.Connection + }{result1} +} + +func (fake *FakeConnectionWrapper) Invocations() map[string][][]interface{} { + fake.invocationsMutex.RLock() + defer fake.invocationsMutex.RUnlock() + fake.makeMutex.RLock() + defer fake.makeMutex.RUnlock() + fake.wrapMutex.RLock() + defer fake.wrapMutex.RUnlock() + copiedInvocations := map[string][][]interface{}{} + for key, value := range fake.invocations { + copiedInvocations[key] = value + } + return copiedInvocations +} + +func (fake *FakeConnectionWrapper) recordInvocation(key string, args []interface{}) { + fake.invocationsMutex.Lock() + defer fake.invocationsMutex.Unlock() + if fake.invocations == nil { + fake.invocations = map[string][][]interface{}{} + } + if fake.invocations[key] == nil { + fake.invocations[key] = [][]interface{}{} + } + fake.invocations[key] = append(fake.invocations[key], args) +} + +var _ cfnetv1.ConnectionWrapper = new(FakeConnectionWrapper) diff --git a/api/cfnetworking/cfnetv1/client.go b/api/cfnetworking/cfnetv1/client.go new file mode 100644 index 00000000000..5c2f36020cd --- /dev/null +++ b/api/cfnetworking/cfnetv1/client.go @@ -0,0 +1,138 @@ +// Package cfnetv1 represents a CF Networking V1 client. +// +// These sets of packages are still under development/pre-pre-pre...alpha. Use +// at your own risk! Functionality and design may change without warning. +// +// For more information on the CF Networking API see +// https://github.com/cloudfoundry-incubator/cf-networking-release/blob/develop/docs/API.md +// +// # Method Naming Conventions +// +// The client takes a '' +// approach to method names. If the and +// are similar, they do not need to be repeated. If a GUID is required for the +// , the pluralization is removed from said endpoint in the +// method name. +// +// For Example: +// +// Method Name: GetApplication +// Endpoint: /v2/applications/:guid +// Action Name: Get +// Top Level Endpoint: applications +// Return Value: Application +// +// Method Name: GetServiceInstances +// Endpoint: /v2/service_instances +// Action Name: Get +// Top Level Endpoint: service_instances +// Return Value: []ServiceInstance +// +// Method Name: GetSpaceServiceInstances +// Endpoint: /v2/spaces/:guid/service_instances +// Action Name: Get +// Top Level Endpoint: spaces +// Return Value: []ServiceInstance +// +// Use the following table to determine which HTTP Command equates to which +// Action Name: +// +// HTTP Command -> Action Name +// POST -> Create +// GET -> Get +// PUT -> Update +// DELETE -> Delete +// +// # Method Locations +// +// Methods exist in the same file as their return type, regardless of which +// endpoint they use. +// +// # Error Handling +// +// All error handling that requires parsing the error_code/code returned back +// from the Cloud Controller should be placed in the errorWrapper. Everything +// else can be handled in the individual operations. All parsed cloud +// controller errors should exist in errors.go, all generic HTTP errors should +// exist in the cloudcontroller's errors.go. Errors related to the individaul +// operation should exist at the top of that operation's file. +// +// # No inline-relations-depth And summary Endpoints +// +// This package will not use ever use 'inline-relations-depth' or the +// '/summary' endpoints for any operations. These requests can be extremely +// taxing on the Cloud Controller and are avoided at all costs. Additionally, +// the objects returned back from these requests can become extremely +// inconsistant across versions and are problematic to deal with in general. +package cfnetv1 + +import ( + "fmt" + "runtime" + "time" + + "code.cloudfoundry.org/cli/api/cfnetworking" + "code.cloudfoundry.org/cli/api/cfnetworking/cfnetv1/internal" + + "github.com/tedsuo/rata" +) + +// Client is a client that can be used to talk to a CF Networking API. +type Client struct { + connection cfnetworking.Connection + router *rata.RequestGenerator + url string + userAgent string +} + +// Config allows the Client to be configured +type Config struct { + // AppName is the name of the application/process using the client. + AppName string + + // AppVersion is the version of the application/process using the client. + AppVersion string + + // DialTimeout is the DNS timeout used to make all requests to the Cloud + // Controller. + DialTimeout time.Duration + + // SkipSSLValidation controls whether a client verifies the server's + // certificate chain and host name. If SkipSSLValidation is true, TLS accepts + // any certificate presented by the server and any host name in that + // certificate for *all* client requests going forward. + // + // In this mode, TLS is susceptible to man-in-the-middle attacks. This should + // be used only for testing. + SkipSSLValidation bool + + // URL is a fully qualified URL to the CF Networking API. + URL string + + // Wrappers that apply to the client connection. + Wrappers []ConnectionWrapper +} + +// NewClient returns a new CF Networking client. +func NewClient(config Config) *Client { + userAgent := fmt.Sprintf("%s/%s (%s; %s %s)", config.AppName, config.AppVersion, runtime.Version(), runtime.GOARCH, runtime.GOOS) + + connection := cfnetworking.NewConnection(cfnetworking.Config{ + DialTimeout: config.DialTimeout, + SkipSSLValidation: config.SkipSSLValidation, + }) + + wrappedConnection := cfnetworking.NewErrorWrapper().Wrap(connection) + for _, wrapper := range config.Wrappers { + wrappedConnection = wrapper.Wrap(wrappedConnection) + } + + client := &Client{ + connection: wrappedConnection, + router: rata.NewRequestGenerator(config.URL, internal.Routes), + url: config.URL, + userAgent: userAgent, + } + + return client +} diff --git a/api/cfnetworking/cfnetv1/connection_wrapper.go b/api/cfnetworking/cfnetv1/connection_wrapper.go new file mode 100644 index 00000000000..495d5f88272 --- /dev/null +++ b/api/cfnetworking/cfnetv1/connection_wrapper.go @@ -0,0 +1,17 @@ +package cfnetv1 + +import "code.cloudfoundry.org/cli/api/cfnetworking" + +//go:generate counterfeiter . ConnectionWrapper + +// ConnectionWrapper can wrap a given connection allowing the wrapper to modify +// all requests going in and out of the given connection. +type ConnectionWrapper interface { + cfnetworking.Connection + Wrap(innerconnection cfnetworking.Connection) cfnetworking.Connection +} + +// WrapConnection wraps the current Client connection in the wrapper. +func (client *Client) WrapConnection(wrapper ConnectionWrapper) { + client.connection = wrapper.Wrap(client.connection) +} diff --git a/api/cfnetworking/cfnetv1/internal/routes.go b/api/cfnetworking/cfnetv1/internal/routes.go new file mode 100644 index 00000000000..69cf937ca4f --- /dev/null +++ b/api/cfnetworking/cfnetv1/internal/routes.go @@ -0,0 +1,21 @@ +package internal + +import ( + "net/http" + + "github.com/tedsuo/rata" +) + +const ( + CreatePolicies = "PostPolicies" + DeletePolicies = "DeletePolicies" + ListPolicies = "ListPolicies" +) + +// Routes is a list of routes used by the rata library to construct request +// URLs. +var Routes = rata.Routes{ + {Path: "/policies", Method: http.MethodPost, Name: CreatePolicies}, + {Path: "/policies/delete", Method: http.MethodPost, Name: DeletePolicies}, + {Path: "/policies", Method: http.MethodGet, Name: ListPolicies}, +} diff --git a/api/cfnetworking/cfnetv1/policy.go b/api/cfnetworking/cfnetv1/policy.go new file mode 100644 index 00000000000..bc3a814b061 --- /dev/null +++ b/api/cfnetworking/cfnetv1/policy.go @@ -0,0 +1,105 @@ +package cfnetv1 + +import ( + "bytes" + "encoding/json" + + "strings" + + "code.cloudfoundry.org/cli/api/cfnetworking" + "code.cloudfoundry.org/cli/api/cfnetworking/cfnetv1/internal" +) + +type PolicyProtocol string + +const ( + PolicyProtocolTCP PolicyProtocol = "tcp" + PolicyProtocolUDP PolicyProtocol = "udp" +) + +type PolicyList struct { + TotalPolicies int `json:"total_policies,omitempty"` + Policies []Policy `json:"policies"` +} + +type Policy struct { + Source PolicySource `json:"source"` + Destination PolicyDestination `json:"destination"` +} + +type PolicySource struct { + ID string `json:"id"` +} + +type PolicyDestination struct { + ID string `json:"id"` + Protocol PolicyProtocol `json:"protocol"` + Ports Ports `json:"ports"` +} + +// CreatePolicies will create the network policy with the given parameters. +func (client Client) CreatePolicies(policies []Policy) error { + rawJSON, err := json.Marshal(PolicyList{Policies: policies}) + if err != nil { + return err + } + + request, err := client.newHTTPRequest(requestOptions{ + RequestName: internal.CreatePolicies, + Body: bytes.NewReader(rawJSON), + }) + if err != nil { + return err + } + + return client.connection.Make(request, &cfnetworking.Response{}) +} + +// ListPolicies will list the policies with the app guids in either the source or destination. +func (client Client) ListPolicies(appGUIDs ...string) ([]Policy, error) { + var request *cfnetworking.Request + var err error + if len(appGUIDs) == 0 { + request, err = client.newHTTPRequest(requestOptions{ + RequestName: internal.ListPolicies, + }) + } else { + request, err = client.newHTTPRequest(requestOptions{ + RequestName: internal.ListPolicies, + Query: map[string][]string{ + "id": {strings.Join(appGUIDs, ",")}, + }, + }) + } + if err != nil { + return []Policy{}, err + } + + policies := PolicyList{} + response := &cfnetworking.Response{} + + err = client.connection.Make(request, response) + if err != nil { + return []Policy{}, err + } + + err = json.Unmarshal(response.RawResponse, &policies) + if err != nil { + return []Policy{}, err + } + + return policies.Policies, nil +} + +// RemovePolicies will remove the network policy with the given parameters. +func (client Client) RemovePolicies(policies []Policy) error { + rawJSON, err := json.Marshal(PolicyList{Policies: policies}) + if err != nil { + return err + } + request, err := client.newHTTPRequest(requestOptions{ + RequestName: internal.DeletePolicies, + Body: bytes.NewReader(rawJSON), + }) + return client.connection.Make(request, &cfnetworking.Response{}) +} diff --git a/api/cfnetworking/cfnetv1/policy_test.go b/api/cfnetworking/cfnetv1/policy_test.go new file mode 100644 index 00000000000..1a214cb6031 --- /dev/null +++ b/api/cfnetworking/cfnetv1/policy_test.go @@ -0,0 +1,339 @@ +package cfnetv1_test + +import ( + "net/http" + + . "code.cloudfoundry.org/cli/api/cfnetworking/cfnetv1" + "code.cloudfoundry.org/cli/api/cfnetworking/networkerror" + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + . "github.com/onsi/gomega/ghttp" +) + +var _ = Describe("Policy", func() { + var client *Client + BeforeEach(func() { + client = NewTestClient() + }) + + Describe("CreatePolicies", func() { + Context("when the stack is found", func() { + BeforeEach(func() { + expectedBody := `{ + "policies": [ + { + "source": { + "id": "source-id-1" + }, + "destination": { + "id": "destination-id-1", + "protocol": "tcp", + "ports": { + "start": 1234, + "end": 1235 + } + } + }, + { + "source": { + "id": "source-id-2" + }, + "destination": { + "id": "destination-id-2", + "protocol": "udp", + "ports": { + "start": 1234, + "end": 1235 + } + } + } + ] + }` + server.AppendHandlers( + CombineHandlers( + VerifyRequest(http.MethodPost, "/policies"), + VerifyJSON(expectedBody), + RespondWith(http.StatusOK, ""), + ), + ) + }) + + It("passes the body correctly", func() { + err := client.CreatePolicies([]Policy{ + { + Source: PolicySource{ + ID: "source-id-1", + }, + Destination: PolicyDestination{ + ID: "destination-id-1", + Protocol: PolicyProtocolTCP, + Ports: Ports{ + Start: 1234, + End: 1235, + }, + }, + }, + { + Source: PolicySource{ + ID: "source-id-2", + }, + Destination: PolicyDestination{ + ID: "destination-id-2", + Protocol: PolicyProtocolUDP, + Ports: Ports{ + Start: 1234, + End: 1235, + }, + }, + }, + }) + Expect(err).ToNot(HaveOccurred()) + Expect(server.ReceivedRequests()).To(HaveLen(1)) + }) + }) + + Context("when the client returns an error", func() { + BeforeEach(func() { + response := `{ + "error": "Oh Noes" + }` + server.AppendHandlers( + CombineHandlers( + VerifyRequest(http.MethodPost, "/policies"), + RespondWith(http.StatusBadRequest, response), + ), + ) + }) + + It("returns the error and warnings", func() { + err := client.CreatePolicies(nil) + Expect(err).To(MatchError(networkerror.BadRequestError{ + Message: "Oh Noes", + })) + }) + }) + }) + + Describe("ListPolicies", func() { + var expectedPolicies []Policy + Context("when the policies are found", func() { + BeforeEach(func() { + response := `{ + "policies": [ + { + "source": { + "id": "source-id-1" + }, + "destination": { + "id": "destination-id-1", + "protocol": "tcp", + "ports": { + "start": 1234, + "end": 1235 + } + } + }, + { + "source": { + "id": "source-id-2" + }, + "destination": { + "id": "destination-id-2", + "protocol": "tcp", + "ports": { + "start": 4321, + "end": 5321 + } + } + } + ] + }` + server.AppendHandlers( + CombineHandlers( + VerifyRequest(http.MethodGet, "/policies"), + RespondWith(http.StatusOK, response), + ), + ) + expectedPolicies = []Policy{ + { + Source: PolicySource{ + ID: "source-id-1", + }, + Destination: PolicyDestination{ + ID: "destination-id-1", + Protocol: "tcp", + Ports: Ports{ + Start: 1234, + End: 1235, + }, + }, + }, + { + Source: PolicySource{ + ID: "source-id-2", + }, + Destination: PolicyDestination{ + ID: "destination-id-2", + Protocol: "tcp", + Ports: Ports{ + Start: 4321, + End: 5321, + }, + }, + }, + } + }) + + It("returns the policies correctly", func() { + policies, err := client.ListPolicies() + Expect(policies).To(Equal(expectedPolicies)) + Expect(err).ToNot(HaveOccurred()) + Expect(server.ReceivedRequests()).To(HaveLen(1)) + }) + + Context("when an app guid is passed", func() { + It("makes the query correctly", func() { + policies, err := client.ListPolicies("source-id-1") + Expect(policies).To(Equal(expectedPolicies)) + Expect(err).ToNot(HaveOccurred()) + + requests := server.ReceivedRequests() + Expect(requests).To(HaveLen(1)) + Expect(requests[0].RequestURI).To(Equal("/policies?id=source-id-1")) + }) + }) + + Context("when multiple app guid are passed", func() { + It("makes the query correctly", func() { + policies, err := client.ListPolicies("source-id-1", "source-id-2") + Expect(policies).To(Equal(expectedPolicies)) + Expect(err).ToNot(HaveOccurred()) + + requests := server.ReceivedRequests() + Expect(requests).To(HaveLen(1)) + Expect(requests[0].RequestURI).To(Equal("/policies?id=source-id-1%2Csource-id-2")) + }) + }) + + }) + + Context("when the client returns an error", func() { + BeforeEach(func() { + response := `{ + "error": "Oh Noes" + }` + server.AppendHandlers( + CombineHandlers( + VerifyRequest(http.MethodGet, "/policies"), + RespondWith(http.StatusBadRequest, response), + ), + ) + }) + + It("returns the error", func() { + _, err := client.ListPolicies() + Expect(err).To(MatchError(networkerror.BadRequestError{ + Message: "Oh Noes", + })) + }) + }) + }) + + Describe("RemovePolicies", func() { + Context("when the policy is found", func() { + BeforeEach(func() { + expectedBody := `{ + "policies": [ + { + "source": { + "id": "source-id-1" + }, + "destination": { + "id": "destination-id-1", + "protocol": "tcp", + "ports": { + "start": 1234, + "end": 1235 + } + } + }, + { + "source": { + "id": "source-id-2" + }, + "destination": { + "id": "destination-id-2", + "protocol": "udp", + "ports": { + "start": 1234, + "end": 1235 + } + } + } + ] + }` + server.AppendHandlers( + CombineHandlers( + VerifyRequest(http.MethodPost, "/policies/delete"), + VerifyJSON(expectedBody), + RespondWith(http.StatusOK, ""), + ), + ) + }) + + It("passes the body correctly", func() { + err := client.RemovePolicies([]Policy{ + { + Source: PolicySource{ + ID: "source-id-1", + }, + Destination: PolicyDestination{ + ID: "destination-id-1", + Protocol: PolicyProtocolTCP, + Ports: Ports{ + Start: 1234, + End: 1235, + }, + }, + }, + { + Source: PolicySource{ + ID: "source-id-2", + }, + Destination: PolicyDestination{ + ID: "destination-id-2", + Protocol: PolicyProtocolUDP, + Ports: Ports{ + Start: 1234, + End: 1235, + }, + }, + }, + }) + Expect(err).ToNot(HaveOccurred()) + Expect(server.ReceivedRequests()).To(HaveLen(1)) + }) + }) + + Context("when the client returns an error", func() { + BeforeEach(func() { + response := `{ + "error": "Oh Noes" + }` + server.AppendHandlers( + CombineHandlers( + VerifyRequest(http.MethodPost, "/policies/delete"), + RespondWith(http.StatusBadRequest, response), + ), + ) + }) + + It("returns the error", func() { + err := client.RemovePolicies(nil) + Expect(err).To(MatchError(networkerror.BadRequestError{ + Message: "Oh Noes", + })) + }) + }) + }) +}) diff --git a/api/cfnetworking/cfnetv1/ports.go b/api/cfnetworking/cfnetv1/ports.go new file mode 100644 index 00000000000..d684f64418b --- /dev/null +++ b/api/cfnetworking/cfnetv1/ports.go @@ -0,0 +1,6 @@ +package cfnetv1 + +type Ports struct { + Start int `json:"start"` + End int `json:"end"` +} diff --git a/api/cfnetworking/cfnetv1/request.go b/api/cfnetworking/cfnetv1/request.go new file mode 100644 index 00000000000..1160e84be47 --- /dev/null +++ b/api/cfnetworking/cfnetv1/request.go @@ -0,0 +1,70 @@ +package cfnetv1 + +import ( + "fmt" + "io" + "net/http" + "net/url" + + "code.cloudfoundry.org/cli/api/cfnetworking" +) + +// Params represents URI parameters for a request. +type Params map[string]string + +// requestOptions contains all the options to create an HTTP request. +type requestOptions struct { + // URIParams are the list URI route parameters + URIParams Params + + // Query is a list of HTTP query parameters + Query url.Values + + // RequestName is the name of the request (see routes) + RequestName string + + // URI is the URI of the request. + URI string + // Method is the HTTP method of the request. + Method string + + // Body is the request body + Body io.ReadSeeker +} + +// newHTTPRequest returns a constructed HTTP.Request with some defaults. +// Defaults are applied when Request fields are not filled in. +func (client Client) newHTTPRequest(passedRequest requestOptions) (*cfnetworking.Request, error) { + var request *http.Request + var err error + if passedRequest.URI != "" { + request, err = http.NewRequest( + passedRequest.Method, + fmt.Sprintf("%s%s", client.url, passedRequest.URI), + passedRequest.Body, + ) + } else { + request, err = client.router.CreateRequest( + passedRequest.RequestName, + map[string]string(passedRequest.URIParams), + passedRequest.Body, + ) + if err == nil { + request.URL.RawQuery = passedRequest.Query.Encode() + } + } + if err != nil { + return nil, err + } + + request.Header = http.Header{} + request.Header.Set("Accept", "application/json") + request.Header.Set("User-Agent", client.userAgent) + + if passedRequest.Body != nil { + request.Header.Set("Content-Type", "application/json") + } + + // Make sure the body is the same as the one in the request + return cfnetworking.NewRequest(request, passedRequest.Body), nil +} diff --git a/api/cfnetworking/cfnetworking_suite_test.go b/api/cfnetworking/cfnetworking_suite_test.go new file mode 100644 index 00000000000..b434160e526 --- /dev/null +++ b/api/cfnetworking/cfnetworking_suite_test.go @@ -0,0 +1,35 @@ +package cfnetworking_test + +import ( + "bytes" + "log" + "testing" + + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + . "github.com/onsi/gomega/ghttp" +) + +func TestUaa(t *testing.T) { + RegisterFailHandler(Fail) + RunSpecs(t, "CF Networking Suite") +} + +var server *Server + +var _ = SynchronizedBeforeSuite(func() []byte { + return []byte{} +}, func(data []byte) { + server = NewTLSServer() + + // Suppresses ginkgo server logs + server.HTTPTestServer.Config.ErrorLog = log.New(&bytes.Buffer{}, "", 0) +}) + +var _ = SynchronizedAfterSuite(func() { + server.Close() +}, func() {}) + +var _ = BeforeEach(func() { + server.Reset() +}) diff --git a/api/cfnetworking/cfnetworkingfakes/fake_connection.go b/api/cfnetworking/cfnetworkingfakes/fake_connection.go new file mode 100644 index 00000000000..a4ed6f0255e --- /dev/null +++ b/api/cfnetworking/cfnetworkingfakes/fake_connection.go @@ -0,0 +1,100 @@ +// Code generated by counterfeiter. DO NOT EDIT. +package cfnetworkingfakes + +import ( + "sync" + + "code.cloudfoundry.org/cli/api/cfnetworking" +) + +type FakeConnection struct { + MakeStub func(request *cfnetworking.Request, passedResponse *cfnetworking.Response) error + makeMutex sync.RWMutex + makeArgsForCall []struct { + request *cfnetworking.Request + passedResponse *cfnetworking.Response + } + makeReturns struct { + result1 error + } + makeReturnsOnCall map[int]struct { + result1 error + } + invocations map[string][][]interface{} + invocationsMutex sync.RWMutex +} + +func (fake *FakeConnection) Make(request *cfnetworking.Request, passedResponse *cfnetworking.Response) error { + fake.makeMutex.Lock() + ret, specificReturn := fake.makeReturnsOnCall[len(fake.makeArgsForCall)] + fake.makeArgsForCall = append(fake.makeArgsForCall, struct { + request *cfnetworking.Request + passedResponse *cfnetworking.Response + }{request, passedResponse}) + fake.recordInvocation("Make", []interface{}{request, passedResponse}) + fake.makeMutex.Unlock() + if fake.MakeStub != nil { + return fake.MakeStub(request, passedResponse) + } + if specificReturn { + return ret.result1 + } + return fake.makeReturns.result1 +} + +func (fake *FakeConnection) MakeCallCount() int { + fake.makeMutex.RLock() + defer fake.makeMutex.RUnlock() + return len(fake.makeArgsForCall) +} + +func (fake *FakeConnection) MakeArgsForCall(i int) (*cfnetworking.Request, *cfnetworking.Response) { + fake.makeMutex.RLock() + defer fake.makeMutex.RUnlock() + return fake.makeArgsForCall[i].request, fake.makeArgsForCall[i].passedResponse +} + +func (fake *FakeConnection) MakeReturns(result1 error) { + fake.MakeStub = nil + fake.makeReturns = struct { + result1 error + }{result1} +} + +func (fake *FakeConnection) MakeReturnsOnCall(i int, result1 error) { + fake.MakeStub = nil + if fake.makeReturnsOnCall == nil { + fake.makeReturnsOnCall = make(map[int]struct { + result1 error + }) + } + fake.makeReturnsOnCall[i] = struct { + result1 error + }{result1} +} + +func (fake *FakeConnection) Invocations() map[string][][]interface{} { + fake.invocationsMutex.RLock() + defer fake.invocationsMutex.RUnlock() + fake.makeMutex.RLock() + defer fake.makeMutex.RUnlock() + copiedInvocations := map[string][][]interface{}{} + for key, value := range fake.invocations { + copiedInvocations[key] = value + } + return copiedInvocations +} + +func (fake *FakeConnection) recordInvocation(key string, args []interface{}) { + fake.invocationsMutex.Lock() + defer fake.invocationsMutex.Unlock() + if fake.invocations == nil { + fake.invocations = map[string][][]interface{}{} + } + if fake.invocations[key] == nil { + fake.invocations[key] = [][]interface{}{} + } + fake.invocations[key] = append(fake.invocations[key], args) +} + +var _ cfnetworking.Connection = new(FakeConnection) diff --git a/api/cfnetworking/cfnetworkingfakes/fake_read_seeker.go b/api/cfnetworking/cfnetworkingfakes/fake_read_seeker.go new file mode 100644 index 00000000000..e2aa7f91bac --- /dev/null +++ b/api/cfnetworking/cfnetworkingfakes/fake_read_seeker.go @@ -0,0 +1,176 @@ +// Code generated by counterfeiter. DO NOT EDIT. +package cfnetworkingfakes + +import ( + "sync" + + "code.cloudfoundry.org/cli/api/cfnetworking" +) + +type FakeReadSeeker struct { + ReadStub func(p []byte) (n int, err error) + readMutex sync.RWMutex + readArgsForCall []struct { + p []byte + } + readReturns struct { + result1 int + result2 error + } + readReturnsOnCall map[int]struct { + result1 int + result2 error + } + SeekStub func(offset int64, whence int) (int64, error) + seekMutex sync.RWMutex + seekArgsForCall []struct { + offset int64 + whence int + } + seekReturns struct { + result1 int64 + result2 error + } + seekReturnsOnCall map[int]struct { + result1 int64 + result2 error + } + invocations map[string][][]interface{} + invocationsMutex sync.RWMutex +} + +func (fake *FakeReadSeeker) Read(p []byte) (n int, err error) { + var pCopy []byte + if p != nil { + pCopy = make([]byte, len(p)) + copy(pCopy, p) + } + fake.readMutex.Lock() + ret, specificReturn := fake.readReturnsOnCall[len(fake.readArgsForCall)] + fake.readArgsForCall = append(fake.readArgsForCall, struct { + p []byte + }{pCopy}) + fake.recordInvocation("Read", []interface{}{pCopy}) + fake.readMutex.Unlock() + if fake.ReadStub != nil { + return fake.ReadStub(p) + } + if specificReturn { + return ret.result1, ret.result2 + } + return fake.readReturns.result1, fake.readReturns.result2 +} + +func (fake *FakeReadSeeker) ReadCallCount() int { + fake.readMutex.RLock() + defer fake.readMutex.RUnlock() + return len(fake.readArgsForCall) +} + +func (fake *FakeReadSeeker) ReadArgsForCall(i int) []byte { + fake.readMutex.RLock() + defer fake.readMutex.RUnlock() + return fake.readArgsForCall[i].p +} + +func (fake *FakeReadSeeker) ReadReturns(result1 int, result2 error) { + fake.ReadStub = nil + fake.readReturns = struct { + result1 int + result2 error + }{result1, result2} +} + +func (fake *FakeReadSeeker) ReadReturnsOnCall(i int, result1 int, result2 error) { + fake.ReadStub = nil + if fake.readReturnsOnCall == nil { + fake.readReturnsOnCall = make(map[int]struct { + result1 int + result2 error + }) + } + fake.readReturnsOnCall[i] = struct { + result1 int + result2 error + }{result1, result2} +} + +func (fake *FakeReadSeeker) Seek(offset int64, whence int) (int64, error) { + fake.seekMutex.Lock() + ret, specificReturn := fake.seekReturnsOnCall[len(fake.seekArgsForCall)] + fake.seekArgsForCall = append(fake.seekArgsForCall, struct { + offset int64 + whence int + }{offset, whence}) + fake.recordInvocation("Seek", []interface{}{offset, whence}) + fake.seekMutex.Unlock() + if fake.SeekStub != nil { + return fake.SeekStub(offset, whence) + } + if specificReturn { + return ret.result1, ret.result2 + } + return fake.seekReturns.result1, fake.seekReturns.result2 +} + +func (fake *FakeReadSeeker) SeekCallCount() int { + fake.seekMutex.RLock() + defer fake.seekMutex.RUnlock() + return len(fake.seekArgsForCall) +} + +func (fake *FakeReadSeeker) SeekArgsForCall(i int) (int64, int) { + fake.seekMutex.RLock() + defer fake.seekMutex.RUnlock() + return fake.seekArgsForCall[i].offset, fake.seekArgsForCall[i].whence +} + +func (fake *FakeReadSeeker) SeekReturns(result1 int64, result2 error) { + fake.SeekStub = nil + fake.seekReturns = struct { + result1 int64 + result2 error + }{result1, result2} +} + +func (fake *FakeReadSeeker) SeekReturnsOnCall(i int, result1 int64, result2 error) { + fake.SeekStub = nil + if fake.seekReturnsOnCall == nil { + fake.seekReturnsOnCall = make(map[int]struct { + result1 int64 + result2 error + }) + } + fake.seekReturnsOnCall[i] = struct { + result1 int64 + result2 error + }{result1, result2} +} + +func (fake *FakeReadSeeker) Invocations() map[string][][]interface{} { + fake.invocationsMutex.RLock() + defer fake.invocationsMutex.RUnlock() + fake.readMutex.RLock() + defer fake.readMutex.RUnlock() + fake.seekMutex.RLock() + defer fake.seekMutex.RUnlock() + copiedInvocations := map[string][][]interface{}{} + for key, value := range fake.invocations { + copiedInvocations[key] = value + } + return copiedInvocations +} + +func (fake *FakeReadSeeker) recordInvocation(key string, args []interface{}) { + fake.invocationsMutex.Lock() + defer fake.invocationsMutex.Unlock() + if fake.invocations == nil { + fake.invocations = map[string][][]interface{}{} + } + if fake.invocations[key] == nil { + fake.invocations[key] = [][]interface{}{} + } + fake.invocations[key] = append(fake.invocations[key], args) +} + +var _ cfnetworking.ReadSeeker = new(FakeReadSeeker) diff --git a/api/cfnetworking/connection.go b/api/cfnetworking/connection.go new file mode 100644 index 00000000000..bcc6548a93b --- /dev/null +++ b/api/cfnetworking/connection.go @@ -0,0 +1,8 @@ +package cfnetworking + +//go:generate counterfeiter . Connection + +// Connection creates and executes http requests +type Connection interface { + Make(request *Request, passedResponse *Response) error +} diff --git a/api/cfnetworking/errors.go b/api/cfnetworking/errors.go new file mode 100644 index 00000000000..07f1c2459a5 --- /dev/null +++ b/api/cfnetworking/errors.go @@ -0,0 +1,64 @@ +package cfnetworking + +import ( + "encoding/json" + "net/http" + + "code.cloudfoundry.org/cli/api/cfnetworking/networkerror" +) + +// errorWrapper is the wrapper that converts responses with 4xx and 5xx status +// codes to an error. +type errorWrapper struct { + connection Connection +} + +func NewErrorWrapper() *errorWrapper { + return new(errorWrapper) +} + +// Wrap wraps a Cloud Controller connection in this error handling wrapper. +func (e *errorWrapper) Wrap(innerconnection Connection) Connection { + e.connection = innerconnection + return e +} + +// Make converts RawHTTPStatusError, which represents responses with 4xx and +// 5xx status codes, to specific errors. +func (e *errorWrapper) Make(request *Request, passedResponse *Response) error { + err := e.connection.Make(request, passedResponse) + + if rawHTTPStatusErr, ok := err.(networkerror.RawHTTPStatusError); ok { + return convert(rawHTTPStatusErr) + } + return err +} + +func convert(rawHTTPStatusErr networkerror.RawHTTPStatusError) error { + // Try to unmarshal the raw error into a CC error. If unmarshaling fails, + // return the raw error. + var errorResponse networkerror.ErrorResponse + err := json.Unmarshal(rawHTTPStatusErr.RawResponse, &errorResponse) + if err != nil { + return rawHTTPStatusErr + } + + switch rawHTTPStatusErr.StatusCode { + case http.StatusBadRequest: // 400 + return networkerror.BadRequestError(errorResponse) + case http.StatusUnauthorized: // 401 + return networkerror.UnauthorizedError(errorResponse) + case http.StatusForbidden: // 403 + return networkerror.ForbiddenError(errorResponse) + case http.StatusNotAcceptable: // 406 + return networkerror.NotAcceptableError(errorResponse) + case http.StatusConflict: // 409 + return networkerror.ConflictError(errorResponse) + default: + return networkerror.UnexpectedResponseError{ + ErrorResponse: errorResponse, + RequestIDs: rawHTTPStatusErr.RequestIDs, + ResponseCode: rawHTTPStatusErr.StatusCode, + } + } +} diff --git a/api/cfnetworking/errors_test.go b/api/cfnetworking/errors_test.go new file mode 100644 index 00000000000..c130e255973 --- /dev/null +++ b/api/cfnetworking/errors_test.go @@ -0,0 +1,36 @@ +package cfnetworking_test + +import ( + "fmt" + "net/http" + + . "code.cloudfoundry.org/cli/api/cfnetworking" + "code.cloudfoundry.org/cli/api/cfnetworking/cfnetworkingfakes" + "code.cloudfoundry.org/cli/api/cfnetworking/networkerror" + + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" +) + +var _ = Describe("Error Wrapper", func() { + const errorMessage = "I am an error" + + DescribeTable("Make", + func(statusCode int, expectedError error) { + fakeConnection := new(cfnetworkingfakes.FakeConnection) + fakeConnection.MakeReturns(networkerror.RawHTTPStatusError{ + StatusCode: statusCode, + RawResponse: []byte(fmt.Sprintf(`{"error":"%s"}`, errorMessage)), + }) + + errorWrapper := NewErrorWrapper().Wrap(fakeConnection) + err := errorWrapper.Make(nil, nil) + Expect(err).To(MatchError(expectedError)) + }, + Entry("400 -> BadRequestError", http.StatusBadRequest, networkerror.BadRequestError{Message: errorMessage}), + Entry("401 -> UnauthorizedError", http.StatusUnauthorized, networkerror.UnauthorizedError{Message: errorMessage}), + Entry("403 -> ForbiddenError", http.StatusForbidden, networkerror.ForbiddenError{Message: errorMessage}), + Entry("406 -> NotAcceptable", http.StatusNotAcceptable, networkerror.NotAcceptableError{Message: errorMessage}), + Entry("409 -> ConflictError", http.StatusConflict, networkerror.ConflictError{Message: errorMessage}), + ) +}) diff --git a/api/cfnetworking/networkerror/bad_request_error.go b/api/cfnetworking/networkerror/bad_request_error.go new file mode 100644 index 00000000000..16db7bd925c --- /dev/null +++ b/api/cfnetworking/networkerror/bad_request_error.go @@ -0,0 +1,9 @@ +package networkerror + +type BadRequestError struct { + Message string `json:"error"` +} + +func (e BadRequestError) Error() string { + return e.Message +} diff --git a/api/cfnetworking/networkerror/conflict_error.go b/api/cfnetworking/networkerror/conflict_error.go new file mode 100644 index 00000000000..807ac313642 --- /dev/null +++ b/api/cfnetworking/networkerror/conflict_error.go @@ -0,0 +1,9 @@ +package networkerror + +type ConflictError struct { + Message string `json:"error"` +} + +func (e ConflictError) Error() string { + return e.Message +} diff --git a/api/cfnetworking/networkerror/error_response.go b/api/cfnetworking/networkerror/error_response.go new file mode 100644 index 00000000000..a3ff4659f9a --- /dev/null +++ b/api/cfnetworking/networkerror/error_response.go @@ -0,0 +1,9 @@ +package networkerror + +type ErrorResponse struct { + Message string `json:"error"` +} + +func (e ErrorResponse) Error() string { + return e.Message +} diff --git a/api/cfnetworking/networkerror/forbidden_error.go b/api/cfnetworking/networkerror/forbidden_error.go new file mode 100644 index 00000000000..d780a34cb8f --- /dev/null +++ b/api/cfnetworking/networkerror/forbidden_error.go @@ -0,0 +1,9 @@ +package networkerror + +type ForbiddenError struct { + Message string `json:"error"` +} + +func (e ForbiddenError) Error() string { + return e.Message +} diff --git a/api/cfnetworking/networkerror/invalid_auth_token_error.go b/api/cfnetworking/networkerror/invalid_auth_token_error.go new file mode 100644 index 00000000000..3e3178c39ad --- /dev/null +++ b/api/cfnetworking/networkerror/invalid_auth_token_error.go @@ -0,0 +1,11 @@ +package networkerror + +// InvalidAuthTokenError is returned when the client has an invalid +// authorization header. +type InvalidAuthTokenError struct { + Message string +} + +func (e InvalidAuthTokenError) Error() string { + return e.Message +} diff --git a/api/cfnetworking/networkerror/not_acceptable_error.go b/api/cfnetworking/networkerror/not_acceptable_error.go new file mode 100644 index 00000000000..002a73df304 --- /dev/null +++ b/api/cfnetworking/networkerror/not_acceptable_error.go @@ -0,0 +1,9 @@ +package networkerror + +type NotAcceptableError struct { + Message string `json:"error"` +} + +func (e NotAcceptableError) Error() string { + return e.Message +} diff --git a/api/cfnetworking/networkerror/not_found_error.go b/api/cfnetworking/networkerror/not_found_error.go new file mode 100644 index 00000000000..a69d3030854 --- /dev/null +++ b/api/cfnetworking/networkerror/not_found_error.go @@ -0,0 +1,10 @@ +package networkerror + +// NotFoundError wraps a generic 404 error. +type NotFoundError struct { + Message string +} + +func (e NotFoundError) Error() string { + return e.Message +} diff --git a/api/cfnetworking/networkerror/raw_http_status_error.go b/api/cfnetworking/networkerror/raw_http_status_error.go new file mode 100644 index 00000000000..fea62dcd7fd --- /dev/null +++ b/api/cfnetworking/networkerror/raw_http_status_error.go @@ -0,0 +1,14 @@ +package networkerror + +import "fmt" + +// RawHTTPStatusError represents any response with a 4xx or 5xx status code. +type RawHTTPStatusError struct { + StatusCode int + RawResponse []byte + RequestIDs []string +} + +func (r RawHTTPStatusError) Error() string { + return fmt.Sprintf("Error Code: %d\nRaw Response: %s", r.StatusCode, r.RawResponse) +} diff --git a/api/cfnetworking/networkerror/request_error.go b/api/cfnetworking/networkerror/request_error.go new file mode 100644 index 00000000000..7b0ff48937f --- /dev/null +++ b/api/cfnetworking/networkerror/request_error.go @@ -0,0 +1,11 @@ +package networkerror + +// RequestError represents a generic error encountered while performing the +// HTTP request. This generic error occurs before a HTTP response is obtained. +type RequestError struct { + Err error +} + +func (e RequestError) Error() string { + return e.Err.Error() +} diff --git a/api/cfnetworking/networkerror/ssl_validation_hostname_error.go b/api/cfnetworking/networkerror/ssl_validation_hostname_error.go new file mode 100644 index 00000000000..a583abcff0e --- /dev/null +++ b/api/cfnetworking/networkerror/ssl_validation_hostname_error.go @@ -0,0 +1,13 @@ +package networkerror + +import "fmt" + +// SSLValidationHostnameError replaces x509.HostnameError when the server has +// SSL certificate that does not match the hostname. +type SSLValidationHostnameError struct { + Message string +} + +func (e SSLValidationHostnameError) Error() string { + return fmt.Sprintf("Hostname does not match SSL Certificate (%s)", e.Message) +} diff --git a/api/cfnetworking/networkerror/unauthorized_error.go b/api/cfnetworking/networkerror/unauthorized_error.go new file mode 100644 index 00000000000..513c6de40cb --- /dev/null +++ b/api/cfnetworking/networkerror/unauthorized_error.go @@ -0,0 +1,9 @@ +package networkerror + +type UnauthorizedError struct { + Message string `json:"error"` +} + +func (e UnauthorizedError) Error() string { + return e.Message +} diff --git a/api/cfnetworking/networkerror/unexpected_response_error.go b/api/cfnetworking/networkerror/unexpected_response_error.go new file mode 100644 index 00000000000..e337d7a7954 --- /dev/null +++ b/api/cfnetworking/networkerror/unexpected_response_error.go @@ -0,0 +1,20 @@ +package networkerror + +import "fmt" + +// UnexpectedResponseError is returned when the client gets an error that has +// not been accounted for. +type UnexpectedResponseError struct { + ErrorResponse + + RequestIDs []string + ResponseCode int +} + +func (e UnexpectedResponseError) Error() string { + message := fmt.Sprintf("Unexpected Response\nResponse code: %d", e.ResponseCode) + for _, id := range e.RequestIDs { + message = fmt.Sprintf("%s\nRequest ID: %s", message, id) + } + return fmt.Sprintf("%s\nDescription: %s", message, e.Message) +} diff --git a/api/cfnetworking/networkerror/unverified_server_error.go b/api/cfnetworking/networkerror/unverified_server_error.go new file mode 100644 index 00000000000..59a877302a8 --- /dev/null +++ b/api/cfnetworking/networkerror/unverified_server_error.go @@ -0,0 +1,11 @@ +package networkerror + +// UnverifiedServerError replaces x509.UnknownAuthorityError when the server +// has SSL but the client is unable to verify it's certificate +type UnverifiedServerError struct { + URL string +} + +func (UnverifiedServerError) Error() string { + return "x509: certificate signed by unknown authority" +} diff --git a/api/cfnetworking/networking_connection.go b/api/cfnetworking/networking_connection.go new file mode 100644 index 00000000000..3980af92e5b --- /dev/null +++ b/api/cfnetworking/networking_connection.go @@ -0,0 +1,130 @@ +package cfnetworking + +import ( + "bytes" + "crypto/tls" + "crypto/x509" + "encoding/json" + "errors" + "io/ioutil" + "net" + "net/http" + "net/url" + "time" + + "code.cloudfoundry.org/cli/api/cfnetworking/networkerror" +) + +// NetworkingConnection represents a connection to the Cloud Controller +// server. +type NetworkingConnection struct { + HTTPClient *http.Client + UserAgent string +} + +// Config is for configuring a NetworkingConnection. +type Config struct { + DialTimeout time.Duration + SkipSSLValidation bool +} + +// NewConnection returns a new NetworkingConnection with provided +// configuration. +func NewConnection(config Config) *NetworkingConnection { + tr := &http.Transport{ + TLSClientConfig: &tls.Config{ + InsecureSkipVerify: config.SkipSSLValidation, + }, + Proxy: http.ProxyFromEnvironment, + DialContext: (&net.Dialer{ + KeepAlive: 30 * time.Second, + Timeout: config.DialTimeout, + }).DialContext, + } + + return &NetworkingConnection{ + HTTPClient: &http.Client{Transport: tr}, + } +} + +// Make performs the request and parses the response. +func (connection *NetworkingConnection) Make(request *Request, passedResponse *Response) error { + // In case this function is called from a retry, passedResponse may already + // be populated with a previous response. We reset in case there's an HTTP + // error and we don't repopulate it in populateResponse. + passedResponse.reset() + + response, err := connection.HTTPClient.Do(request.Request) + if err != nil { + return connection.processRequestErrors(request.Request, err) + } + + return connection.populateResponse(response, passedResponse) +} + +func (*NetworkingConnection) processRequestErrors(request *http.Request, err error) error { + switch e := err.(type) { + case *url.Error: + if errors.As(err, &x509.UnknownAuthorityError{}) { + return networkerror.UnverifiedServerError{ + URL: request.URL.String(), + } + } + + hostnameError := x509.HostnameError{} + if errors.As(err, &hostnameError) { + return networkerror.SSLValidationHostnameError{ + Message: hostnameError.Error(), + } + } + + return networkerror.RequestError{Err: e} + + default: + return err + } +} + +func (connection *NetworkingConnection) populateResponse(response *http.Response, passedResponse *Response) error { + passedResponse.HTTPResponse = response + + if resourceLocationURL := response.Header.Get("Location"); resourceLocationURL != "" { + passedResponse.ResourceLocationURL = resourceLocationURL + } + + rawBytes, err := ioutil.ReadAll(response.Body) + defer response.Body.Close() + if err != nil { + return err + } + + passedResponse.RawResponse = rawBytes + + err = connection.handleStatusCodes(response, passedResponse) + if err != nil { + return err + } + + if passedResponse.Result != nil { + decoder := json.NewDecoder(bytes.NewBuffer(passedResponse.RawResponse)) + decoder.UseNumber() + err = decoder.Decode(passedResponse.Result) + if err != nil { + return err + } + } + + return nil +} + +func (*NetworkingConnection) handleStatusCodes(response *http.Response, passedResponse *Response) error { + if response.StatusCode >= 400 { + return networkerror.RawHTTPStatusError{ + StatusCode: response.StatusCode, + RawResponse: passedResponse.RawResponse, + RequestIDs: response.Header["X-Vcap-Request-Id"], + } + } + + return nil +} diff --git a/api/cfnetworking/networking_connection_test.go b/api/cfnetworking/networking_connection_test.go new file mode 100644 index 00000000000..b8ee9a24fbf --- /dev/null +++ b/api/cfnetworking/networking_connection_test.go @@ -0,0 +1,251 @@ +package cfnetworking_test + +import ( + "fmt" + "net/http" + "runtime" + "strings" + + . "code.cloudfoundry.org/cli/api/cfnetworking" + "code.cloudfoundry.org/cli/api/cfnetworking/networkerror" + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + . "github.com/onsi/gomega/ghttp" +) + +type DummyResponse struct { + Val1 string `json:"val1"` + Val2 int `json:"val2"` + Val3 interface{} `json:"val3,omitempty"` +} + +var _ = Describe("CF Networking Connection", func() { + var connection *NetworkingConnection + + BeforeEach(func() { + connection = NewConnection(Config{SkipSSLValidation: true}) + }) + + Describe("Make", func() { + Describe("Data Unmarshalling", func() { + var request *Request + + BeforeEach(func() { + response := `{ + "val1":"2.59.0", + "val2":2, + "val3":1111111111111111111 + }` + server.AppendHandlers( + CombineHandlers( + VerifyRequest(http.MethodGet, "/v2/foo", ""), + RespondWith(http.StatusOK, response), + ), + ) + + req, err := http.NewRequest(http.MethodGet, fmt.Sprintf("%s/v2/foo", server.URL()), nil) + Expect(err).ToNot(HaveOccurred()) + request = &Request{Request: req} + }) + + Context("when passed a response with a result set", func() { + It("unmarshals the data into a struct", func() { + var body DummyResponse + response := Response{ + Result: &body, + } + + err := connection.Make(request, &response) + Expect(err).NotTo(HaveOccurred()) + + Expect(body.Val1).To(Equal("2.59.0")) + Expect(body.Val2).To(Equal(2)) + }) + + It("keeps numbers unmarshalled to interfaces as interfaces", func() { + var body DummyResponse + response := Response{ + Result: &body, + } + + err := connection.Make(request, &response) + Expect(err).NotTo(HaveOccurred()) + Expect(fmt.Sprint(body.Val3)).To(Equal("1111111111111111111")) + }) + }) + + Context("when passed an empty response", func() { + It("skips the unmarshalling step", func() { + var response Response + err := connection.Make(request, &response) + Expect(err).NotTo(HaveOccurred()) + Expect(response.Result).To(BeNil()) + }) + }) + }) + + Describe("HTTP Response", func() { + var request *Request + + BeforeEach(func() { + response := `{}` + server.AppendHandlers( + CombineHandlers( + VerifyRequest(http.MethodGet, "/v2/foo", ""), + RespondWith(http.StatusOK, response), + ), + ) + + req, err := http.NewRequest(http.MethodGet, fmt.Sprintf("%s/v2/foo", server.URL()), nil) + Expect(err).ToNot(HaveOccurred()) + request = &Request{Request: req} + }) + + It("returns the status", func() { + response := Response{} + + err := connection.Make(request, &response) + Expect(err).NotTo(HaveOccurred()) + + Expect(response.HTTPResponse.Status).To(Equal("200 OK")) + }) + }) + + Describe("Response Headers", func() { + Describe("Location", func() { + BeforeEach(func() { + server.AppendHandlers( + CombineHandlers( + VerifyRequest(http.MethodGet, "/v2/foo"), + RespondWith(http.StatusAccepted, "{}", http.Header{"Location": {"/v2/some-location"}}), + ), + ) + }) + + It("returns the location in the ResourceLocationURL", func() { + req, err := http.NewRequest(http.MethodGet, fmt.Sprintf("%s/v2/foo", server.URL()), nil) + Expect(err).ToNot(HaveOccurred()) + request := &Request{Request: req} + + var response Response + err = connection.Make(request, &response) + Expect(err).NotTo(HaveOccurred()) + + Expect(server.ReceivedRequests()).To(HaveLen(1)) + Expect(response.ResourceLocationURL).To(Equal("/v2/some-location")) + }) + }) + }) + + Describe("Errors", func() { + Context("when the server does not exist", func() { + BeforeEach(func() { + connection = NewConnection(Config{}) + }) + + It("returns a RequestError", func() { + req, err := http.NewRequest(http.MethodGet, fmt.Sprintf("%s/v2/foo", "http://garbledyguk.com"), nil) + Expect(err).ToNot(HaveOccurred()) + request := &Request{Request: req} + + var response Response + err = connection.Make(request, &response) + Expect(err).To(HaveOccurred()) + + requestErr, ok := err.(networkerror.RequestError) + Expect(ok).To(BeTrue()) + Expect(requestErr.Error()).To(MatchRegexp(".*http://garbledyguk.com/v2/foo.*[nN]o such host")) + }) + }) + + Context("when the server does not have a verified certificate", func() { + Context("skipSSLValidation is false", func() { + BeforeEach(func() { + server.AppendHandlers( + CombineHandlers( + VerifyRequest(http.MethodGet, "/v2/foo"), + ), + ) + + connection = NewConnection(Config{}) + }) + + It("returns a UnverifiedServerError", func() { + req, err := http.NewRequest(http.MethodGet, server.URL(), nil) + Expect(err).ToNot(HaveOccurred()) + request := &Request{Request: req} + + var response Response + err = connection.Make(request, &response) + Expect(err).To(MatchError(networkerror.UnverifiedServerError{URL: server.URL()})) + }) + }) + }) + + Context("when the server's certificate does not match the hostname", func() { + Context("skipSSLValidation is false", func() { + BeforeEach(func() { + if runtime.GOOS == "windows" { + Skip("ssl validation has a different order on windows, will not be returned properly") + } + server.AppendHandlers( + CombineHandlers( + VerifyRequest(http.MethodGet, "/"), + ), + ) + + connection = NewConnection(Config{}) + }) + + // loopback.cli.ci.cf-app.com is a custom DNS record setup to point to 127.0.0.1 + It("returns a SSLValidationHostnameError", func() { + altHostURL := strings.Replace(server.URL(), "127.0.0.1", "loopback.cli.ci.cf-app.com", -1) + req, err := http.NewRequest(http.MethodGet, altHostURL, nil) + Expect(err).ToNot(HaveOccurred()) + request := &Request{Request: req} + + var response Response + err = connection.Make(request, &response) + Expect(err).To(MatchError(networkerror.SSLValidationHostnameError{ + Message: "x509: certificate is valid for example.com, not loopback.cli.ci.cf-app.com", + })) + }) + }) + }) + + Describe("RawHTTPStatusError", func() { + var networkResponse string + BeforeEach(func() { + networkResponse = `{ + "code": 90004, + "description": "The service binding could not be found: some-guid", + "error_code": "CF-ServiceBindingNotFound" + }` + + server.AppendHandlers( + CombineHandlers( + VerifyRequest(http.MethodGet, "/v2/foo"), + RespondWith(http.StatusNotFound, networkResponse, http.Header{"X-Vcap-Request-Id": {"6e0b4379-f5f7-4b2b-56b0-9ab7e96eed95", "6e0b4379-f5f7-4b2b-56b0-9ab7e96eed95::7445d9db-c31e-410d-8dc5-9f79ec3fc26f"}}), + ), + ) + }) + + It("returns a CCRawResponse", func() { + req, err := http.NewRequest(http.MethodGet, fmt.Sprintf("%s/v2/foo", server.URL()), nil) + Expect(err).ToNot(HaveOccurred()) + request := &Request{Request: req} + + var response Response + err = connection.Make(request, &response) + Expect(err).To(MatchError(networkerror.RawHTTPStatusError{ + StatusCode: http.StatusNotFound, + RawResponse: []byte(networkResponse), + RequestIDs: []string{"6e0b4379-f5f7-4b2b-56b0-9ab7e96eed95", "6e0b4379-f5f7-4b2b-56b0-9ab7e96eed95::7445d9db-c31e-410d-8dc5-9f79ec3fc26f"}, + })) + + Expect(server.ReceivedRequests()).To(HaveLen(1)) + }) + }) + }) + }) +}) diff --git a/api/cfnetworking/request.go b/api/cfnetworking/request.go new file mode 100644 index 00000000000..84f42ed9d76 --- /dev/null +++ b/api/cfnetworking/request.go @@ -0,0 +1,35 @@ +package cfnetworking + +import ( + "io" + "net/http" +) + +//go:generate counterfeiter . ReadSeeker + +type ReadSeeker interface { + io.ReadSeeker +} + +// Request represents the request of the cloud controller. +type Request struct { + *http.Request + + body io.ReadSeeker +} + +func (r *Request) ResetBody() error { + if r.body == nil { + return nil + } + + _, err := r.body.Seek(0, 0) + return err +} + +func NewRequest(request *http.Request, body io.ReadSeeker) *Request { + return &Request{ + Request: request, + body: body, + } +} diff --git a/api/cfnetworking/response.go b/api/cfnetworking/response.go new file mode 100644 index 00000000000..8d4de87ccac --- /dev/null +++ b/api/cfnetworking/response.go @@ -0,0 +1,29 @@ +package cfnetworking + +import "net/http" + +// Response represents a Cloud Controller response object. +type Response struct { + // Result represents the resource entity type that is expected in the + // response JSON. + Result interface{} + + // RawResponse represents the response body. + RawResponse []byte + + // Warnings represents warnings parsed from the custom warnings headers of a + // Cloud Controller response. + Warnings []string + + // HTTPResponse represents the HTTP response object. + HTTPResponse *http.Response + + // ResourceLocationURL represents the Location header value + ResourceLocationURL string +} + +func (r *Response) reset() { + r.RawResponse = []byte{} + r.Warnings = []string{} + r.HTTPResponse = nil +} diff --git a/api/cfnetworking/wrapper/request_logger.go b/api/cfnetworking/wrapper/request_logger.go new file mode 100644 index 00000000000..8fbe2aa3390 --- /dev/null +++ b/api/cfnetworking/wrapper/request_logger.go @@ -0,0 +1,156 @@ +package wrapper + +import ( + "fmt" + "io/ioutil" + "net/http" + "sort" + "strings" + "time" + + "code.cloudfoundry.org/cli/api/cfnetworking" +) + +//go:generate counterfeiter . RequestLoggerOutput + +// RequestLoggerOutput is the interface for displaying logs +type RequestLoggerOutput interface { + DisplayHeader(name string, value string) error + DisplayHost(name string) error + DisplayJSONBody(body []byte) error + DisplayMessage(msg string) error + DisplayRequestHeader(method string, uri string, httpProtocol string) error + DisplayResponseHeader(httpProtocol string, status string) error + DisplayType(name string, requestDate time.Time) error + HandleInternalError(err error) + Start() error + Stop() error +} + +// RequestLogger is the wrapper that logs requests to and responses from the +// Cloud Controller server +type RequestLogger struct { + connection cfnetworking.Connection + output RequestLoggerOutput +} + +// NewRequestLogger returns a pointer to a RequestLogger wrapper +func NewRequestLogger(output RequestLoggerOutput) *RequestLogger { + return &RequestLogger{ + output: output, + } +} + +// Wrap sets the connection on the RequestLogger and returns itself +func (logger *RequestLogger) Wrap(innerconnection cfnetworking.Connection) cfnetworking.Connection { + logger.connection = innerconnection + return logger +} + +// Make records the request and the response to UI +func (logger *RequestLogger) Make(request *cfnetworking.Request, passedResponse *cfnetworking.Response) error { + err := logger.displayRequest(request) + if err != nil { + logger.output.HandleInternalError(err) + } + + err = logger.connection.Make(request, passedResponse) + + if passedResponse.HTTPResponse != nil { + displayErr := logger.displayResponse(passedResponse) + if displayErr != nil { + logger.output.HandleInternalError(displayErr) + } + } + + return err +} + +func (logger *RequestLogger) displayRequest(request *cfnetworking.Request) error { + err := logger.output.Start() + if err != nil { + return err + } + defer logger.output.Stop() + + err = logger.output.DisplayType("REQUEST", time.Now()) + if err != nil { + return err + } + err = logger.output.DisplayRequestHeader(request.Method, request.URL.RequestURI(), request.Proto) + if err != nil { + return err + } + err = logger.output.DisplayHost(request.URL.Host) + if err != nil { + return err + } + err = logger.displaySortedHeaders(request.Header) + if err != nil { + return err + } + + contentType := request.Header.Get("Content-Type") + if request.Body != nil { + if strings.Contains(contentType, "json") { + rawRequestBody, err := ioutil.ReadAll(request.Body) + if err != nil { + return err + } + + defer request.ResetBody() + + return logger.output.DisplayJSONBody(rawRequestBody) + } else if contentType != "" { + return logger.output.DisplayMessage(fmt.Sprintf("[%s Content Hidden]", strings.Split(contentType, ";")[0])) + } + } + return nil +} + +func (logger *RequestLogger) displayResponse(passedResponse *cfnetworking.Response) error { + err := logger.output.Start() + if err != nil { + return err + } + defer logger.output.Stop() + + err = logger.output.DisplayType("RESPONSE", time.Now()) + if err != nil { + return err + } + err = logger.output.DisplayResponseHeader(passedResponse.HTTPResponse.Proto, passedResponse.HTTPResponse.Status) + if err != nil { + return err + } + err = logger.displaySortedHeaders(passedResponse.HTTPResponse.Header) + if err != nil { + return err + } + return logger.output.DisplayJSONBody(passedResponse.RawResponse) +} + +func (logger *RequestLogger) displaySortedHeaders(headers http.Header) error { + keys := []string{} + for key, _ := range headers { + keys = append(keys, key) + } + sort.Strings(keys) + + for _, key := range keys { + for _, value := range headers[key] { + err := logger.output.DisplayHeader(key, redactHeaders(key, value)) + if err != nil { + return err + } + } + } + return nil +} + +func redactHeaders(key string, value string) string { + if key == "Authorization" { + return "[PRIVATE DATA HIDDEN]" + } + return value +} diff --git a/api/cfnetworking/wrapper/request_logger_test.go b/api/cfnetworking/wrapper/request_logger_test.go new file mode 100644 index 00000000000..b4437e996de --- /dev/null +++ b/api/cfnetworking/wrapper/request_logger_test.go @@ -0,0 +1,328 @@ +package wrapper_test + +import ( + "bytes" + "errors" + "io/ioutil" + "net/http" + "net/url" + "time" + + "code.cloudfoundry.org/cli/api/cfnetworking" + "code.cloudfoundry.org/cli/api/cfnetworking/cfnetworkingfakes" + . "code.cloudfoundry.org/cli/api/cfnetworking/wrapper" + "code.cloudfoundry.org/cli/api/cfnetworking/wrapper/wrapperfakes" + + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" +) + +var _ = Describe("Request Logger", func() { + var ( + fakeConnection *cfnetworkingfakes.FakeConnection + fakeOutput *wrapperfakes.FakeRequestLoggerOutput + + wrapper cfnetworking.Connection + + request *cfnetworking.Request + response *cfnetworking.Response + executeErr error + ) + + BeforeEach(func() { + fakeConnection = new(cfnetworkingfakes.FakeConnection) + fakeOutput = new(wrapperfakes.FakeRequestLoggerOutput) + + wrapper = NewRequestLogger(fakeOutput).Wrap(fakeConnection) + + body := bytes.NewReader([]byte("foo")) + + req, err := http.NewRequest(http.MethodGet, "https://foo.bar.com/banana", body) + Expect(err).NotTo(HaveOccurred()) + + req.URL.RawQuery = url.Values{ + "query1": {"a"}, + "query2": {"b"}, + }.Encode() + + headers := http.Header{} + headers.Add("Aghi", "bar") + headers.Add("Abc", "json") + headers.Add("Adef", "application/json") + req.Header = headers + + response = &cfnetworking.Response{ + RawResponse: []byte("some-response-body"), + HTTPResponse: &http.Response{}, + } + request = cfnetworking.NewRequest(req, body) + }) + + JustBeforeEach(func() { + executeErr = wrapper.Make(request, response) + }) + + Describe("Make", func() { + It("outputs the request", func() { + Expect(executeErr).NotTo(HaveOccurred()) + + Expect(fakeOutput.DisplayTypeCallCount()).To(BeNumerically(">=", 1)) + name, date := fakeOutput.DisplayTypeArgsForCall(0) + Expect(name).To(Equal("REQUEST")) + Expect(date).To(BeTemporally("~", time.Now(), time.Second)) + + Expect(fakeOutput.DisplayRequestHeaderCallCount()).To(Equal(1)) + method, uri, protocol := fakeOutput.DisplayRequestHeaderArgsForCall(0) + Expect(method).To(Equal(http.MethodGet)) + Expect(uri).To(MatchRegexp("/banana\\?(?:query1=a&query2=b|query2=b&query1=a)")) + Expect(protocol).To(Equal("HTTP/1.1")) + + Expect(fakeOutput.DisplayHostCallCount()).To(Equal(1)) + host := fakeOutput.DisplayHostArgsForCall(0) + Expect(host).To(Equal("foo.bar.com")) + + Expect(fakeOutput.DisplayHeaderCallCount()).To(BeNumerically(">=", 3)) + name, value := fakeOutput.DisplayHeaderArgsForCall(0) + Expect(name).To(Equal("Abc")) + Expect(value).To(Equal("json")) + name, value = fakeOutput.DisplayHeaderArgsForCall(1) + Expect(name).To(Equal("Adef")) + Expect(value).To(Equal("application/json")) + name, value = fakeOutput.DisplayHeaderArgsForCall(2) + Expect(name).To(Equal("Aghi")) + Expect(value).To(Equal("bar")) + + Expect(fakeOutput.DisplayMessageCallCount()).To(Equal(0)) + }) + + Context("when an authorization header is in the request", func() { + BeforeEach(func() { + request.Header = http.Header{"Authorization": []string{"should not be shown"}} + }) + + It("redacts the contents of the authorization header", func() { + Expect(executeErr).NotTo(HaveOccurred()) + Expect(fakeOutput.DisplayHeaderCallCount()).To(Equal(1)) + key, value := fakeOutput.DisplayHeaderArgsForCall(0) + Expect(key).To(Equal("Authorization")) + Expect(value).To(Equal("[PRIVATE DATA HIDDEN]")) + }) + }) + + Context("when passed a body", func() { + Context("when the request's Content-Type is application/json", func() { + BeforeEach(func() { + request.Header.Set("Content-Type", "application/json") + }) + + It("outputs the body", func() { + Expect(executeErr).NotTo(HaveOccurred()) + + Expect(fakeOutput.DisplayJSONBodyCallCount()).To(BeNumerically(">=", 1)) + Expect(fakeOutput.DisplayJSONBodyArgsForCall(0)).To(Equal([]byte("foo"))) + + bytes, err := ioutil.ReadAll(request.Body) + Expect(err).NotTo(HaveOccurred()) + Expect(bytes).To(Equal([]byte("foo"))) + }) + }) + + Context("when request's Content-Type is anything else", func() { + BeforeEach(func() { + request.Header.Set("Content-Type", "banana;rama") + }) + + It("does not display the body", func() { + Expect(fakeOutput.DisplayJSONBodyCallCount()).To(Equal(1)) // Once for response body only + Expect(fakeOutput.DisplayMessageCallCount()).To(Equal(1)) + Expect(fakeOutput.DisplayMessageArgsForCall(0)).To(Equal("[banana Content Hidden]")) + }) + }) + }) + + Context("when an error occures while trying to log the request", func() { + var expectedErr error + + BeforeEach(func() { + expectedErr = errors.New("this should never block the request") + + calledOnce := false + fakeOutput.StartStub = func() error { + if !calledOnce { + calledOnce = true + return expectedErr + } + return nil + } + }) + + It("should display the error and continue on", func() { + Expect(executeErr).NotTo(HaveOccurred()) + + Expect(fakeOutput.HandleInternalErrorCallCount()).To(Equal(1)) + Expect(fakeOutput.HandleInternalErrorArgsForCall(0)).To(MatchError(expectedErr)) + }) + }) + + Context("when the request is successful", func() { + BeforeEach(func() { + response = &cfnetworking.Response{ + RawResponse: []byte("some-response-body"), + HTTPResponse: &http.Response{ + Proto: "HTTP/1.1", + Status: "200 OK", + Header: http.Header{ + "BBBBB": {"second"}, + "AAAAA": {"first"}, + "CCCCC": {"third"}, + }, + }, + } + }) + + It("outputs the response", func() { + Expect(executeErr).NotTo(HaveOccurred()) + + Expect(fakeOutput.DisplayTypeCallCount()).To(Equal(2)) + name, date := fakeOutput.DisplayTypeArgsForCall(1) + Expect(name).To(Equal("RESPONSE")) + Expect(date).To(BeTemporally("~", time.Now(), time.Second)) + + Expect(fakeOutput.DisplayResponseHeaderCallCount()).To(Equal(1)) + protocol, status := fakeOutput.DisplayResponseHeaderArgsForCall(0) + Expect(protocol).To(Equal("HTTP/1.1")) + Expect(status).To(Equal("200 OK")) + + Expect(fakeOutput.DisplayHeaderCallCount()).To(BeNumerically(">=", 6)) + name, value := fakeOutput.DisplayHeaderArgsForCall(3) + Expect(name).To(Equal("AAAAA")) + Expect(value).To(Equal("first")) + name, value = fakeOutput.DisplayHeaderArgsForCall(4) + Expect(name).To(Equal("BBBBB")) + Expect(value).To(Equal("second")) + name, value = fakeOutput.DisplayHeaderArgsForCall(5) + Expect(name).To(Equal("CCCCC")) + Expect(value).To(Equal("third")) + + Expect(fakeOutput.DisplayJSONBodyCallCount()).To(BeNumerically(">=", 1)) + Expect(fakeOutput.DisplayJSONBodyArgsForCall(0)).To(Equal([]byte("some-response-body"))) + }) + }) + + Context("when the request is unsuccessful", func() { + var expectedErr error + + BeforeEach(func() { + expectedErr = errors.New("banana") + fakeConnection.MakeReturns(expectedErr) + }) + + Context("when the http response is not set", func() { + BeforeEach(func() { + response = &cfnetworking.Response{} + }) + + It("outputs nothing", func() { + Expect(executeErr).To(MatchError(expectedErr)) + Expect(fakeOutput.DisplayResponseHeaderCallCount()).To(Equal(0)) + }) + }) + + Context("when the http response is set", func() { + BeforeEach(func() { + response = &cfnetworking.Response{ + RawResponse: []byte("some-error-body"), + HTTPResponse: &http.Response{ + Proto: "HTTP/1.1", + Status: "200 OK", + Header: http.Header{ + "BBBBB": {"second"}, + "AAAAA": {"first"}, + "CCCCC": {"third"}, + }, + }, + } + }) + + It("outputs the response", func() { + Expect(executeErr).To(MatchError(expectedErr)) + + Expect(fakeOutput.DisplayTypeCallCount()).To(Equal(2)) + name, date := fakeOutput.DisplayTypeArgsForCall(1) + Expect(name).To(Equal("RESPONSE")) + Expect(date).To(BeTemporally("~", time.Now(), time.Second)) + + Expect(fakeOutput.DisplayResponseHeaderCallCount()).To(Equal(1)) + protocol, status := fakeOutput.DisplayResponseHeaderArgsForCall(0) + Expect(protocol).To(Equal("HTTP/1.1")) + Expect(status).To(Equal("200 OK")) + + Expect(fakeOutput.DisplayHeaderCallCount()).To(BeNumerically(">=", 6)) + name, value := fakeOutput.DisplayHeaderArgsForCall(3) + Expect(name).To(Equal("AAAAA")) + Expect(value).To(Equal("first")) + name, value = fakeOutput.DisplayHeaderArgsForCall(4) + Expect(name).To(Equal("BBBBB")) + Expect(value).To(Equal("second")) + name, value = fakeOutput.DisplayHeaderArgsForCall(5) + Expect(name).To(Equal("CCCCC")) + Expect(value).To(Equal("third")) + + Expect(fakeOutput.DisplayJSONBodyCallCount()).To(BeNumerically(">=", 1)) + Expect(fakeOutput.DisplayJSONBodyArgsForCall(0)).To(Equal([]byte("some-error-body"))) + }) + }) + }) + + Context("when an error occures while trying to log the response", func() { + var ( + originalErr error + expectedErr error + ) + + BeforeEach(func() { + originalErr = errors.New("this error should not be overwritten") + fakeConnection.MakeReturns(originalErr) + + expectedErr = errors.New("this should never block the request") + + calledOnce := false + fakeOutput.StartStub = func() error { + if !calledOnce { + calledOnce = true + return nil + } + return expectedErr + } + }) + + It("should display the error and continue on", func() { + Expect(executeErr).To(MatchError(originalErr)) + + Expect(fakeOutput.HandleInternalErrorCallCount()).To(Equal(1)) + Expect(fakeOutput.HandleInternalErrorArgsForCall(0)).To(MatchError(expectedErr)) + }) + }) + + It("starts and stops the output", func() { + Expect(fakeOutput.StartCallCount()).To(Equal(2)) + Expect(fakeOutput.StopCallCount()).To(Equal(2)) + }) + + Context("when displaying the logs have an error", func() { + var expectedErr error + BeforeEach(func() { + expectedErr = errors.New("Display error on request") + fakeOutput.StartReturns(expectedErr) + }) + + It("calls handle internal error", func() { + Expect(executeErr).ToNot(HaveOccurred()) + + Expect(fakeOutput.HandleInternalErrorCallCount()).To(Equal(2)) + Expect(fakeOutput.HandleInternalErrorArgsForCall(0)).To(MatchError(expectedErr)) + Expect(fakeOutput.HandleInternalErrorArgsForCall(1)).To(MatchError(expectedErr)) + }) + }) + }) +}) diff --git a/api/cfnetworking/wrapper/retry_request.go b/api/cfnetworking/wrapper/retry_request.go new file mode 100644 index 00000000000..42981a09b95 --- /dev/null +++ b/api/cfnetworking/wrapper/retry_request.go @@ -0,0 +1,54 @@ +package wrapper + +import ( + "net/http" + + "code.cloudfoundry.org/cli/api/cfnetworking" +) + +// RetryRequest is a wrapper that retries failed requests if they contain a 5XX +// status code. +type RetryRequest struct { + maxRetries int + connection cfnetworking.Connection +} + +// NewRetryRequest returns a pointer to a RetryRequest wrapper. +func NewRetryRequest(maxRetries int) *RetryRequest { + return &RetryRequest{ + maxRetries: maxRetries, + } +} + +// Wrap sets the connection in the RetryRequest and returns itself. +func (retry *RetryRequest) Wrap(innerconnection cfnetworking.Connection) cfnetworking.Connection { + retry.connection = innerconnection + return retry +} + +// Make retries the request if it comes back with certain status codes. +func (retry *RetryRequest) Make(request *cfnetworking.Request, passedResponse *cfnetworking.Response) error { + var err error + + for i := 0; i < retry.maxRetries+1; i += 1 { + err = retry.connection.Make(request, passedResponse) + if err == nil { + return nil + } + + if passedResponse.HTTPResponse != nil && + (passedResponse.HTTPResponse.StatusCode == http.StatusBadGateway || + passedResponse.HTTPResponse.StatusCode == http.StatusServiceUnavailable || + passedResponse.HTTPResponse.StatusCode == http.StatusGatewayTimeout || + (passedResponse.HTTPResponse.StatusCode >= 400 && passedResponse.HTTPResponse.StatusCode < 500)) { + break + } + + // Reset the request body prior to the next retry + resetErr := request.ResetBody() + if resetErr != nil { + return resetErr + } + } + return err +} diff --git a/api/cfnetworking/wrapper/retry_request_test.go b/api/cfnetworking/wrapper/retry_request_test.go new file mode 100644 index 00000000000..24601ecfc65 --- /dev/null +++ b/api/cfnetworking/wrapper/retry_request_test.go @@ -0,0 +1,110 @@ +package wrapper_test + +import ( + "errors" + "io/ioutil" + "net/http" + "strings" + + "code.cloudfoundry.org/cli/api/cfnetworking" + "code.cloudfoundry.org/cli/api/cfnetworking/cfnetworkingfakes" + "code.cloudfoundry.org/cli/api/cfnetworking/networkerror" + . "code.cloudfoundry.org/cli/api/cfnetworking/wrapper" + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" +) + +var _ = Describe("Retry Request", func() { + DescribeTable("number of retries", + func(requestMethod string, responseStatusCode int, expectedNumberOfRetries int) { + rawRequestBody := "banana pants" + body := strings.NewReader(rawRequestBody) + + req, err := http.NewRequest(requestMethod, "https://foo.bar.com/banana", body) + Expect(err).NotTo(HaveOccurred()) + request := cfnetworking.NewRequest(req, body) + + response := &cfnetworking.Response{ + HTTPResponse: &http.Response{ + StatusCode: responseStatusCode, + }, + } + + fakeConnection := new(cfnetworkingfakes.FakeConnection) + expectedErr := networkerror.RawHTTPStatusError{ + StatusCode: responseStatusCode, + } + fakeConnection.MakeStub = func(req *cfnetworking.Request, passedResponse *cfnetworking.Response) error { + defer req.Body.Close() + body, readBodyErr := ioutil.ReadAll(request.Body) + Expect(readBodyErr).ToNot(HaveOccurred()) + Expect(string(body)).To(Equal(rawRequestBody)) + return expectedErr + } + + wrapper := NewRetryRequest(2).Wrap(fakeConnection) + err = wrapper.Make(request, response) + Expect(err).To(MatchError(expectedErr)) + Expect(fakeConnection.MakeCallCount()).To(Equal(expectedNumberOfRetries)) + }, + + Entry("maxRetries for Non-Post (500) Internal Server Error", http.MethodGet, http.StatusInternalServerError, 3), + Entry("1 for Post (502) Bad Gateway", http.MethodGet, http.StatusBadGateway, 1), + Entry("1 for Post (503) Service Unavailable", http.MethodGet, http.StatusServiceUnavailable, 1), + Entry("1 for Post (504) Gateway Timeout", http.MethodGet, http.StatusGatewayTimeout, 1), + + Entry("1 for 4XX Errors", http.MethodGet, http.StatusNotFound, 1), + ) + + It("does not retry on success", func() { + req, err := http.NewRequest(http.MethodGet, "https://foo.bar.com/banana", nil) + Expect(err).NotTo(HaveOccurred()) + request := cfnetworking.NewRequest(req, nil) + response := &cfnetworking.Response{ + HTTPResponse: &http.Response{ + StatusCode: http.StatusOK, + }, + } + + fakeConnection := new(cfnetworkingfakes.FakeConnection) + wrapper := NewRetryRequest(2).Wrap(fakeConnection) + + err = wrapper.Make(request, response) + Expect(err).ToNot(HaveOccurred()) + Expect(fakeConnection.MakeCallCount()).To(Equal(1)) + }) + + Context("when seeking errors", func() { + var ( + request *cfnetworking.Request + response *cfnetworking.Response + + fakeConnection *cfnetworkingfakes.FakeConnection + wrapper cfnetworking.Connection + ) + + BeforeEach(func() { + fakeReadSeeker := new(cfnetworkingfakes.FakeReadSeeker) + fakeReadSeeker.SeekReturns(0, errors.New("oh noes")) + + req, err := http.NewRequest(http.MethodGet, "https://foo.bar.com/banana", fakeReadSeeker) + Expect(err).NotTo(HaveOccurred()) + request = cfnetworking.NewRequest(req, fakeReadSeeker) + + response = &cfnetworking.Response{ + HTTPResponse: &http.Response{ + StatusCode: http.StatusInternalServerError, + }, + } + fakeConnection = new(cfnetworkingfakes.FakeConnection) + fakeConnection.MakeReturns(errors.New("some error")) + wrapper = NewRetryRequest(3).Wrap(fakeConnection) + }) + + It("sets the err on SeekError", func() { + err := wrapper.Make(request, response) + Expect(err).To(MatchError("oh noes")) + Expect(fakeConnection.MakeCallCount()).To(Equal(1)) + }) + }) +}) diff --git a/api/cfnetworking/wrapper/uaa_authentication.go b/api/cfnetworking/wrapper/uaa_authentication.go new file mode 100644 index 00000000000..876994bb7db --- /dev/null +++ b/api/cfnetworking/wrapper/uaa_authentication.go @@ -0,0 +1,81 @@ +package wrapper + +import ( + "code.cloudfoundry.org/cli/api/cfnetworking" + "code.cloudfoundry.org/cli/api/cfnetworking/networkerror" + "code.cloudfoundry.org/cli/api/uaa" +) + +//go:generate counterfeiter . UAAClient + +// UAAClient is the interface for getting a valid access token +type UAAClient interface { + RefreshAccessToken(refreshToken string) (uaa.RefreshedTokens, error) +} + +//go:generate counterfeiter . TokenCache + +// TokenCache is where the UAA token information is stored. +type TokenCache interface { + AccessToken() string + RefreshToken() string + SetAccessToken(token string) + SetRefreshToken(token string) +} + +// UAAAuthentication wraps connections and adds authentication headers to all +// requests +type UAAAuthentication struct { + connection cfnetworking.Connection + client UAAClient + cache TokenCache +} + +// NewUAAAuthentication returns a pointer to a UAAAuthentication wrapper with +// the client and a token cache. +func NewUAAAuthentication(client UAAClient, cache TokenCache) *UAAAuthentication { + return &UAAAuthentication{ + client: client, + cache: cache, + } +} + +// Wrap sets the connection on the UAAAuthentication and returns itself +func (t *UAAAuthentication) Wrap(innerconnection cfnetworking.Connection) cfnetworking.Connection { + t.connection = innerconnection + return t +} + +// SetClient sets the UAA client that the wrapper will use. +func (t *UAAAuthentication) SetClient(client UAAClient) { + t.client = client +} + +// Make adds authentication headers to the passed in request and then calls the +// wrapped connection's Make. If the client is not set on the wrapper, it will +// not add any header or handle any authentication errors. +func (t *UAAAuthentication) Make(request *cfnetworking.Request, passedResponse *cfnetworking.Response) error { + request.Header.Set("Authorization", t.cache.AccessToken()) + + requestErr := t.connection.Make(request, passedResponse) + if _, ok := requestErr.(networkerror.InvalidAuthTokenError); ok { + tokens, err := t.client.RefreshAccessToken(t.cache.RefreshToken()) + if err != nil { + return err + } + + t.cache.SetAccessToken(tokens.AuthorizationToken()) + t.cache.SetRefreshToken(tokens.RefreshToken) + + if request.Body != nil { + err = request.ResetBody() + if err != nil { + return err + } + } + request.Header.Set("Authorization", t.cache.AccessToken()) + requestErr = t.connection.Make(request, passedResponse) + } + + return requestErr +} diff --git a/api/cfnetworking/wrapper/uaa_authentication_test.go b/api/cfnetworking/wrapper/uaa_authentication_test.go new file mode 100644 index 00000000000..997dbfa3798 --- /dev/null +++ b/api/cfnetworking/wrapper/uaa_authentication_test.go @@ -0,0 +1,174 @@ +package wrapper_test + +import ( + "errors" + "io/ioutil" + "net/http" + "strings" + + "code.cloudfoundry.org/cli/api/cfnetworking" + "code.cloudfoundry.org/cli/api/cfnetworking/cfnetworkingfakes" + . "code.cloudfoundry.org/cli/api/cfnetworking/wrapper" + "code.cloudfoundry.org/cli/api/cfnetworking/wrapper/util" + "code.cloudfoundry.org/cli/api/cfnetworking/wrapper/wrapperfakes" + "code.cloudfoundry.org/cli/api/uaa" + + "code.cloudfoundry.org/cli/api/cfnetworking/networkerror" + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" +) + +var _ = Describe("UAA Authentication", func() { + var ( + fakeConnection *cfnetworkingfakes.FakeConnection + fakeClient *wrapperfakes.FakeUAAClient + inMemoryCache *util.InMemoryCache + + wrapper cfnetworking.Connection + request *cfnetworking.Request + inner *UAAAuthentication + ) + + BeforeEach(func() { + fakeConnection = new(cfnetworkingfakes.FakeConnection) + fakeClient = new(wrapperfakes.FakeUAAClient) + inMemoryCache = util.NewInMemoryTokenCache() + inMemoryCache.SetAccessToken("a-ok") + + inner = NewUAAAuthentication(fakeClient, inMemoryCache) + wrapper = inner.Wrap(fakeConnection) + + request = &cfnetworking.Request{ + Request: &http.Request{ + Header: http.Header{}, + }, + } + }) + + Describe("Make", func() { + It("adds authentication headers", func() { + err := wrapper.Make(request, nil) + Expect(err).ToNot(HaveOccurred()) + + Expect(fakeConnection.MakeCallCount()).To(Equal(1)) + authenticatedRequest, _ := fakeConnection.MakeArgsForCall(0) + headers := authenticatedRequest.Header + Expect(headers["Authorization"]).To(ConsistOf([]string{"a-ok"})) + }) + + Context("when the token is valid", func() { + Context("when the request already has headers", func() { + It("preserves existing headers", func() { + request.Header.Add("Existing", "header") + err := wrapper.Make(request, nil) + Expect(err).ToNot(HaveOccurred()) + + Expect(fakeConnection.MakeCallCount()).To(Equal(1)) + authenticatedRequest, _ := fakeConnection.MakeArgsForCall(0) + headers := authenticatedRequest.Header + Expect(headers["Existing"]).To(ConsistOf([]string{"header"})) + }) + }) + + Context("when the wrapped connection returns nil", func() { + It("returns nil", func() { + fakeConnection.MakeReturns(nil) + + err := wrapper.Make(request, nil) + Expect(err).ToNot(HaveOccurred()) + }) + }) + + Context("when the wrapped connection returns an error", func() { + It("returns the error", func() { + innerError := errors.New("inner error") + fakeConnection.MakeReturns(innerError) + + err := wrapper.Make(request, nil) + Expect(err).To(Equal(innerError)) + }) + }) + }) + + Context("when the token is invalid", func() { + var ( + expectedBody string + request *cfnetworking.Request + executeErr error + ) + + BeforeEach(func() { + expectedBody = "this body content should be preserved" + body := strings.NewReader(expectedBody) + request = cfnetworking.NewRequest(&http.Request{ + Header: http.Header{}, + Body: ioutil.NopCloser(body), + }, body) + + makeCount := 0 + fakeConnection.MakeStub = func(request *cfnetworking.Request, response *cfnetworking.Response) error { + body, err := ioutil.ReadAll(request.Body) + Expect(err).NotTo(HaveOccurred()) + Expect(string(body)).To(Equal(expectedBody)) + + if makeCount == 0 { + makeCount += 1 + return networkerror.InvalidAuthTokenError{} + } else { + return nil + } + } + + inMemoryCache.SetAccessToken("what") + + fakeClient.RefreshAccessTokenReturns( + uaa.RefreshedTokens{ + AccessToken: "foobar-2", + RefreshToken: "bananananananana", + Type: "bearer", + }, + nil, + ) + }) + + JustBeforeEach(func() { + executeErr = wrapper.Make(request, nil) + }) + + It("should refresh the token", func() { + Expect(executeErr).ToNot(HaveOccurred()) + Expect(fakeClient.RefreshAccessTokenCallCount()).To(Equal(1)) + }) + + It("should resend the request", func() { + Expect(executeErr).ToNot(HaveOccurred()) + Expect(fakeConnection.MakeCallCount()).To(Equal(2)) + + requestArg, _ := fakeConnection.MakeArgsForCall(1) + Expect(requestArg.Header.Get("Authorization")).To(Equal("bearer foobar-2")) + }) + + It("should save the refresh token", func() { + Expect(executeErr).ToNot(HaveOccurred()) + Expect(inMemoryCache.RefreshToken()).To(Equal("bananananananana")) + }) + + Context("when the reseting the request body fails", func() { + BeforeEach(func() { + fakeConnection.MakeReturnsOnCall(0, networkerror.InvalidAuthTokenError{}) + + fakeReadSeeker := new(cfnetworkingfakes.FakeReadSeeker) + fakeReadSeeker.SeekReturns(0, errors.New("oh noes")) + + req, err := http.NewRequest(http.MethodGet, "https://foo.bar.com/banana", fakeReadSeeker) + Expect(err).NotTo(HaveOccurred()) + request = cfnetworking.NewRequest(req, fakeReadSeeker) + }) + + It("returns error on seek", func() { + Expect(executeErr).To(MatchError("oh noes")) + }) + }) + }) + }) +}) diff --git a/api/cfnetworking/wrapper/util/in_memory_cache.go b/api/cfnetworking/wrapper/util/in_memory_cache.go new file mode 100644 index 00000000000..91ef7af265a --- /dev/null +++ b/api/cfnetworking/wrapper/util/in_memory_cache.go @@ -0,0 +1,26 @@ +package util + +type InMemoryCache struct { + accessToken string + refreshToken string +} + +func (c InMemoryCache) AccessToken() string { + return c.accessToken +} + +func (c InMemoryCache) RefreshToken() string { + return c.refreshToken +} + +func (c *InMemoryCache) SetAccessToken(token string) { + c.accessToken = token +} + +func (c *InMemoryCache) SetRefreshToken(token string) { + c.refreshToken = token +} + +func NewInMemoryTokenCache() *InMemoryCache { + return new(InMemoryCache) +} diff --git a/api/cfnetworking/wrapper/wrapper_suite_test.go b/api/cfnetworking/wrapper/wrapper_suite_test.go new file mode 100644 index 00000000000..2dd0a88f68f --- /dev/null +++ b/api/cfnetworking/wrapper/wrapper_suite_test.go @@ -0,0 +1,36 @@ +package wrapper_test + +import ( + "bytes" + "log" + + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + . "github.com/onsi/gomega/ghttp" + + "testing" +) + +func TestWrapper(t *testing.T) { + RegisterFailHandler(Fail) + RunSpecs(t, "Wrapper Suite") +} + +var server *Server + +var _ = SynchronizedBeforeSuite(func() []byte { + return []byte{} +}, func(data []byte) { + server = NewTLSServer() + + // Suppresses ginkgo server logs + server.HTTPTestServer.Config.ErrorLog = log.New(&bytes.Buffer{}, "", 0) +}) + +var _ = SynchronizedAfterSuite(func() { + server.Close() +}, func() {}) + +var _ = BeforeEach(func() { + server.Reset() +}) diff --git a/api/cfnetworking/wrapper/wrapperfakes/fake_request_logger_output.go b/api/cfnetworking/wrapper/wrapperfakes/fake_request_logger_output.go new file mode 100644 index 00000000000..6d59ca2daf1 --- /dev/null +++ b/api/cfnetworking/wrapper/wrapperfakes/fake_request_logger_output.go @@ -0,0 +1,613 @@ +// Code generated by counterfeiter. DO NOT EDIT. +package wrapperfakes + +import ( + "sync" + "time" + + "code.cloudfoundry.org/cli/api/cfnetworking/wrapper" +) + +type FakeRequestLoggerOutput struct { + DisplayHeaderStub func(name string, value string) error + displayHeaderMutex sync.RWMutex + displayHeaderArgsForCall []struct { + name string + value string + } + displayHeaderReturns struct { + result1 error + } + displayHeaderReturnsOnCall map[int]struct { + result1 error + } + DisplayHostStub func(name string) error + displayHostMutex sync.RWMutex + displayHostArgsForCall []struct { + name string + } + displayHostReturns struct { + result1 error + } + displayHostReturnsOnCall map[int]struct { + result1 error + } + DisplayJSONBodyStub func(body []byte) error + displayJSONBodyMutex sync.RWMutex + displayJSONBodyArgsForCall []struct { + body []byte + } + displayJSONBodyReturns struct { + result1 error + } + displayJSONBodyReturnsOnCall map[int]struct { + result1 error + } + DisplayMessageStub func(msg string) error + displayMessageMutex sync.RWMutex + displayMessageArgsForCall []struct { + msg string + } + displayMessageReturns struct { + result1 error + } + displayMessageReturnsOnCall map[int]struct { + result1 error + } + DisplayRequestHeaderStub func(method string, uri string, httpProtocol string) error + displayRequestHeaderMutex sync.RWMutex + displayRequestHeaderArgsForCall []struct { + method string + uri string + httpProtocol string + } + displayRequestHeaderReturns struct { + result1 error + } + displayRequestHeaderReturnsOnCall map[int]struct { + result1 error + } + DisplayResponseHeaderStub func(httpProtocol string, status string) error + displayResponseHeaderMutex sync.RWMutex + displayResponseHeaderArgsForCall []struct { + httpProtocol string + status string + } + displayResponseHeaderReturns struct { + result1 error + } + displayResponseHeaderReturnsOnCall map[int]struct { + result1 error + } + DisplayTypeStub func(name string, requestDate time.Time) error + displayTypeMutex sync.RWMutex + displayTypeArgsForCall []struct { + name string + requestDate time.Time + } + displayTypeReturns struct { + result1 error + } + displayTypeReturnsOnCall map[int]struct { + result1 error + } + HandleInternalErrorStub func(err error) + handleInternalErrorMutex sync.RWMutex + handleInternalErrorArgsForCall []struct { + err error + } + StartStub func() error + startMutex sync.RWMutex + startArgsForCall []struct{} + startReturns struct { + result1 error + } + startReturnsOnCall map[int]struct { + result1 error + } + StopStub func() error + stopMutex sync.RWMutex + stopArgsForCall []struct{} + stopReturns struct { + result1 error + } + stopReturnsOnCall map[int]struct { + result1 error + } + invocations map[string][][]interface{} + invocationsMutex sync.RWMutex +} + +func (fake *FakeRequestLoggerOutput) DisplayHeader(name string, value string) error { + fake.displayHeaderMutex.Lock() + ret, specificReturn := fake.displayHeaderReturnsOnCall[len(fake.displayHeaderArgsForCall)] + fake.displayHeaderArgsForCall = append(fake.displayHeaderArgsForCall, struct { + name string + value string + }{name, value}) + fake.recordInvocation("DisplayHeader", []interface{}{name, value}) + fake.displayHeaderMutex.Unlock() + if fake.DisplayHeaderStub != nil { + return fake.DisplayHeaderStub(name, value) + } + if specificReturn { + return ret.result1 + } + return fake.displayHeaderReturns.result1 +} + +func (fake *FakeRequestLoggerOutput) DisplayHeaderCallCount() int { + fake.displayHeaderMutex.RLock() + defer fake.displayHeaderMutex.RUnlock() + return len(fake.displayHeaderArgsForCall) +} + +func (fake *FakeRequestLoggerOutput) DisplayHeaderArgsForCall(i int) (string, string) { + fake.displayHeaderMutex.RLock() + defer fake.displayHeaderMutex.RUnlock() + return fake.displayHeaderArgsForCall[i].name, fake.displayHeaderArgsForCall[i].value +} + +func (fake *FakeRequestLoggerOutput) DisplayHeaderReturns(result1 error) { + fake.DisplayHeaderStub = nil + fake.displayHeaderReturns = struct { + result1 error + }{result1} +} + +func (fake *FakeRequestLoggerOutput) DisplayHeaderReturnsOnCall(i int, result1 error) { + fake.DisplayHeaderStub = nil + if fake.displayHeaderReturnsOnCall == nil { + fake.displayHeaderReturnsOnCall = make(map[int]struct { + result1 error + }) + } + fake.displayHeaderReturnsOnCall[i] = struct { + result1 error + }{result1} +} + +func (fake *FakeRequestLoggerOutput) DisplayHost(name string) error { + fake.displayHostMutex.Lock() + ret, specificReturn := fake.displayHostReturnsOnCall[len(fake.displayHostArgsForCall)] + fake.displayHostArgsForCall = append(fake.displayHostArgsForCall, struct { + name string + }{name}) + fake.recordInvocation("DisplayHost", []interface{}{name}) + fake.displayHostMutex.Unlock() + if fake.DisplayHostStub != nil { + return fake.DisplayHostStub(name) + } + if specificReturn { + return ret.result1 + } + return fake.displayHostReturns.result1 +} + +func (fake *FakeRequestLoggerOutput) DisplayHostCallCount() int { + fake.displayHostMutex.RLock() + defer fake.displayHostMutex.RUnlock() + return len(fake.displayHostArgsForCall) +} + +func (fake *FakeRequestLoggerOutput) DisplayHostArgsForCall(i int) string { + fake.displayHostMutex.RLock() + defer fake.displayHostMutex.RUnlock() + return fake.displayHostArgsForCall[i].name +} + +func (fake *FakeRequestLoggerOutput) DisplayHostReturns(result1 error) { + fake.DisplayHostStub = nil + fake.displayHostReturns = struct { + result1 error + }{result1} +} + +func (fake *FakeRequestLoggerOutput) DisplayHostReturnsOnCall(i int, result1 error) { + fake.DisplayHostStub = nil + if fake.displayHostReturnsOnCall == nil { + fake.displayHostReturnsOnCall = make(map[int]struct { + result1 error + }) + } + fake.displayHostReturnsOnCall[i] = struct { + result1 error + }{result1} +} + +func (fake *FakeRequestLoggerOutput) DisplayJSONBody(body []byte) error { + var bodyCopy []byte + if body != nil { + bodyCopy = make([]byte, len(body)) + copy(bodyCopy, body) + } + fake.displayJSONBodyMutex.Lock() + ret, specificReturn := fake.displayJSONBodyReturnsOnCall[len(fake.displayJSONBodyArgsForCall)] + fake.displayJSONBodyArgsForCall = append(fake.displayJSONBodyArgsForCall, struct { + body []byte + }{bodyCopy}) + fake.recordInvocation("DisplayJSONBody", []interface{}{bodyCopy}) + fake.displayJSONBodyMutex.Unlock() + if fake.DisplayJSONBodyStub != nil { + return fake.DisplayJSONBodyStub(body) + } + if specificReturn { + return ret.result1 + } + return fake.displayJSONBodyReturns.result1 +} + +func (fake *FakeRequestLoggerOutput) DisplayJSONBodyCallCount() int { + fake.displayJSONBodyMutex.RLock() + defer fake.displayJSONBodyMutex.RUnlock() + return len(fake.displayJSONBodyArgsForCall) +} + +func (fake *FakeRequestLoggerOutput) DisplayJSONBodyArgsForCall(i int) []byte { + fake.displayJSONBodyMutex.RLock() + defer fake.displayJSONBodyMutex.RUnlock() + return fake.displayJSONBodyArgsForCall[i].body +} + +func (fake *FakeRequestLoggerOutput) DisplayJSONBodyReturns(result1 error) { + fake.DisplayJSONBodyStub = nil + fake.displayJSONBodyReturns = struct { + result1 error + }{result1} +} + +func (fake *FakeRequestLoggerOutput) DisplayJSONBodyReturnsOnCall(i int, result1 error) { + fake.DisplayJSONBodyStub = nil + if fake.displayJSONBodyReturnsOnCall == nil { + fake.displayJSONBodyReturnsOnCall = make(map[int]struct { + result1 error + }) + } + fake.displayJSONBodyReturnsOnCall[i] = struct { + result1 error + }{result1} +} + +func (fake *FakeRequestLoggerOutput) DisplayMessage(msg string) error { + fake.displayMessageMutex.Lock() + ret, specificReturn := fake.displayMessageReturnsOnCall[len(fake.displayMessageArgsForCall)] + fake.displayMessageArgsForCall = append(fake.displayMessageArgsForCall, struct { + msg string + }{msg}) + fake.recordInvocation("DisplayMessage", []interface{}{msg}) + fake.displayMessageMutex.Unlock() + if fake.DisplayMessageStub != nil { + return fake.DisplayMessageStub(msg) + } + if specificReturn { + return ret.result1 + } + return fake.displayMessageReturns.result1 +} + +func (fake *FakeRequestLoggerOutput) DisplayMessageCallCount() int { + fake.displayMessageMutex.RLock() + defer fake.displayMessageMutex.RUnlock() + return len(fake.displayMessageArgsForCall) +} + +func (fake *FakeRequestLoggerOutput) DisplayMessageArgsForCall(i int) string { + fake.displayMessageMutex.RLock() + defer fake.displayMessageMutex.RUnlock() + return fake.displayMessageArgsForCall[i].msg +} + +func (fake *FakeRequestLoggerOutput) DisplayMessageReturns(result1 error) { + fake.DisplayMessageStub = nil + fake.displayMessageReturns = struct { + result1 error + }{result1} +} + +func (fake *FakeRequestLoggerOutput) DisplayMessageReturnsOnCall(i int, result1 error) { + fake.DisplayMessageStub = nil + if fake.displayMessageReturnsOnCall == nil { + fake.displayMessageReturnsOnCall = make(map[int]struct { + result1 error + }) + } + fake.displayMessageReturnsOnCall[i] = struct { + result1 error + }{result1} +} + +func (fake *FakeRequestLoggerOutput) DisplayRequestHeader(method string, uri string, httpProtocol string) error { + fake.displayRequestHeaderMutex.Lock() + ret, specificReturn := fake.displayRequestHeaderReturnsOnCall[len(fake.displayRequestHeaderArgsForCall)] + fake.displayRequestHeaderArgsForCall = append(fake.displayRequestHeaderArgsForCall, struct { + method string + uri string + httpProtocol string + }{method, uri, httpProtocol}) + fake.recordInvocation("DisplayRequestHeader", []interface{}{method, uri, httpProtocol}) + fake.displayRequestHeaderMutex.Unlock() + if fake.DisplayRequestHeaderStub != nil { + return fake.DisplayRequestHeaderStub(method, uri, httpProtocol) + } + if specificReturn { + return ret.result1 + } + return fake.displayRequestHeaderReturns.result1 +} + +func (fake *FakeRequestLoggerOutput) DisplayRequestHeaderCallCount() int { + fake.displayRequestHeaderMutex.RLock() + defer fake.displayRequestHeaderMutex.RUnlock() + return len(fake.displayRequestHeaderArgsForCall) +} + +func (fake *FakeRequestLoggerOutput) DisplayRequestHeaderArgsForCall(i int) (string, string, string) { + fake.displayRequestHeaderMutex.RLock() + defer fake.displayRequestHeaderMutex.RUnlock() + return fake.displayRequestHeaderArgsForCall[i].method, fake.displayRequestHeaderArgsForCall[i].uri, fake.displayRequestHeaderArgsForCall[i].httpProtocol +} + +func (fake *FakeRequestLoggerOutput) DisplayRequestHeaderReturns(result1 error) { + fake.DisplayRequestHeaderStub = nil + fake.displayRequestHeaderReturns = struct { + result1 error + }{result1} +} + +func (fake *FakeRequestLoggerOutput) DisplayRequestHeaderReturnsOnCall(i int, result1 error) { + fake.DisplayRequestHeaderStub = nil + if fake.displayRequestHeaderReturnsOnCall == nil { + fake.displayRequestHeaderReturnsOnCall = make(map[int]struct { + result1 error + }) + } + fake.displayRequestHeaderReturnsOnCall[i] = struct { + result1 error + }{result1} +} + +func (fake *FakeRequestLoggerOutput) DisplayResponseHeader(httpProtocol string, status string) error { + fake.displayResponseHeaderMutex.Lock() + ret, specificReturn := fake.displayResponseHeaderReturnsOnCall[len(fake.displayResponseHeaderArgsForCall)] + fake.displayResponseHeaderArgsForCall = append(fake.displayResponseHeaderArgsForCall, struct { + httpProtocol string + status string + }{httpProtocol, status}) + fake.recordInvocation("DisplayResponseHeader", []interface{}{httpProtocol, status}) + fake.displayResponseHeaderMutex.Unlock() + if fake.DisplayResponseHeaderStub != nil { + return fake.DisplayResponseHeaderStub(httpProtocol, status) + } + if specificReturn { + return ret.result1 + } + return fake.displayResponseHeaderReturns.result1 +} + +func (fake *FakeRequestLoggerOutput) DisplayResponseHeaderCallCount() int { + fake.displayResponseHeaderMutex.RLock() + defer fake.displayResponseHeaderMutex.RUnlock() + return len(fake.displayResponseHeaderArgsForCall) +} + +func (fake *FakeRequestLoggerOutput) DisplayResponseHeaderArgsForCall(i int) (string, string) { + fake.displayResponseHeaderMutex.RLock() + defer fake.displayResponseHeaderMutex.RUnlock() + return fake.displayResponseHeaderArgsForCall[i].httpProtocol, fake.displayResponseHeaderArgsForCall[i].status +} + +func (fake *FakeRequestLoggerOutput) DisplayResponseHeaderReturns(result1 error) { + fake.DisplayResponseHeaderStub = nil + fake.displayResponseHeaderReturns = struct { + result1 error + }{result1} +} + +func (fake *FakeRequestLoggerOutput) DisplayResponseHeaderReturnsOnCall(i int, result1 error) { + fake.DisplayResponseHeaderStub = nil + if fake.displayResponseHeaderReturnsOnCall == nil { + fake.displayResponseHeaderReturnsOnCall = make(map[int]struct { + result1 error + }) + } + fake.displayResponseHeaderReturnsOnCall[i] = struct { + result1 error + }{result1} +} + +func (fake *FakeRequestLoggerOutput) DisplayType(name string, requestDate time.Time) error { + fake.displayTypeMutex.Lock() + ret, specificReturn := fake.displayTypeReturnsOnCall[len(fake.displayTypeArgsForCall)] + fake.displayTypeArgsForCall = append(fake.displayTypeArgsForCall, struct { + name string + requestDate time.Time + }{name, requestDate}) + fake.recordInvocation("DisplayType", []interface{}{name, requestDate}) + fake.displayTypeMutex.Unlock() + if fake.DisplayTypeStub != nil { + return fake.DisplayTypeStub(name, requestDate) + } + if specificReturn { + return ret.result1 + } + return fake.displayTypeReturns.result1 +} + +func (fake *FakeRequestLoggerOutput) DisplayTypeCallCount() int { + fake.displayTypeMutex.RLock() + defer fake.displayTypeMutex.RUnlock() + return len(fake.displayTypeArgsForCall) +} + +func (fake *FakeRequestLoggerOutput) DisplayTypeArgsForCall(i int) (string, time.Time) { + fake.displayTypeMutex.RLock() + defer fake.displayTypeMutex.RUnlock() + return fake.displayTypeArgsForCall[i].name, fake.displayTypeArgsForCall[i].requestDate +} + +func (fake *FakeRequestLoggerOutput) DisplayTypeReturns(result1 error) { + fake.DisplayTypeStub = nil + fake.displayTypeReturns = struct { + result1 error + }{result1} +} + +func (fake *FakeRequestLoggerOutput) DisplayTypeReturnsOnCall(i int, result1 error) { + fake.DisplayTypeStub = nil + if fake.displayTypeReturnsOnCall == nil { + fake.displayTypeReturnsOnCall = make(map[int]struct { + result1 error + }) + } + fake.displayTypeReturnsOnCall[i] = struct { + result1 error + }{result1} +} + +func (fake *FakeRequestLoggerOutput) HandleInternalError(err error) { + fake.handleInternalErrorMutex.Lock() + fake.handleInternalErrorArgsForCall = append(fake.handleInternalErrorArgsForCall, struct { + err error + }{err}) + fake.recordInvocation("HandleInternalError", []interface{}{err}) + fake.handleInternalErrorMutex.Unlock() + if fake.HandleInternalErrorStub != nil { + fake.HandleInternalErrorStub(err) + } +} + +func (fake *FakeRequestLoggerOutput) HandleInternalErrorCallCount() int { + fake.handleInternalErrorMutex.RLock() + defer fake.handleInternalErrorMutex.RUnlock() + return len(fake.handleInternalErrorArgsForCall) +} + +func (fake *FakeRequestLoggerOutput) HandleInternalErrorArgsForCall(i int) error { + fake.handleInternalErrorMutex.RLock() + defer fake.handleInternalErrorMutex.RUnlock() + return fake.handleInternalErrorArgsForCall[i].err +} + +func (fake *FakeRequestLoggerOutput) Start() error { + fake.startMutex.Lock() + ret, specificReturn := fake.startReturnsOnCall[len(fake.startArgsForCall)] + fake.startArgsForCall = append(fake.startArgsForCall, struct{}{}) + fake.recordInvocation("Start", []interface{}{}) + fake.startMutex.Unlock() + if fake.StartStub != nil { + return fake.StartStub() + } + if specificReturn { + return ret.result1 + } + return fake.startReturns.result1 +} + +func (fake *FakeRequestLoggerOutput) StartCallCount() int { + fake.startMutex.RLock() + defer fake.startMutex.RUnlock() + return len(fake.startArgsForCall) +} + +func (fake *FakeRequestLoggerOutput) StartReturns(result1 error) { + fake.StartStub = nil + fake.startReturns = struct { + result1 error + }{result1} +} + +func (fake *FakeRequestLoggerOutput) StartReturnsOnCall(i int, result1 error) { + fake.StartStub = nil + if fake.startReturnsOnCall == nil { + fake.startReturnsOnCall = make(map[int]struct { + result1 error + }) + } + fake.startReturnsOnCall[i] = struct { + result1 error + }{result1} +} + +func (fake *FakeRequestLoggerOutput) Stop() error { + fake.stopMutex.Lock() + ret, specificReturn := fake.stopReturnsOnCall[len(fake.stopArgsForCall)] + fake.stopArgsForCall = append(fake.stopArgsForCall, struct{}{}) + fake.recordInvocation("Stop", []interface{}{}) + fake.stopMutex.Unlock() + if fake.StopStub != nil { + return fake.StopStub() + } + if specificReturn { + return ret.result1 + } + return fake.stopReturns.result1 +} + +func (fake *FakeRequestLoggerOutput) StopCallCount() int { + fake.stopMutex.RLock() + defer fake.stopMutex.RUnlock() + return len(fake.stopArgsForCall) +} + +func (fake *FakeRequestLoggerOutput) StopReturns(result1 error) { + fake.StopStub = nil + fake.stopReturns = struct { + result1 error + }{result1} +} + +func (fake *FakeRequestLoggerOutput) StopReturnsOnCall(i int, result1 error) { + fake.StopStub = nil + if fake.stopReturnsOnCall == nil { + fake.stopReturnsOnCall = make(map[int]struct { + result1 error + }) + } + fake.stopReturnsOnCall[i] = struct { + result1 error + }{result1} +} + +func (fake *FakeRequestLoggerOutput) Invocations() map[string][][]interface{} { + fake.invocationsMutex.RLock() + defer fake.invocationsMutex.RUnlock() + fake.displayHeaderMutex.RLock() + defer fake.displayHeaderMutex.RUnlock() + fake.displayHostMutex.RLock() + defer fake.displayHostMutex.RUnlock() + fake.displayJSONBodyMutex.RLock() + defer fake.displayJSONBodyMutex.RUnlock() + fake.displayMessageMutex.RLock() + defer fake.displayMessageMutex.RUnlock() + fake.displayRequestHeaderMutex.RLock() + defer fake.displayRequestHeaderMutex.RUnlock() + fake.displayResponseHeaderMutex.RLock() + defer fake.displayResponseHeaderMutex.RUnlock() + fake.displayTypeMutex.RLock() + defer fake.displayTypeMutex.RUnlock() + fake.handleInternalErrorMutex.RLock() + defer fake.handleInternalErrorMutex.RUnlock() + fake.startMutex.RLock() + defer fake.startMutex.RUnlock() + fake.stopMutex.RLock() + defer fake.stopMutex.RUnlock() + copiedInvocations := map[string][][]interface{}{} + for key, value := range fake.invocations { + copiedInvocations[key] = value + } + return copiedInvocations +} + +func (fake *FakeRequestLoggerOutput) recordInvocation(key string, args []interface{}) { + fake.invocationsMutex.Lock() + defer fake.invocationsMutex.Unlock() + if fake.invocations == nil { + fake.invocations = map[string][][]interface{}{} + } + if fake.invocations[key] == nil { + fake.invocations[key] = [][]interface{}{} + } + fake.invocations[key] = append(fake.invocations[key], args) +} + +var _ wrapper.RequestLoggerOutput = new(FakeRequestLoggerOutput) diff --git a/api/cfnetworking/wrapper/wrapperfakes/fake_token_cache.go b/api/cfnetworking/wrapper/wrapperfakes/fake_token_cache.go new file mode 100644 index 00000000000..7777a3e6a1a --- /dev/null +++ b/api/cfnetworking/wrapper/wrapperfakes/fake_token_cache.go @@ -0,0 +1,201 @@ +// Code generated by counterfeiter. DO NOT EDIT. +package wrapperfakes + +import ( + "sync" + + "code.cloudfoundry.org/cli/api/cfnetworking/wrapper" +) + +type FakeTokenCache struct { + AccessTokenStub func() string + accessTokenMutex sync.RWMutex + accessTokenArgsForCall []struct{} + accessTokenReturns struct { + result1 string + } + accessTokenReturnsOnCall map[int]struct { + result1 string + } + RefreshTokenStub func() string + refreshTokenMutex sync.RWMutex + refreshTokenArgsForCall []struct{} + refreshTokenReturns struct { + result1 string + } + refreshTokenReturnsOnCall map[int]struct { + result1 string + } + SetAccessTokenStub func(token string) + setAccessTokenMutex sync.RWMutex + setAccessTokenArgsForCall []struct { + token string + } + SetRefreshTokenStub func(token string) + setRefreshTokenMutex sync.RWMutex + setRefreshTokenArgsForCall []struct { + token string + } + invocations map[string][][]interface{} + invocationsMutex sync.RWMutex +} + +func (fake *FakeTokenCache) AccessToken() string { + fake.accessTokenMutex.Lock() + ret, specificReturn := fake.accessTokenReturnsOnCall[len(fake.accessTokenArgsForCall)] + fake.accessTokenArgsForCall = append(fake.accessTokenArgsForCall, struct{}{}) + fake.recordInvocation("AccessToken", []interface{}{}) + fake.accessTokenMutex.Unlock() + if fake.AccessTokenStub != nil { + return fake.AccessTokenStub() + } + if specificReturn { + return ret.result1 + } + return fake.accessTokenReturns.result1 +} + +func (fake *FakeTokenCache) AccessTokenCallCount() int { + fake.accessTokenMutex.RLock() + defer fake.accessTokenMutex.RUnlock() + return len(fake.accessTokenArgsForCall) +} + +func (fake *FakeTokenCache) AccessTokenReturns(result1 string) { + fake.AccessTokenStub = nil + fake.accessTokenReturns = struct { + result1 string + }{result1} +} + +func (fake *FakeTokenCache) AccessTokenReturnsOnCall(i int, result1 string) { + fake.AccessTokenStub = nil + if fake.accessTokenReturnsOnCall == nil { + fake.accessTokenReturnsOnCall = make(map[int]struct { + result1 string + }) + } + fake.accessTokenReturnsOnCall[i] = struct { + result1 string + }{result1} +} + +func (fake *FakeTokenCache) RefreshToken() string { + fake.refreshTokenMutex.Lock() + ret, specificReturn := fake.refreshTokenReturnsOnCall[len(fake.refreshTokenArgsForCall)] + fake.refreshTokenArgsForCall = append(fake.refreshTokenArgsForCall, struct{}{}) + fake.recordInvocation("RefreshToken", []interface{}{}) + fake.refreshTokenMutex.Unlock() + if fake.RefreshTokenStub != nil { + return fake.RefreshTokenStub() + } + if specificReturn { + return ret.result1 + } + return fake.refreshTokenReturns.result1 +} + +func (fake *FakeTokenCache) RefreshTokenCallCount() int { + fake.refreshTokenMutex.RLock() + defer fake.refreshTokenMutex.RUnlock() + return len(fake.refreshTokenArgsForCall) +} + +func (fake *FakeTokenCache) RefreshTokenReturns(result1 string) { + fake.RefreshTokenStub = nil + fake.refreshTokenReturns = struct { + result1 string + }{result1} +} + +func (fake *FakeTokenCache) RefreshTokenReturnsOnCall(i int, result1 string) { + fake.RefreshTokenStub = nil + if fake.refreshTokenReturnsOnCall == nil { + fake.refreshTokenReturnsOnCall = make(map[int]struct { + result1 string + }) + } + fake.refreshTokenReturnsOnCall[i] = struct { + result1 string + }{result1} +} + +func (fake *FakeTokenCache) SetAccessToken(token string) { + fake.setAccessTokenMutex.Lock() + fake.setAccessTokenArgsForCall = append(fake.setAccessTokenArgsForCall, struct { + token string + }{token}) + fake.recordInvocation("SetAccessToken", []interface{}{token}) + fake.setAccessTokenMutex.Unlock() + if fake.SetAccessTokenStub != nil { + fake.SetAccessTokenStub(token) + } +} + +func (fake *FakeTokenCache) SetAccessTokenCallCount() int { + fake.setAccessTokenMutex.RLock() + defer fake.setAccessTokenMutex.RUnlock() + return len(fake.setAccessTokenArgsForCall) +} + +func (fake *FakeTokenCache) SetAccessTokenArgsForCall(i int) string { + fake.setAccessTokenMutex.RLock() + defer fake.setAccessTokenMutex.RUnlock() + return fake.setAccessTokenArgsForCall[i].token +} + +func (fake *FakeTokenCache) SetRefreshToken(token string) { + fake.setRefreshTokenMutex.Lock() + fake.setRefreshTokenArgsForCall = append(fake.setRefreshTokenArgsForCall, struct { + token string + }{token}) + fake.recordInvocation("SetRefreshToken", []interface{}{token}) + fake.setRefreshTokenMutex.Unlock() + if fake.SetRefreshTokenStub != nil { + fake.SetRefreshTokenStub(token) + } +} + +func (fake *FakeTokenCache) SetRefreshTokenCallCount() int { + fake.setRefreshTokenMutex.RLock() + defer fake.setRefreshTokenMutex.RUnlock() + return len(fake.setRefreshTokenArgsForCall) +} + +func (fake *FakeTokenCache) SetRefreshTokenArgsForCall(i int) string { + fake.setRefreshTokenMutex.RLock() + defer fake.setRefreshTokenMutex.RUnlock() + return fake.setRefreshTokenArgsForCall[i].token +} + +func (fake *FakeTokenCache) Invocations() map[string][][]interface{} { + fake.invocationsMutex.RLock() + defer fake.invocationsMutex.RUnlock() + fake.accessTokenMutex.RLock() + defer fake.accessTokenMutex.RUnlock() + fake.refreshTokenMutex.RLock() + defer fake.refreshTokenMutex.RUnlock() + fake.setAccessTokenMutex.RLock() + defer fake.setAccessTokenMutex.RUnlock() + fake.setRefreshTokenMutex.RLock() + defer fake.setRefreshTokenMutex.RUnlock() + copiedInvocations := map[string][][]interface{}{} + for key, value := range fake.invocations { + copiedInvocations[key] = value + } + return copiedInvocations +} + +func (fake *FakeTokenCache) recordInvocation(key string, args []interface{}) { + fake.invocationsMutex.Lock() + defer fake.invocationsMutex.Unlock() + if fake.invocations == nil { + fake.invocations = map[string][][]interface{}{} + } + if fake.invocations[key] == nil { + fake.invocations[key] = [][]interface{}{} + } + fake.invocations[key] = append(fake.invocations[key], args) +} + +var _ wrapper.TokenCache = new(FakeTokenCache) diff --git a/api/cfnetworking/wrapper/wrapperfakes/fake_uaaclient.go b/api/cfnetworking/wrapper/wrapperfakes/fake_uaaclient.go new file mode 100644 index 00000000000..ca453b6aaa0 --- /dev/null +++ b/api/cfnetworking/wrapper/wrapperfakes/fake_uaaclient.go @@ -0,0 +1,104 @@ +// Code generated by counterfeiter. DO NOT EDIT. +package wrapperfakes + +import ( + "sync" + + "code.cloudfoundry.org/cli/api/cfnetworking/wrapper" + "code.cloudfoundry.org/cli/api/uaa" +) + +type FakeUAAClient struct { + RefreshAccessTokenStub func(refreshToken string) (uaa.RefreshedTokens, error) + refreshAccessTokenMutex sync.RWMutex + refreshAccessTokenArgsForCall []struct { + refreshToken string + } + refreshAccessTokenReturns struct { + result1 uaa.RefreshedTokens + result2 error + } + refreshAccessTokenReturnsOnCall map[int]struct { + result1 uaa.RefreshedTokens + result2 error + } + invocations map[string][][]interface{} + invocationsMutex sync.RWMutex +} + +func (fake *FakeUAAClient) RefreshAccessToken(refreshToken string) (uaa.RefreshedTokens, error) { + fake.refreshAccessTokenMutex.Lock() + ret, specificReturn := fake.refreshAccessTokenReturnsOnCall[len(fake.refreshAccessTokenArgsForCall)] + fake.refreshAccessTokenArgsForCall = append(fake.refreshAccessTokenArgsForCall, struct { + refreshToken string + }{refreshToken}) + fake.recordInvocation("RefreshAccessToken", []interface{}{refreshToken}) + fake.refreshAccessTokenMutex.Unlock() + if fake.RefreshAccessTokenStub != nil { + return fake.RefreshAccessTokenStub(refreshToken) + } + if specificReturn { + return ret.result1, ret.result2 + } + return fake.refreshAccessTokenReturns.result1, fake.refreshAccessTokenReturns.result2 +} + +func (fake *FakeUAAClient) RefreshAccessTokenCallCount() int { + fake.refreshAccessTokenMutex.RLock() + defer fake.refreshAccessTokenMutex.RUnlock() + return len(fake.refreshAccessTokenArgsForCall) +} + +func (fake *FakeUAAClient) RefreshAccessTokenArgsForCall(i int) string { + fake.refreshAccessTokenMutex.RLock() + defer fake.refreshAccessTokenMutex.RUnlock() + return fake.refreshAccessTokenArgsForCall[i].refreshToken +} + +func (fake *FakeUAAClient) RefreshAccessTokenReturns(result1 uaa.RefreshedTokens, result2 error) { + fake.RefreshAccessTokenStub = nil + fake.refreshAccessTokenReturns = struct { + result1 uaa.RefreshedTokens + result2 error + }{result1, result2} +} + +func (fake *FakeUAAClient) RefreshAccessTokenReturnsOnCall(i int, result1 uaa.RefreshedTokens, result2 error) { + fake.RefreshAccessTokenStub = nil + if fake.refreshAccessTokenReturnsOnCall == nil { + fake.refreshAccessTokenReturnsOnCall = make(map[int]struct { + result1 uaa.RefreshedTokens + result2 error + }) + } + fake.refreshAccessTokenReturnsOnCall[i] = struct { + result1 uaa.RefreshedTokens + result2 error + }{result1, result2} +} + +func (fake *FakeUAAClient) Invocations() map[string][][]interface{} { + fake.invocationsMutex.RLock() + defer fake.invocationsMutex.RUnlock() + fake.refreshAccessTokenMutex.RLock() + defer fake.refreshAccessTokenMutex.RUnlock() + copiedInvocations := map[string][][]interface{}{} + for key, value := range fake.invocations { + copiedInvocations[key] = value + } + return copiedInvocations +} + +func (fake *FakeUAAClient) recordInvocation(key string, args []interface{}) { + fake.invocationsMutex.Lock() + defer fake.invocationsMutex.Unlock() + if fake.invocations == nil { + fake.invocations = map[string][][]interface{}{} + } + if fake.invocations[key] == nil { + fake.invocations[key] = [][]interface{}{} + } + fake.invocations[key] = append(fake.invocations[key], args) +} + +var _ wrapper.UAAClient = new(FakeUAAClient) diff --git a/command/v7/shared/new_networking_client.go b/command/v7/shared/new_networking_client.go index 24057e3df88..e2a48b3a5d8 100644 --- a/command/v7/shared/new_networking_client.go +++ b/command/v7/shared/new_networking_client.go @@ -1,8 +1,8 @@ package shared import ( - "code.cloudfoundry.org/cfnetworking-cli-api/cfnetworking/cfnetv1" - "code.cloudfoundry.org/cfnetworking-cli-api/cfnetworking/wrapper" + "code.cloudfoundry.org/cli/api/cfnetworking/cfnetv1" + "code.cloudfoundry.org/cli/api/cfnetworking/wrapper" "code.cloudfoundry.org/cli/api/uaa" "code.cloudfoundry.org/cli/command" "code.cloudfoundry.org/cli/command/translatableerror" diff --git a/go.mod b/go.mod index 5122fcd1f0b..158e58c165a 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,6 @@ go 1.21 require ( code.cloudfoundry.org/bytefmt v0.0.0-20170428003108-f4415fafc561 - code.cloudfoundry.org/cfnetworking-cli-api v0.0.0-20190103195135-4b04f26287a6 code.cloudfoundry.org/cli-plugin-repo v0.0.0-20200304195157-af98c4be9b85 code.cloudfoundry.org/cli/integration/assets/hydrabroker v0.0.0-20201002233634-81722a1144e4 code.cloudfoundry.org/clock v1.1.0 diff --git a/go.sum b/go.sum index 5a0c03ec028..79c2ac54529 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,5 @@ code.cloudfoundry.org/bytefmt v0.0.0-20170428003108-f4415fafc561 h1:OKYHUwj6pyB9KWBoyy1yPJVWvoYV2N+9QqbvbSw8LjM= code.cloudfoundry.org/bytefmt v0.0.0-20170428003108-f4415fafc561/go.mod h1:wN/zk7mhREp/oviagqUXY3EwuHhWyOvAdsn5Y4CzOrc= -code.cloudfoundry.org/cfnetworking-cli-api v0.0.0-20190103195135-4b04f26287a6 h1:Yc9r1p21kEpni9WlG4mwOZw87TB2QlyS9sAEebZ3+ak= -code.cloudfoundry.org/cfnetworking-cli-api v0.0.0-20190103195135-4b04f26287a6/go.mod h1:u5FovqC5GGAEbFPz+IdjycDA+gIjhUwqxnu0vbHwVeM= code.cloudfoundry.org/cli-plugin-repo v0.0.0-20200304195157-af98c4be9b85 h1:jaHWw9opYjKPrDT19uydBBWSxl+g5F4Hv030fqMsalo= code.cloudfoundry.org/cli-plugin-repo v0.0.0-20200304195157-af98c4be9b85/go.mod h1:R1EiyOAr7lW0l/YkZNqItUNZ01Q/dYUfbTn4X4Z+82M= code.cloudfoundry.org/cli/integration/assets/hydrabroker v0.0.0-20201002233634-81722a1144e4 h1:O+j8afQWaDuxzKGcculsjgHGK+biBTn6iMjgFpBf54c= From 3750532cf1d4e2f7178fa086b60bd3d7c1a0aa7b Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Fri, 15 Sep 2023 16:28:57 -0700 Subject: [PATCH 04/15] Move code.cloudfoundry.org/gofileutils to here - used to be here many years ago - is now archived so maintaining it here makes more sense - removed the ginkgo v1 out of the couple of tests --- actor/pluginaction/install.go | 2 +- cf/actors/push.go | 2 +- cf/api/applicationbits/application_bits.go | 2 +- cf/api/buildpack_bits.go | 2 +- cf/appfiles/app_files.go | 2 +- cf/appfiles/app_files_test.go | 2 +- cf/appfiles/zipper.go | 2 +- cf/appfiles/zipper_test.go | 2 +- cf/commands/curl_test.go | 2 +- cf/commands/plugin/install_plugin.go | 2 +- cf/commands/plugin/uninstall_plugin_test.go | 2 +- cf/fileutils/fileutils/dir_utils.go | 20 +++ cf/fileutils/fileutils/file_utils.go | 74 ++++++++ cf/fileutils/fileutils/file_utils_test.go | 165 ++++++++++++++++++ .../fileutils/fileutils_suite_test.go | 13 ++ cf/fileutils/fileutils/temp_utils.go | 27 +++ .../fixtures/fileutils/some-dir/.gitkeep | 0 .../fixtures/fileutils/some-dir/some-file | 0 .../fixtures/fileutils/supervirus.zsh | 1 + cf/fileutils/fixtures/some.config | 0 .../sub_dir/other_sub_dir/.gitkeep | 0 cf/fileutils/glob/README.md | 26 +++ cf/fileutils/glob/dir.go | 86 +++++++++ cf/fileutils/glob/dir_test.go | 68 ++++++++ cf/fileutils/glob/glob.go | 100 +++++++++++ cf/fileutils/glob/glob_test.go | 110 ++++++++++++ cf/flagcontext/flag_content_helper_test.go | 2 +- cf/trace/logger_provider_test.go | 2 +- go.mod | 1 - go.sum | 2 - 30 files changed, 703 insertions(+), 16 deletions(-) create mode 100644 cf/fileutils/fileutils/dir_utils.go create mode 100644 cf/fileutils/fileutils/file_utils.go create mode 100644 cf/fileutils/fileutils/file_utils_test.go create mode 100644 cf/fileutils/fileutils/fileutils_suite_test.go create mode 100644 cf/fileutils/fileutils/temp_utils.go create mode 100644 cf/fileutils/fixtures/fileutils/some-dir/.gitkeep create mode 100644 cf/fileutils/fixtures/fileutils/some-dir/some-file create mode 100644 cf/fileutils/fixtures/fileutils/supervirus.zsh create mode 100644 cf/fileutils/fixtures/some.config create mode 100644 cf/fileutils/fixtures/test_glob/some_directory/sub_dir/other_sub_dir/.gitkeep create mode 100644 cf/fileutils/glob/README.md create mode 100644 cf/fileutils/glob/dir.go create mode 100644 cf/fileutils/glob/dir_test.go create mode 100644 cf/fileutils/glob/glob.go create mode 100644 cf/fileutils/glob/glob_test.go diff --git a/actor/pluginaction/install.go b/actor/pluginaction/install.go index f13cf0da40d..bfe942e850e 100644 --- a/actor/pluginaction/install.go +++ b/actor/pluginaction/install.go @@ -11,9 +11,9 @@ import ( "code.cloudfoundry.org/cli/actor/actionerror" "code.cloudfoundry.org/cli/api/plugin" + "code.cloudfoundry.org/cli/cf/fileutils/fileutils" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/generic" - "code.cloudfoundry.org/gofileutils/fileutils" ) //go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . PluginMetadata diff --git a/cf/actors/push.go b/cf/actors/push.go index 182e2b2f308..5169e892d85 100644 --- a/cf/actors/push.go +++ b/cf/actors/push.go @@ -10,9 +10,9 @@ import ( "code.cloudfoundry.org/cli/cf/api/applicationbits" "code.cloudfoundry.org/cli/cf/api/resources" "code.cloudfoundry.org/cli/cf/appfiles" + "code.cloudfoundry.org/cli/cf/fileutils/fileutils" . "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/models" - "code.cloudfoundry.org/gofileutils/fileutils" ) const windowsPathPrefix = `\\?\` diff --git a/cf/api/applicationbits/application_bits.go b/cf/api/applicationbits/application_bits.go index 1b16ae9d3cd..9f865454f77 100644 --- a/cf/api/applicationbits/application_bits.go +++ b/cf/api/applicationbits/application_bits.go @@ -2,6 +2,7 @@ package applicationbits import ( "bytes" + "code.cloudfoundry.org/cli/cf/fileutils/fileutils" "encoding/json" "fmt" "io" @@ -14,7 +15,6 @@ import ( "code.cloudfoundry.org/cli/cf/configuration/coreconfig" . "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/net" - "code.cloudfoundry.org/gofileutils/fileutils" ) const ( diff --git a/cf/api/buildpack_bits.go b/cf/api/buildpack_bits.go index a3dd4416071..b1bbee9eee5 100644 --- a/cf/api/buildpack_bits.go +++ b/cf/api/buildpack_bits.go @@ -19,11 +19,11 @@ import ( "code.cloudfoundry.org/cli/cf/appfiles" "code.cloudfoundry.org/cli/cf/configuration/coreconfig" "code.cloudfoundry.org/cli/cf/errors" + "code.cloudfoundry.org/cli/cf/fileutils/fileutils" . "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/models" "code.cloudfoundry.org/cli/cf/net" "code.cloudfoundry.org/cli/util" - "code.cloudfoundry.org/gofileutils/fileutils" ) //go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . BuildpackBitsRepository diff --git a/cf/appfiles/app_files.go b/cf/appfiles/app_files.go index 216d1107676..87192f336f6 100644 --- a/cf/appfiles/app_files.go +++ b/cf/appfiles/app_files.go @@ -9,8 +9,8 @@ import ( "path/filepath" "runtime" + "code.cloudfoundry.org/cli/cf/fileutils/fileutils" "code.cloudfoundry.org/cli/cf/models" - "code.cloudfoundry.org/gofileutils/fileutils" securejoin "github.com/cyphar/filepath-securejoin" ) diff --git a/cf/appfiles/app_files_test.go b/cf/appfiles/app_files_test.go index 63e79ce3571..3594db43c80 100644 --- a/cf/appfiles/app_files_test.go +++ b/cf/appfiles/app_files_test.go @@ -10,8 +10,8 @@ import ( "code.cloudfoundry.org/cli/cf/appfiles" uuid "github.com/nu7hatch/gouuid" + "code.cloudfoundry.org/cli/cf/fileutils/fileutils" "code.cloudfoundry.org/cli/cf/models" - "code.cloudfoundry.org/gofileutils/fileutils" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/cf/appfiles/zipper.go b/cf/appfiles/zipper.go index 22bccb71e54..fec06ff8c2d 100644 --- a/cf/appfiles/zipper.go +++ b/cf/appfiles/zipper.go @@ -10,7 +10,7 @@ import ( "runtime" "code.cloudfoundry.org/cli/cf/errors" - "code.cloudfoundry.org/gofileutils/fileutils" + "code.cloudfoundry.org/cli/cf/fileutils/fileutils" securejoin "github.com/cyphar/filepath-securejoin" ) diff --git a/cf/appfiles/zipper_test.go b/cf/appfiles/zipper_test.go index a262b2fdcf9..a366d715088 100644 --- a/cf/appfiles/zipper_test.go +++ b/cf/appfiles/zipper_test.go @@ -13,7 +13,7 @@ import ( "strings" . "code.cloudfoundry.org/cli/cf/appfiles" - "code.cloudfoundry.org/gofileutils/fileutils" + "code.cloudfoundry.org/cli/cf/fileutils/fileutils" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/cf/commands/curl_test.go b/cf/commands/curl_test.go index 870836436e5..8bd93b71d2b 100644 --- a/cf/commands/curl_test.go +++ b/cf/commands/curl_test.go @@ -8,12 +8,12 @@ import ( "code.cloudfoundry.org/cli/cf/api/apifakes" "code.cloudfoundry.org/cli/cf/configuration/coreconfig" "code.cloudfoundry.org/cli/cf/errors" + "code.cloudfoundry.org/cli/cf/fileutils/fileutils" "code.cloudfoundry.org/cli/cf/requirements" "code.cloudfoundry.org/cli/cf/requirements/requirementsfakes" testcmd "code.cloudfoundry.org/cli/cf/util/testhelpers/commands" testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" - "code.cloudfoundry.org/gofileutils/fileutils" "code.cloudfoundry.org/cli/cf/commandregistry" "code.cloudfoundry.org/cli/cf/trace" diff --git a/cf/commands/plugin/install_plugin.go b/cf/commands/plugin/install_plugin.go index ac9c21d567f..aada5df3c8f 100644 --- a/cf/commands/plugin/install_plugin.go +++ b/cf/commands/plugin/install_plugin.go @@ -13,6 +13,7 @@ import ( "code.cloudfoundry.org/cli/cf/commandregistry" "code.cloudfoundry.org/cli/cf/configuration/coreconfig" "code.cloudfoundry.org/cli/cf/configuration/pluginconfig" + "code.cloudfoundry.org/cli/cf/fileutils/fileutils" "code.cloudfoundry.org/cli/cf/flags" . "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/requirements" @@ -20,7 +21,6 @@ import ( "code.cloudfoundry.org/cli/cf/util/downloader" "code.cloudfoundry.org/cli/plugin" "code.cloudfoundry.org/cli/util" - "code.cloudfoundry.org/gofileutils/fileutils" pluginRPCService "code.cloudfoundry.org/cli/plugin/rpc" ) diff --git a/cf/commands/plugin/uninstall_plugin_test.go b/cf/commands/plugin/uninstall_plugin_test.go index eccf500ad65..f04ce28ecd8 100644 --- a/cf/commands/plugin/uninstall_plugin_test.go +++ b/cf/commands/plugin/uninstall_plugin_test.go @@ -9,8 +9,8 @@ import ( "code.cloudfoundry.org/cli/cf/configuration" "code.cloudfoundry.org/cli/cf/configuration/confighelpers" "code.cloudfoundry.org/cli/cf/configuration/pluginconfig" + "code.cloudfoundry.org/cli/cf/fileutils/fileutils" "code.cloudfoundry.org/cli/cf/requirements/requirementsfakes" - "code.cloudfoundry.org/gofileutils/fileutils" testcmd "code.cloudfoundry.org/cli/cf/util/testhelpers/commands" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" diff --git a/cf/fileutils/fileutils/dir_utils.go b/cf/fileutils/fileutils/dir_utils.go new file mode 100644 index 00000000000..a430217ec56 --- /dev/null +++ b/cf/fileutils/fileutils/dir_utils.go @@ -0,0 +1,20 @@ +package fileutils + +import ( + "os" +) + +func IsDirEmpty(dir string) (isEmpty bool, err error) { + dirFile, err := os.Open(dir) + if err != nil { + return + } + + _, readErr := dirFile.Readdirnames(1) + if readErr != nil { + isEmpty = true + } else { + isEmpty = false + } + return +} diff --git a/cf/fileutils/fileutils/file_utils.go b/cf/fileutils/fileutils/file_utils.go new file mode 100644 index 00000000000..ac9b6eb4e01 --- /dev/null +++ b/cf/fileutils/fileutils/file_utils.go @@ -0,0 +1,74 @@ +package fileutils + +import ( + "io" + "io/ioutil" + "os" + "path" + "path/filepath" +) + +func Open(path string) (file *os.File, err error) { + err = os.MkdirAll(filepath.Dir(path), os.ModeDir|os.ModePerm) + if err != nil { + return + } + + return os.OpenFile(path, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666) +} + +func Create(path string) (file *os.File, err error) { + err = os.MkdirAll(filepath.Dir(path), os.ModeDir|os.ModePerm) + if err != nil { + return + } + + return os.Create(path) +} + +func CopyPathToPath(fromPath, toPath string) (err error) { + srcFileInfo, err := os.Stat(fromPath) + if err != nil { + return err + } + + if srcFileInfo.IsDir() { + err = os.MkdirAll(toPath, srcFileInfo.Mode()) + if err != nil { + return err + } + + files, err := ioutil.ReadDir(fromPath) + if err != nil { + return err + } + + for _, file := range files { + err = CopyPathToPath(path.Join(fromPath, file.Name()), path.Join(toPath, file.Name())) + if err != nil { + return err + } + } + } else { + var dst *os.File + dst, err = Create(toPath) + if err != nil { + return err + } + defer dst.Close() + + dst.Chmod(srcFileInfo.Mode()) + + src, err := os.Open(fromPath) + if err != nil { + return err + } + defer src.Close() + + _, err = io.Copy(dst, src) + if err != nil { + return err + } + } + return err +} diff --git a/cf/fileutils/fileutils/file_utils_test.go b/cf/fileutils/fileutils/file_utils_test.go new file mode 100644 index 00000000000..9764ad348a0 --- /dev/null +++ b/cf/fileutils/fileutils/file_utils_test.go @@ -0,0 +1,165 @@ +package fileutils_test + +import ( + "io/ioutil" + "os" + "path" + "path/filepath" + + "code.cloudfoundry.org/cli/cf/fileutils/fileutils" + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" +) + +var _ = Describe("Fileutils File", func() { + var fixturePath = filepath.Clean("../fixtures/fileutils/supervirus.zsh") + var fixtureBytes []byte + + BeforeEach(func() { + var err error + fixtureBytes, err = ioutil.ReadFile(fixturePath) + Expect(err).NotTo(HaveOccurred()) + }) + + Describe("Open", func() { + It("opens an existing file", func() { + fd, err := fileutils.Open(fixturePath) + Expect(err).NotTo(HaveOccurred()) + + fileBytes, err := ioutil.ReadAll(fd) + Expect(err).NotTo(HaveOccurred()) + fd.Close() + + Expect(fileBytes).To(Equal(fixtureBytes)) + }) + + It("creates a non-existing file and all intermediary directories", func() { + fd, err := ioutil.TempFile("", "open_test") + Expect(err).NotTo(HaveOccurred()) + + _, err = fd.WriteString("Never Gonna Give You Up") + Expect(err).NotTo(HaveOccurred()) + fd.Close() + + fileBytes, err := ioutil.ReadFile(fd.Name()) + Expect(err).NotTo(HaveOccurred()) + Expect(string(fileBytes)).To(Equal("Never Gonna Give You Up")) + }) + }) + + Describe("Create", func() { + It("truncates an existing file", func() { + tmpFile, err := ioutil.TempFile("", "create_test") + Expect(err).NotTo(HaveOccurred()) + _, err = tmpFile.WriteString("Never Gonna Give You Up") + Expect(err).NotTo(HaveOccurred()) + filePath := tmpFile.Name() + tmpFile.Close() + + fd, err := fileutils.Create(filePath) + Expect(err).NotTo(HaveOccurred()) + + fileBytes, err := ioutil.ReadAll(fd) + Expect(err).NotTo(HaveOccurred()) + Expect(len(fileBytes)).To(Equal(0)) + fd.Close() + }) + + It("creates a non-existing file and all intermediary directories", func() { + fd, err := ioutil.TempFile("", "create_test") + Expect(err).NotTo(HaveOccurred()) + + _, err = fd.WriteString("Never Gonna Let You Down") + Expect(err).NotTo(HaveOccurred()) + fd.Close() + + fileBytes, err := ioutil.ReadFile(fd.Name()) + Expect(err).NotTo(HaveOccurred()) + Expect(string(fileBytes)).To(Equal("Never Gonna Let You Down")) + }) + }) + + Describe("CopyPathToPath", func() { + Describe("when the source is a file", func() { + var destPath string + + BeforeEach(func() { + fd, err := ioutil.TempFile("", "copy_test") + Expect(err).NotTo(HaveOccurred()) + fd.Close() + destPath = fd.Name() + }) + + AfterEach(func() { + os.RemoveAll(destPath) + }) + + It("copies the file contents", func() { + err := fileutils.CopyPathToPath(fixturePath, destPath) + Expect(err).NotTo(HaveOccurred()) + fileBytes, err := ioutil.ReadFile(destPath) + Expect(err).NotTo(HaveOccurred()) + + fixtureBytes, err := ioutil.ReadFile(fixturePath) + Expect(err).NotTo(HaveOccurred()) + Expect(fileBytes).To(Equal(fixtureBytes)) + }) + + It("preserves the file mode", func() { + err := fileutils.CopyPathToPath(fixturePath, destPath) + Expect(err).NotTo(HaveOccurred()) + fileInfo, err := os.Stat(destPath) + Expect(err).NotTo(HaveOccurred()) + + expectedFileInfo, err := os.Stat(fixturePath) + Expect(err).NotTo(HaveOccurred()) + + Expect(fileInfo.Mode()).To(Equal(expectedFileInfo.Mode())) + }) + }) + + Describe("when the source is a directory", func() { + var dirPath, destPath string + + BeforeEach(func() { + dirPath = filepath.Join(filepath.Dir(fixturePath), "some-dir") + destPath = filepath.Join(filepath.Dir(fixturePath), "some-other-dir") + }) + + AfterEach(func() { + os.RemoveAll(destPath) + }) + + It("creates a directory at the destination path", func() { + err := fileutils.CopyPathToPath(dirPath, destPath) + Expect(err).NotTo(HaveOccurred()) + + fileInfo, err := os.Stat(destPath) + Expect(err).NotTo(HaveOccurred()) + Expect(fileInfo.IsDir()).To(BeTrue()) + }) + + It("copies all of the files from the src directory", func() { + err := fileutils.CopyPathToPath(dirPath, destPath) + Expect(err).NotTo(HaveOccurred()) + + fileInfo, err := os.Stat(path.Join(destPath, "some-file")) + Expect(err).NotTo(HaveOccurred()) + Expect(fileInfo.IsDir()).To(BeFalse()) + }) + + It("preserves the directory's mode", func() { + err := fileutils.CopyPathToPath(dirPath, destPath) + Expect(err).NotTo(HaveOccurred()) + + fileInfo, err := os.Stat(destPath) + Expect(err).NotTo(HaveOccurred()) + + expectedFileInfo, err := os.Stat(dirPath) + Expect(err).NotTo(HaveOccurred()) + + Expect(fileInfo.Mode()).To(Equal(expectedFileInfo.Mode())) + }) + }) + }) +}) diff --git a/cf/fileutils/fileutils/fileutils_suite_test.go b/cf/fileutils/fileutils/fileutils_suite_test.go new file mode 100644 index 00000000000..1f160395b94 --- /dev/null +++ b/cf/fileutils/fileutils/fileutils_suite_test.go @@ -0,0 +1,13 @@ +package fileutils_test + +import ( + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + + "testing" +) + +func TestApp(t *testing.T) { + RegisterFailHandler(Fail) + RunSpecs(t, "File Utils Suite") +} diff --git a/cf/fileutils/fileutils/temp_utils.go b/cf/fileutils/fileutils/temp_utils.go new file mode 100644 index 00000000000..4961a8d40b7 --- /dev/null +++ b/cf/fileutils/fileutils/temp_utils.go @@ -0,0 +1,27 @@ +package fileutils + +import ( + "io/ioutil" + "os" +) + +func TempDir(namePrefix string, cb func(tmpDir string, err error)) { + tmpDir, err := ioutil.TempDir("", namePrefix) + + defer func() { + os.RemoveAll(tmpDir) + }() + + cb(tmpDir, err) +} + +func TempFile(namePrefix string, cb func(tmpFile *os.File, err error)) { + tmpFile, err := ioutil.TempFile("", namePrefix) + + defer func() { + tmpFile.Close() + os.Remove(tmpFile.Name()) + }() + + cb(tmpFile, err) +} diff --git a/cf/fileutils/fixtures/fileutils/some-dir/.gitkeep b/cf/fileutils/fixtures/fileutils/some-dir/.gitkeep new file mode 100644 index 00000000000..e69de29bb2d diff --git a/cf/fileutils/fixtures/fileutils/some-dir/some-file b/cf/fileutils/fixtures/fileutils/some-dir/some-file new file mode 100644 index 00000000000..e69de29bb2d diff --git a/cf/fileutils/fixtures/fileutils/supervirus.zsh b/cf/fileutils/fixtures/fileutils/supervirus.zsh new file mode 100644 index 00000000000..0ab0fad7e7a --- /dev/null +++ b/cf/fileutils/fixtures/fileutils/supervirus.zsh @@ -0,0 +1 @@ +just kidding diff --git a/cf/fileutils/fixtures/some.config b/cf/fileutils/fixtures/some.config new file mode 100644 index 00000000000..e69de29bb2d diff --git a/cf/fileutils/fixtures/test_glob/some_directory/sub_dir/other_sub_dir/.gitkeep b/cf/fileutils/fixtures/test_glob/some_directory/sub_dir/other_sub_dir/.gitkeep new file mode 100644 index 00000000000..e69de29bb2d diff --git a/cf/fileutils/glob/README.md b/cf/fileutils/glob/README.md new file mode 100644 index 00000000000..c2f05fb3c27 --- /dev/null +++ b/cf/fileutils/glob/README.md @@ -0,0 +1,26 @@ +glob.go and glob_test.go forked from doozerd (https://github.com/ha/doozerd) + +LICENCE +======= + + The MIT License + + Copyright (c) 2010 Blake Mizerany, Keith Rarick + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. diff --git a/cf/fileutils/glob/dir.go b/cf/fileutils/glob/dir.go new file mode 100644 index 00000000000..45ca14fbb45 --- /dev/null +++ b/cf/fileutils/glob/dir.go @@ -0,0 +1,86 @@ +package glob + +import ( + "errors" + "fmt" + "os" + "path" + "path/filepath" + "strings" +) + +type Dir interface { + Glob(patterns ...string) (filePaths []string, err error) +} + +type dir struct { + path string +} + +func NewDir(path string) (d Dir) { + return dir{path: path} +} + +func (d dir) Glob(patterns ...string) (filePaths []string, err error) { + for _, pattern := range patterns { + var newFiles []string + + newFiles, err = d.glob(pattern) + if err != nil { + err = wrapError(err, "Finding files matching pattern %s", pattern) + return + } + + filePaths = append(filePaths, newFiles...) + } + + return +} + +func (d dir) glob(pattern string) (files []string, err error) { + // unify path so that pattern will match files on Windows + unifiedPath := strings.TrimPrefix(filepath.ToSlash(d.path), filepath.VolumeName(d.path)) + globPattern := path.Join(unifiedPath, pattern) + + glob, err := CompileGlob(globPattern) + if err != nil { + err = wrapError(err, "Compiling glob for pattern %s", pattern) + return + } + + filepath.Walk(d.path, func(path string, info os.FileInfo, inErr error) (err error) { + path = strings.TrimPrefix(filepath.ToSlash(path), filepath.VolumeName(path)) + + if inErr != nil { + err = inErr + return + } + + if glob.Match(path) { + files = append(files, strings.Replace(path, unifiedPath+"/", "", 1)) + } + + return + }) + + // Ruby Dir.glob will include *.log when looking for **/*.log + // Our glob implementation will not do it automatically + if strings.Contains(pattern, "**/*") { + var extraFiles []string + + updatedPattern := strings.Replace(pattern, "**/*", "*", 1) + extraFiles, err = d.glob(updatedPattern) + if err != nil { + err = wrapError(err, "Recursing into pattern %s", updatedPattern) + return + } + + files = append(files, extraFiles...) + } + return +} + +func wrapError(err error, msg string, args ...interface{}) (newErr error) { + msg = fmt.Sprintf(msg, args...) + return errors.New(fmt.Sprintf("%s: %s", msg, err.Error())) +} diff --git a/cf/fileutils/glob/dir_test.go b/cf/fileutils/glob/dir_test.go new file mode 100644 index 00000000000..2295e3b0ba2 --- /dev/null +++ b/cf/fileutils/glob/dir_test.go @@ -0,0 +1,68 @@ +package glob + +import ( + "os" + "path/filepath" + "testing" +) + +func TestDirGlob(t *testing.T) { + fixturesDir := globFixturesDir() + dir := NewDir(fixturesDir) + patterns := []string{"**/*.stdout.log", "*.stderr.log", "../some.config", "some_directory/**/*"} + + filePaths, err := dir.Glob(patterns...) + if err != nil { + t.Fatalf("Expected No Error but got %v", err) + return + } + + // regular files + assertPathIsIncluded(t, filePaths, "app.stdout.log") + assertPathIsIncluded(t, filePaths, "app.stderr.log") + + // file in a directory + assertPathIsIncluded(t, filePaths, "other_logs/other_app.stdout.log") + + // file in a sub directory + assertPathIsIncluded(t, filePaths, "other_logs/more_logs/more.stdout.log") + + // directories + assertPathIsIncluded(t, filePaths, "some_directory/sub_dir") + assertPathIsIncluded(t, filePaths, "some_directory/sub_dir/other_sub_dir") + + // file that is not matching filter + assertPathIsExcluded(t, filePaths, "some_directory") + assertPathIsExcluded(t, filePaths, "other_logs/other_app.stderr.log") + assertPathIsExcluded(t, filePaths, "../some.config") +} + +func globFixturesDir() string { + pwd, _ := os.Getwd() + return filepath.Join(pwd, "..", "fixtures", "test_glob") +} + +func assertPathIsIncluded(t *testing.T, filePaths []string, includedPath string) { + found := findFile(filePaths, includedPath) + + if !found { + t.Errorf("Expected to find file path `%s`", includedPath) + } +} + +func assertPathIsExcluded(t *testing.T, filePaths []string, excludedPath string) { + found := findFile(filePaths, excludedPath) + + if found { + t.Errorf("Expected to NOT find file path `%s`", excludedPath) + } +} + +func findFile(filePaths []string, expectedPath string) bool { + for _, filePath := range filePaths { + if filePath == expectedPath { + return true + } + } + return false +} diff --git a/cf/fileutils/glob/glob.go b/cf/fileutils/glob/glob.go new file mode 100644 index 00000000000..b9fc6f8bb5b --- /dev/null +++ b/cf/fileutils/glob/glob.go @@ -0,0 +1,100 @@ +package glob + +import ( + "regexp" + "strings" +) + +// Glob holds a Unix-style glob pattern in a compiled form for efficient +// matching against paths. +// +// Glob notation: +// - `?` matches a single char in a single path component +// - `*` matches zero or more chars in a single path component +// - `**` matches zero or more chars in zero or more components +// - any other sequence matches itself +type Glob struct { + Pattern string // original glob pattern + s string // translated to regexp pattern + r *regexp.Regexp // compiled regexp +} + +var charPat = "[^/\\[\\]\\(\\)]" +var globRe = mustBuildRe(`(` + charPat + `|[\*\?])`) + +func mustBuildRe(p string) *regexp.Regexp { + return regexp.MustCompile(`^/$|^(/` + p + `+)+$`) +} + +// Supports unix/ruby-style glob patterns: +// - `?` matches a single char in a single path component +// - `*` matches zero or more chars in a single path component +// - `**` matches zero or more chars in zero or more components +func translateGlob(pat string) (string, error) { + if !globRe.MatchString(pat) { + return "", GlobError(pat) + } + + outs := make([]string, len(pat)) + i, double := 0, false + for _, c := range pat { + switch c { + default: + outs[i] = string(c) + double = false + case '.', '+', '-', '^', '$', '[', ']', '(', ')': + outs[i] = `\` + string(c) + double = false + case '?': + outs[i] = `[^/]` + double = false + case '*': + if double { + outs[i-1] = `.*` + } else { + outs[i] = `[^/]*` + } + double = !double + } + i++ + } + outs = outs[0:i] + + return "^" + strings.Join(outs, "") + "$", nil +} + +// CompileGlob translates pat into a form more convenient for +// matching against paths in the store. +func CompileGlob(pat string) (*Glob, error) { + s, err := translateGlob(pat) + if err != nil { + return nil, err + } + + r, err := regexp.Compile(s) + if err != nil { + return nil, err + } + + return &Glob{pat, s, r}, nil +} + +// MustCompileGlob is like CompileGlob, but it panics if an error occurs, +// simplifying safe initialization of global variables holding glob patterns. +func MustCompileGlob(pat string) *Glob { + g, err := CompileGlob(pat) + if err != nil { + panic(err) + } + return g +} + +func (g *Glob) Match(path string) bool { + return g.r.MatchString(path) +} + +type GlobError string + +func (e GlobError) Error() string { + return "invalid glob pattern: " + string(e) +} diff --git a/cf/fileutils/glob/glob_test.go b/cf/fileutils/glob/glob_test.go new file mode 100644 index 00000000000..bd74b09f4fa --- /dev/null +++ b/cf/fileutils/glob/glob_test.go @@ -0,0 +1,110 @@ +package glob + +import ( + "testing" +) + +var globs = [][]string{ + {"/", `^/$`}, + {"/a", `^/a$`}, + {"/a.b", `^/a\.b$`}, + {"/a-b", `^/a\-b$`}, + {"/a?", `^/a[^/]$`}, + {"/a/b", `^/a/b$`}, + {"/*", `^/[^/]*$`}, + {"/*/a", `^/[^/]*/a$`}, + {"/*a/b", `^/[^/]*a/b$`}, + {"/a*/b", `^/a[^/]*/b$`}, + {"/a*a/b", `^/a[^/]*a/b$`}, + {"/*a*/b", `^/[^/]*a[^/]*/b$`}, + {"/**", `^/.*$`}, + {"/**/a", `^/.*/a$`}, +} + +var matches = [][]string{ + {"/a/b", "/a/b"}, + {"/a?", "/ab", "/ac"}, + {"/a*", "/a", "/ab", "/abc"}, + {"/a**", "/a", "/ab", "/abc", "/a/", "/a/b", "/ab/c"}, +} + +var nonMatches = [][]string{ + {"/a/b", "/a/c", "/a/", "/a/b/", "/a/bc"}, + {"/a?", "/", "/abc", "/a", "/a/"}, + {"/a*", "/", "/a/", "/ba"}, + {"/a**", "/", "/ba"}, +} + +var dontCompile = []string{ + "", + "a", + "a/", + "//", + "/a/", + "/a[b", + "/a]b", + "/a(b", + "/a)b", +} + +func TestGlobTranslateOk(t *testing.T) { + for _, parts := range globs { + pat, exp := parts[0], parts[1] + got, err := translateGlob(pat) + if got != exp { + t.Errorf("expected %q, but got %q from %q", exp, got, pat) + } + if err != nil { + t.Errorf("in %q, unexpected err %v", pat, err) + } + } +} + +func TestGlobTranslateError(t *testing.T) { + for _, pat := range dontCompile { + re, err := translateGlob(pat) + if err == nil { + t.Errorf("pat %q shouldn't translate, but got %q", pat, re) + continue + } + + glob, err := CompileGlob(pat) + if err == nil { + t.Errorf("pat %q shouldn't compile, but got %#v", pat, glob) + } + } +} + +func TestGlobMatches(t *testing.T) { + for _, parts := range matches { + pat, paths := parts[0], parts[1:] + glob, err := CompileGlob(pat) + if err != nil { + t.Fatalf("Expected no error but got %v", err) + return + } + + for _, path := range paths { + if !glob.Match(path) { + t.Errorf("pat %q should match %q", pat, path) + } + } + } +} + +func TestGlobNonMatches(t *testing.T) { + for _, parts := range nonMatches { + pat, paths := parts[0], parts[1:] + glob, err := CompileGlob(pat) + if err != nil { + t.Fatalf("Expected no error but got %v", err) + return + } + + for _, path := range paths { + if glob.Match(path) { + t.Errorf("pat %q should not match %q", pat, path) + } + } + } +} diff --git a/cf/flagcontext/flag_content_helper_test.go b/cf/flagcontext/flag_content_helper_test.go index c57324995b9..22f2cca3344 100644 --- a/cf/flagcontext/flag_content_helper_test.go +++ b/cf/flagcontext/flag_content_helper_test.go @@ -6,7 +6,7 @@ import ( "code.cloudfoundry.org/cli/cf/flagcontext" - "code.cloudfoundry.org/gofileutils/fileutils" + "code.cloudfoundry.org/cli/cf/fileutils/fileutils" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/trace/logger_provider_test.go b/cf/trace/logger_provider_test.go index 2e1198fd443..4a23c10f5b2 100644 --- a/cf/trace/logger_provider_test.go +++ b/cf/trace/logger_provider_test.go @@ -5,8 +5,8 @@ import ( "path" "runtime" + "code.cloudfoundry.org/cli/cf/fileutils/fileutils" . "code.cloudfoundry.org/cli/cf/trace" - "code.cloudfoundry.org/gofileutils/fileutils" "os" diff --git a/go.mod b/go.mod index 158e58c165a..4a57e3ba58a 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,6 @@ require ( code.cloudfoundry.org/diego-ssh v0.0.0-20170109142818-18cdb3586e7f code.cloudfoundry.org/go-log-cache/v2 v2.0.7 code.cloudfoundry.org/go-loggregator/v9 v9.2.0 - code.cloudfoundry.org/gofileutils v0.0.0-20170111115228-4d0c80011a0f code.cloudfoundry.org/jsonry v1.1.4 code.cloudfoundry.org/lager v2.0.0+incompatible code.cloudfoundry.org/tlsconfig v0.0.0-20230612153104-23c0622de227 diff --git a/go.sum b/go.sum index 79c2ac54529..773b7f24ae0 100644 --- a/go.sum +++ b/go.sum @@ -12,8 +12,6 @@ code.cloudfoundry.org/go-log-cache/v2 v2.0.7 h1:yR/JjQ/RscO1n4xVAT9HDYcpx5ET/3Cq code.cloudfoundry.org/go-log-cache/v2 v2.0.7/go.mod h1:6KQe2FeeaqRheD5vCvpyTa80YoJojB/r21E54mT97Mc= code.cloudfoundry.org/go-loggregator/v9 v9.2.0 h1:YNVD654RhMWzG195DZm0gNnrWAJJhEw/gd/cc5Bv28s= code.cloudfoundry.org/go-loggregator/v9 v9.2.0/go.mod h1:AP7PmrWSpyC9ltOQHcwF16BVkAVXS96i8+8gwI4lXRY= -code.cloudfoundry.org/gofileutils v0.0.0-20170111115228-4d0c80011a0f h1:UrKzEwTgeiff9vxdrfdqxibzpWjxLnuXDI5m6z3GJAk= -code.cloudfoundry.org/gofileutils v0.0.0-20170111115228-4d0c80011a0f/go.mod h1:sk5LnIjB/nIEU7yP5sDQExVm62wu0pBh3yrElngUisI= code.cloudfoundry.org/jsonry v1.1.4 h1:P9N7IlH1/4aRCLcXLgLFj1hkcBmV7muijJzY+K6U4hE= code.cloudfoundry.org/jsonry v1.1.4/go.mod h1:6aKilShQP7w/Ez76h1El2/n9y2OkHuU56nKSBB9Gp0A= code.cloudfoundry.org/lager v1.1.1-0.20191008172124-a9afc05ee5be/go.mod h1:O2sS7gKP3HM2iemG+EnwvyNQK7pTSC6Foi4QiMp9sSk= From 080b3cc3b0eee18fce1745caa3167ae754efaa8e Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Mon, 18 Sep 2023 15:41:10 -0700 Subject: [PATCH 05/15] bump code.cloudfoundry.org/bytefmt to get to a version of that that uses ginkgo v2 --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 4a57e3ba58a..2a9c38b266c 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module code.cloudfoundry.org/cli go 1.21 require ( - code.cloudfoundry.org/bytefmt v0.0.0-20170428003108-f4415fafc561 + code.cloudfoundry.org/bytefmt v0.0.0-20230612151507-41ef4d1f67a4 code.cloudfoundry.org/cli-plugin-repo v0.0.0-20200304195157-af98c4be9b85 code.cloudfoundry.org/cli/integration/assets/hydrabroker v0.0.0-20201002233634-81722a1144e4 code.cloudfoundry.org/clock v1.1.0 diff --git a/go.sum b/go.sum index 773b7f24ae0..bd4b4c9ca2e 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -code.cloudfoundry.org/bytefmt v0.0.0-20170428003108-f4415fafc561 h1:OKYHUwj6pyB9KWBoyy1yPJVWvoYV2N+9QqbvbSw8LjM= -code.cloudfoundry.org/bytefmt v0.0.0-20170428003108-f4415fafc561/go.mod h1:wN/zk7mhREp/oviagqUXY3EwuHhWyOvAdsn5Y4CzOrc= +code.cloudfoundry.org/bytefmt v0.0.0-20230612151507-41ef4d1f67a4 h1:9G5F8zgma5v0GdDvNz6iZwwJp3RS/z0SY/aHGfVwvTo= +code.cloudfoundry.org/bytefmt v0.0.0-20230612151507-41ef4d1f67a4/go.mod h1:wYHCXH/gI19ujoFVuMkY48qPpPCoHLKBKXPkn67h/Yc= code.cloudfoundry.org/cli-plugin-repo v0.0.0-20200304195157-af98c4be9b85 h1:jaHWw9opYjKPrDT19uydBBWSxl+g5F4Hv030fqMsalo= code.cloudfoundry.org/cli-plugin-repo v0.0.0-20200304195157-af98c4be9b85/go.mod h1:R1EiyOAr7lW0l/YkZNqItUNZ01Q/dYUfbTn4X4Z+82M= code.cloudfoundry.org/cli/integration/assets/hydrabroker v0.0.0-20201002233634-81722a1144e4 h1:O+j8afQWaDuxzKGcculsjgHGK+biBTn6iMjgFpBf54c= From 91a7769fc7ad4921ea3b1bb0fc9823b9e3bceb2f Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Mon, 18 Sep 2023 16:01:12 -0700 Subject: [PATCH 06/15] Bump code.cloudfoundry.org/diego-ssh and code.cloudfoundry.org/lager - final ginkgo v1 thing (no longer appears in go.mod) - Newer lager was needed with newer diego-ssh --- cf/ssh/ssh_test.go | 4 ++-- go.mod | 10 ++++------ go.sum | 13 ++++++++----- util/clissh/ssh_test.go | 4 ++-- 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/cf/ssh/ssh_test.go b/cf/ssh/ssh_test.go index f430cb8e696..69b9c0cbd38 100644 --- a/cf/ssh/ssh_test.go +++ b/cf/ssh/ssh_test.go @@ -28,7 +28,7 @@ import ( "code.cloudfoundry.org/diego-ssh/test_helpers/fake_io" "code.cloudfoundry.org/diego-ssh/test_helpers/fake_net" "code.cloudfoundry.org/diego-ssh/test_helpers/fake_ssh" - "code.cloudfoundry.org/lager/lagertest" + "code.cloudfoundry.org/lager/v3/lagertest" "github.com/kr/pty" "github.com/moby/term" "golang.org/x/crypto/ssh" @@ -889,7 +889,7 @@ var _ = Describe("SSH", func() { fakeLocalListener = &fake_net.FakeListener{} fakeLocalListener.AcceptReturns(nil, errors.New("Not Accepting Connections")) - echoServer = server.NewServer(logger.Session("echo"), "", echoHandler) + echoServer = server.NewServer(logger.Session("echo"), "", echoHandler, 500*time.Millisecond) echoServer.SetListener(echoListener) go echoServer.Serve() diff --git a/go.mod b/go.mod index 2a9c38b266c..eb0923ba28f 100644 --- a/go.mod +++ b/go.mod @@ -7,11 +7,11 @@ require ( code.cloudfoundry.org/cli-plugin-repo v0.0.0-20200304195157-af98c4be9b85 code.cloudfoundry.org/cli/integration/assets/hydrabroker v0.0.0-20201002233634-81722a1144e4 code.cloudfoundry.org/clock v1.1.0 - code.cloudfoundry.org/diego-ssh v0.0.0-20170109142818-18cdb3586e7f + code.cloudfoundry.org/diego-ssh v0.0.0-20230810200140-af9d79fe9c82 code.cloudfoundry.org/go-log-cache/v2 v2.0.7 code.cloudfoundry.org/go-loggregator/v9 v9.2.0 code.cloudfoundry.org/jsonry v1.1.4 - code.cloudfoundry.org/lager v2.0.0+incompatible + code.cloudfoundry.org/lager/v3 v3.0.2 code.cloudfoundry.org/tlsconfig v0.0.0-20230612153104-23c0622de227 code.cloudfoundry.org/ykk v0.0.0-20170424192843-e4df4ce2fd4d github.com/SermoDigital/jose v0.9.2-0.20161205224733-f6df55f235c2 @@ -47,6 +47,7 @@ require ( ) require ( + code.cloudfoundry.org/inigo v0.0.0-20230612153013-b300679e6ed6 // indirect github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect github.com/bmatcuk/doublestar v1.3.4 // indirect github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40 // indirect @@ -67,13 +68,11 @@ require ( github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 // indirect github.com/imdario/mergo v0.3.6 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/kr/text v0.2.0 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/nxadm/tail v1.4.8 // indirect - github.com/onsi/ginkgo v1.16.5 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect + github.com/openzipkin/zipkin-go v0.4.1 // indirect github.com/rivo/uniseg v0.2.0 // indirect github.com/spf13/pflag v1.0.5 // indirect golang.org/x/mod v0.14.0 // indirect @@ -89,7 +88,6 @@ require ( google.golang.org/grpc v1.61.0 // indirect google.golang.org/protobuf v1.32.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect - gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/klog/v2 v2.110.1 // indirect k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect diff --git a/go.sum b/go.sum index bd4b4c9ca2e..2c54b8cb73b 100644 --- a/go.sum +++ b/go.sum @@ -6,17 +6,19 @@ code.cloudfoundry.org/cli/integration/assets/hydrabroker v0.0.0-20201002233634-8 code.cloudfoundry.org/cli/integration/assets/hydrabroker v0.0.0-20201002233634-81722a1144e4/go.mod h1:dVTgo9kQbYns/QM4A1C2GtxqUnFSvJTk2Qhw+M0/uzk= code.cloudfoundry.org/clock v1.1.0 h1:XLzC6W3Ah/Y7ht1rmZ6+QfPdt1iGWEAAtIZXgiaj57c= code.cloudfoundry.org/clock v1.1.0/go.mod h1:yA3fxddT9RINQL2XHS7PS+OXxKCGhfrZmlNUCIM6AKo= -code.cloudfoundry.org/diego-ssh v0.0.0-20170109142818-18cdb3586e7f h1:xDSTgaS6b/AkaBqvyEYfu6i1Z+y8JSCHAd/e1HGqyF4= -code.cloudfoundry.org/diego-ssh v0.0.0-20170109142818-18cdb3586e7f/go.mod h1:L2/glHnSK+wKnsG8oZZqdV2sgYY9NDo/I1aDJGhcWaM= +code.cloudfoundry.org/diego-ssh v0.0.0-20230810200140-af9d79fe9c82 h1:Bns1y0jSlcvfP0u8ael+TUlnyNHsNX808zuo58bf5so= +code.cloudfoundry.org/diego-ssh v0.0.0-20230810200140-af9d79fe9c82/go.mod h1:L2/glHnSK+wKnsG8oZZqdV2sgYY9NDo/I1aDJGhcWaM= code.cloudfoundry.org/go-log-cache/v2 v2.0.7 h1:yR/JjQ/RscO1n4xVAT9HDYcpx5ET/3Cq2/RhpJml6ZU= code.cloudfoundry.org/go-log-cache/v2 v2.0.7/go.mod h1:6KQe2FeeaqRheD5vCvpyTa80YoJojB/r21E54mT97Mc= code.cloudfoundry.org/go-loggregator/v9 v9.2.0 h1:YNVD654RhMWzG195DZm0gNnrWAJJhEw/gd/cc5Bv28s= code.cloudfoundry.org/go-loggregator/v9 v9.2.0/go.mod h1:AP7PmrWSpyC9ltOQHcwF16BVkAVXS96i8+8gwI4lXRY= +code.cloudfoundry.org/inigo v0.0.0-20230612153013-b300679e6ed6 h1:lhQNfVleRMX7dsZVZViC0gI9r/rwkO+esz06+HDCSu0= +code.cloudfoundry.org/inigo v0.0.0-20230612153013-b300679e6ed6/go.mod h1:1ZB1JCh2FAp+SqX79ve6dc8YREvbsziULEOncAilX4Q= code.cloudfoundry.org/jsonry v1.1.4 h1:P9N7IlH1/4aRCLcXLgLFj1hkcBmV7muijJzY+K6U4hE= code.cloudfoundry.org/jsonry v1.1.4/go.mod h1:6aKilShQP7w/Ez76h1El2/n9y2OkHuU56nKSBB9Gp0A= code.cloudfoundry.org/lager v1.1.1-0.20191008172124-a9afc05ee5be/go.mod h1:O2sS7gKP3HM2iemG+EnwvyNQK7pTSC6Foi4QiMp9sSk= -code.cloudfoundry.org/lager v2.0.0+incompatible h1:WZwDKDB2PLd/oL+USK4b4aEjUymIej9My2nUQ9oWEwQ= -code.cloudfoundry.org/lager v2.0.0+incompatible/go.mod h1:O2sS7gKP3HM2iemG+EnwvyNQK7pTSC6Foi4QiMp9sSk= +code.cloudfoundry.org/lager/v3 v3.0.2 h1:H0dcQY+814G1Ea0e5K/AMaMpcr+Pe5Iv+AALJEwrP9U= +code.cloudfoundry.org/lager/v3 v3.0.2/go.mod h1:zA6tOIWhr5uZUez+PGpdfBHDWQOfhOrr0cgKDagZPwk= code.cloudfoundry.org/tlsconfig v0.0.0-20230612153104-23c0622de227 h1:QYyb6Ur0Ys6FciDB3+8zCW3eVk7AxAs2++Foa5DAdt0= code.cloudfoundry.org/tlsconfig v0.0.0-20230612153104-23c0622de227/go.mod h1:C8SxvGRSutmgzV2FxH8Zwqz2Q8HsaAITQRQFKhlDzPw= code.cloudfoundry.org/ykk v0.0.0-20170424192843-e4df4ce2fd4d h1:M+zXqtXJqcsmpL76aU0tdl1ho23eYa4axYoM4gD62UA= @@ -50,7 +52,6 @@ github.com/codegangsta/negroni v1.0.0/go.mod h1:v0y3T5G7Y1UlFfyxFn/QLRU4a2EuNau2 github.com/cppforlife/go-patch v0.1.0 h1:I0fT+gFTSW4xWwvaTaUUVjr9xxjNXJ4naGc01BeQjwY= github.com/cppforlife/go-patch v0.1.0/go.mod h1:67a7aIi94FHDZdoeGSJRRFDp66l9MhaAG1yGxpUoFD8= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= @@ -206,6 +207,8 @@ github.com/onsi/gomega v1.31.1 h1:KYppCUK+bUgAZwHOu7EXVBKyQA6ILvOESHkn/tgoqvo= github.com/onsi/gomega v1.31.1/go.mod h1:y40C95dwAD1Nz36SsEnxvfFe8FFfNxzI5eJ0EYGyAy0= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/openzipkin/zipkin-go v0.4.1 h1:kNd/ST2yLLWhaWrkgchya40TJabe8Hioj9udfPcEO5A= +github.com/openzipkin/zipkin-go v0.4.1/go.mod h1:qY0VqDSN1pOBN94dBc6w2GJlWLiovAyg7Qt6/I9HecM= github.com/pborman/uuid v0.0.0-20180906182336-adf5a7427709/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34= github.com/pivotal-cf/brokerapi/v7 v7.2.0/go.mod h1:5QRQ8vJmav91F+AvY5NA/QoDOq70XgBVxXKUK4N/cNE= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= diff --git a/util/clissh/ssh_test.go b/util/clissh/ssh_test.go index a8e6851520d..d87a223676b 100644 --- a/util/clissh/ssh_test.go +++ b/util/clissh/ssh_test.go @@ -26,7 +26,7 @@ import ( "code.cloudfoundry.org/diego-ssh/test_helpers/fake_io" "code.cloudfoundry.org/diego-ssh/test_helpers/fake_net" "code.cloudfoundry.org/diego-ssh/test_helpers/fake_ssh" - "code.cloudfoundry.org/lager/lagertest" + "code.cloudfoundry.org/lager/v3/lagertest" "github.com/kr/pty" "github.com/moby/term" . "github.com/onsi/ginkgo/v2" @@ -865,7 +865,7 @@ var _ = Describe("CLI SSH", func() { fakeLocalListener = new(fake_net.FakeListener) fakeLocalListener.AcceptReturns(nil, errors.New("Not Accepting Connections")) - echoServer = server.NewServer(logger.Session("echo"), "", echoHandler) + echoServer = server.NewServer(logger.Session("echo"), "", echoHandler, 500*time.Millisecond) err = echoServer.SetListener(echoListener) Expect(err).NotTo(HaveOccurred()) go echoServer.Serve() From 66f97df28cfe2db86da6b330ed5a8d125fe587be Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Tue, 19 Sep 2023 09:26:33 -0700 Subject: [PATCH 07/15] Revert "Move code.cloudfoundry.org/gofileutils to here" This reverts commit 9e7aaec884ae040d75d66e752eed2d998b286f00. --- actor/pluginaction/install.go | 2 +- cf/actors/push.go | 2 +- cf/api/applicationbits/application_bits.go | 2 +- cf/api/buildpack_bits.go | 2 +- cf/appfiles/app_files.go | 2 +- cf/appfiles/app_files_test.go | 2 +- cf/appfiles/zipper.go | 2 +- cf/appfiles/zipper_test.go | 2 +- cf/commands/curl_test.go | 2 +- cf/commands/plugin/install_plugin.go | 2 +- cf/commands/plugin/uninstall_plugin_test.go | 2 +- cf/fileutils/fileutils/dir_utils.go | 20 --- cf/fileutils/fileutils/file_utils.go | 74 -------- cf/fileutils/fileutils/file_utils_test.go | 165 ------------------ .../fileutils/fileutils_suite_test.go | 13 -- cf/fileutils/fileutils/temp_utils.go | 27 --- .../fixtures/fileutils/some-dir/.gitkeep | 0 .../fixtures/fileutils/some-dir/some-file | 0 .../fixtures/fileutils/supervirus.zsh | 1 - cf/fileutils/fixtures/some.config | 0 .../sub_dir/other_sub_dir/.gitkeep | 0 cf/fileutils/glob/README.md | 26 --- cf/fileutils/glob/dir.go | 86 --------- cf/fileutils/glob/dir_test.go | 68 -------- cf/fileutils/glob/glob.go | 100 ----------- cf/fileutils/glob/glob_test.go | 110 ------------ cf/flagcontext/flag_content_helper_test.go | 2 +- cf/trace/logger_provider_test.go | 2 +- go.mod | 1 + go.sum | 2 + 30 files changed, 16 insertions(+), 703 deletions(-) delete mode 100644 cf/fileutils/fileutils/dir_utils.go delete mode 100644 cf/fileutils/fileutils/file_utils.go delete mode 100644 cf/fileutils/fileutils/file_utils_test.go delete mode 100644 cf/fileutils/fileutils/fileutils_suite_test.go delete mode 100644 cf/fileutils/fileutils/temp_utils.go delete mode 100644 cf/fileutils/fixtures/fileutils/some-dir/.gitkeep delete mode 100644 cf/fileutils/fixtures/fileutils/some-dir/some-file delete mode 100644 cf/fileutils/fixtures/fileutils/supervirus.zsh delete mode 100644 cf/fileutils/fixtures/some.config delete mode 100644 cf/fileutils/fixtures/test_glob/some_directory/sub_dir/other_sub_dir/.gitkeep delete mode 100644 cf/fileutils/glob/README.md delete mode 100644 cf/fileutils/glob/dir.go delete mode 100644 cf/fileutils/glob/dir_test.go delete mode 100644 cf/fileutils/glob/glob.go delete mode 100644 cf/fileutils/glob/glob_test.go diff --git a/actor/pluginaction/install.go b/actor/pluginaction/install.go index bfe942e850e..f13cf0da40d 100644 --- a/actor/pluginaction/install.go +++ b/actor/pluginaction/install.go @@ -11,9 +11,9 @@ import ( "code.cloudfoundry.org/cli/actor/actionerror" "code.cloudfoundry.org/cli/api/plugin" - "code.cloudfoundry.org/cli/cf/fileutils/fileutils" "code.cloudfoundry.org/cli/util/configv3" "code.cloudfoundry.org/cli/util/generic" + "code.cloudfoundry.org/gofileutils/fileutils" ) //go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . PluginMetadata diff --git a/cf/actors/push.go b/cf/actors/push.go index 5169e892d85..182e2b2f308 100644 --- a/cf/actors/push.go +++ b/cf/actors/push.go @@ -10,9 +10,9 @@ import ( "code.cloudfoundry.org/cli/cf/api/applicationbits" "code.cloudfoundry.org/cli/cf/api/resources" "code.cloudfoundry.org/cli/cf/appfiles" - "code.cloudfoundry.org/cli/cf/fileutils/fileutils" . "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/models" + "code.cloudfoundry.org/gofileutils/fileutils" ) const windowsPathPrefix = `\\?\` diff --git a/cf/api/applicationbits/application_bits.go b/cf/api/applicationbits/application_bits.go index 9f865454f77..1b16ae9d3cd 100644 --- a/cf/api/applicationbits/application_bits.go +++ b/cf/api/applicationbits/application_bits.go @@ -2,7 +2,6 @@ package applicationbits import ( "bytes" - "code.cloudfoundry.org/cli/cf/fileutils/fileutils" "encoding/json" "fmt" "io" @@ -15,6 +14,7 @@ import ( "code.cloudfoundry.org/cli/cf/configuration/coreconfig" . "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/net" + "code.cloudfoundry.org/gofileutils/fileutils" ) const ( diff --git a/cf/api/buildpack_bits.go b/cf/api/buildpack_bits.go index b1bbee9eee5..a3dd4416071 100644 --- a/cf/api/buildpack_bits.go +++ b/cf/api/buildpack_bits.go @@ -19,11 +19,11 @@ import ( "code.cloudfoundry.org/cli/cf/appfiles" "code.cloudfoundry.org/cli/cf/configuration/coreconfig" "code.cloudfoundry.org/cli/cf/errors" - "code.cloudfoundry.org/cli/cf/fileutils/fileutils" . "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/models" "code.cloudfoundry.org/cli/cf/net" "code.cloudfoundry.org/cli/util" + "code.cloudfoundry.org/gofileutils/fileutils" ) //go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . BuildpackBitsRepository diff --git a/cf/appfiles/app_files.go b/cf/appfiles/app_files.go index 87192f336f6..216d1107676 100644 --- a/cf/appfiles/app_files.go +++ b/cf/appfiles/app_files.go @@ -9,8 +9,8 @@ import ( "path/filepath" "runtime" - "code.cloudfoundry.org/cli/cf/fileutils/fileutils" "code.cloudfoundry.org/cli/cf/models" + "code.cloudfoundry.org/gofileutils/fileutils" securejoin "github.com/cyphar/filepath-securejoin" ) diff --git a/cf/appfiles/app_files_test.go b/cf/appfiles/app_files_test.go index 3594db43c80..63e79ce3571 100644 --- a/cf/appfiles/app_files_test.go +++ b/cf/appfiles/app_files_test.go @@ -10,8 +10,8 @@ import ( "code.cloudfoundry.org/cli/cf/appfiles" uuid "github.com/nu7hatch/gouuid" - "code.cloudfoundry.org/cli/cf/fileutils/fileutils" "code.cloudfoundry.org/cli/cf/models" + "code.cloudfoundry.org/gofileutils/fileutils" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/cf/appfiles/zipper.go b/cf/appfiles/zipper.go index fec06ff8c2d..22bccb71e54 100644 --- a/cf/appfiles/zipper.go +++ b/cf/appfiles/zipper.go @@ -10,7 +10,7 @@ import ( "runtime" "code.cloudfoundry.org/cli/cf/errors" - "code.cloudfoundry.org/cli/cf/fileutils/fileutils" + "code.cloudfoundry.org/gofileutils/fileutils" securejoin "github.com/cyphar/filepath-securejoin" ) diff --git a/cf/appfiles/zipper_test.go b/cf/appfiles/zipper_test.go index a366d715088..a262b2fdcf9 100644 --- a/cf/appfiles/zipper_test.go +++ b/cf/appfiles/zipper_test.go @@ -13,7 +13,7 @@ import ( "strings" . "code.cloudfoundry.org/cli/cf/appfiles" - "code.cloudfoundry.org/cli/cf/fileutils/fileutils" + "code.cloudfoundry.org/gofileutils/fileutils" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/cf/commands/curl_test.go b/cf/commands/curl_test.go index 8bd93b71d2b..870836436e5 100644 --- a/cf/commands/curl_test.go +++ b/cf/commands/curl_test.go @@ -8,12 +8,12 @@ import ( "code.cloudfoundry.org/cli/cf/api/apifakes" "code.cloudfoundry.org/cli/cf/configuration/coreconfig" "code.cloudfoundry.org/cli/cf/errors" - "code.cloudfoundry.org/cli/cf/fileutils/fileutils" "code.cloudfoundry.org/cli/cf/requirements" "code.cloudfoundry.org/cli/cf/requirements/requirementsfakes" testcmd "code.cloudfoundry.org/cli/cf/util/testhelpers/commands" testconfig "code.cloudfoundry.org/cli/cf/util/testhelpers/configuration" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" + "code.cloudfoundry.org/gofileutils/fileutils" "code.cloudfoundry.org/cli/cf/commandregistry" "code.cloudfoundry.org/cli/cf/trace" diff --git a/cf/commands/plugin/install_plugin.go b/cf/commands/plugin/install_plugin.go index aada5df3c8f..ac9c21d567f 100644 --- a/cf/commands/plugin/install_plugin.go +++ b/cf/commands/plugin/install_plugin.go @@ -13,7 +13,6 @@ import ( "code.cloudfoundry.org/cli/cf/commandregistry" "code.cloudfoundry.org/cli/cf/configuration/coreconfig" "code.cloudfoundry.org/cli/cf/configuration/pluginconfig" - "code.cloudfoundry.org/cli/cf/fileutils/fileutils" "code.cloudfoundry.org/cli/cf/flags" . "code.cloudfoundry.org/cli/cf/i18n" "code.cloudfoundry.org/cli/cf/requirements" @@ -21,6 +20,7 @@ import ( "code.cloudfoundry.org/cli/cf/util/downloader" "code.cloudfoundry.org/cli/plugin" "code.cloudfoundry.org/cli/util" + "code.cloudfoundry.org/gofileutils/fileutils" pluginRPCService "code.cloudfoundry.org/cli/plugin/rpc" ) diff --git a/cf/commands/plugin/uninstall_plugin_test.go b/cf/commands/plugin/uninstall_plugin_test.go index f04ce28ecd8..eccf500ad65 100644 --- a/cf/commands/plugin/uninstall_plugin_test.go +++ b/cf/commands/plugin/uninstall_plugin_test.go @@ -9,8 +9,8 @@ import ( "code.cloudfoundry.org/cli/cf/configuration" "code.cloudfoundry.org/cli/cf/configuration/confighelpers" "code.cloudfoundry.org/cli/cf/configuration/pluginconfig" - "code.cloudfoundry.org/cli/cf/fileutils/fileutils" "code.cloudfoundry.org/cli/cf/requirements/requirementsfakes" + "code.cloudfoundry.org/gofileutils/fileutils" testcmd "code.cloudfoundry.org/cli/cf/util/testhelpers/commands" testterm "code.cloudfoundry.org/cli/cf/util/testhelpers/terminal" diff --git a/cf/fileutils/fileutils/dir_utils.go b/cf/fileutils/fileutils/dir_utils.go deleted file mode 100644 index a430217ec56..00000000000 --- a/cf/fileutils/fileutils/dir_utils.go +++ /dev/null @@ -1,20 +0,0 @@ -package fileutils - -import ( - "os" -) - -func IsDirEmpty(dir string) (isEmpty bool, err error) { - dirFile, err := os.Open(dir) - if err != nil { - return - } - - _, readErr := dirFile.Readdirnames(1) - if readErr != nil { - isEmpty = true - } else { - isEmpty = false - } - return -} diff --git a/cf/fileutils/fileutils/file_utils.go b/cf/fileutils/fileutils/file_utils.go deleted file mode 100644 index ac9b6eb4e01..00000000000 --- a/cf/fileutils/fileutils/file_utils.go +++ /dev/null @@ -1,74 +0,0 @@ -package fileutils - -import ( - "io" - "io/ioutil" - "os" - "path" - "path/filepath" -) - -func Open(path string) (file *os.File, err error) { - err = os.MkdirAll(filepath.Dir(path), os.ModeDir|os.ModePerm) - if err != nil { - return - } - - return os.OpenFile(path, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666) -} - -func Create(path string) (file *os.File, err error) { - err = os.MkdirAll(filepath.Dir(path), os.ModeDir|os.ModePerm) - if err != nil { - return - } - - return os.Create(path) -} - -func CopyPathToPath(fromPath, toPath string) (err error) { - srcFileInfo, err := os.Stat(fromPath) - if err != nil { - return err - } - - if srcFileInfo.IsDir() { - err = os.MkdirAll(toPath, srcFileInfo.Mode()) - if err != nil { - return err - } - - files, err := ioutil.ReadDir(fromPath) - if err != nil { - return err - } - - for _, file := range files { - err = CopyPathToPath(path.Join(fromPath, file.Name()), path.Join(toPath, file.Name())) - if err != nil { - return err - } - } - } else { - var dst *os.File - dst, err = Create(toPath) - if err != nil { - return err - } - defer dst.Close() - - dst.Chmod(srcFileInfo.Mode()) - - src, err := os.Open(fromPath) - if err != nil { - return err - } - defer src.Close() - - _, err = io.Copy(dst, src) - if err != nil { - return err - } - } - return err -} diff --git a/cf/fileutils/fileutils/file_utils_test.go b/cf/fileutils/fileutils/file_utils_test.go deleted file mode 100644 index 9764ad348a0..00000000000 --- a/cf/fileutils/fileutils/file_utils_test.go +++ /dev/null @@ -1,165 +0,0 @@ -package fileutils_test - -import ( - "io/ioutil" - "os" - "path" - "path/filepath" - - "code.cloudfoundry.org/cli/cf/fileutils/fileutils" - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" -) - -var _ = Describe("Fileutils File", func() { - var fixturePath = filepath.Clean("../fixtures/fileutils/supervirus.zsh") - var fixtureBytes []byte - - BeforeEach(func() { - var err error - fixtureBytes, err = ioutil.ReadFile(fixturePath) - Expect(err).NotTo(HaveOccurred()) - }) - - Describe("Open", func() { - It("opens an existing file", func() { - fd, err := fileutils.Open(fixturePath) - Expect(err).NotTo(HaveOccurred()) - - fileBytes, err := ioutil.ReadAll(fd) - Expect(err).NotTo(HaveOccurred()) - fd.Close() - - Expect(fileBytes).To(Equal(fixtureBytes)) - }) - - It("creates a non-existing file and all intermediary directories", func() { - fd, err := ioutil.TempFile("", "open_test") - Expect(err).NotTo(HaveOccurred()) - - _, err = fd.WriteString("Never Gonna Give You Up") - Expect(err).NotTo(HaveOccurred()) - fd.Close() - - fileBytes, err := ioutil.ReadFile(fd.Name()) - Expect(err).NotTo(HaveOccurred()) - Expect(string(fileBytes)).To(Equal("Never Gonna Give You Up")) - }) - }) - - Describe("Create", func() { - It("truncates an existing file", func() { - tmpFile, err := ioutil.TempFile("", "create_test") - Expect(err).NotTo(HaveOccurred()) - _, err = tmpFile.WriteString("Never Gonna Give You Up") - Expect(err).NotTo(HaveOccurred()) - filePath := tmpFile.Name() - tmpFile.Close() - - fd, err := fileutils.Create(filePath) - Expect(err).NotTo(HaveOccurred()) - - fileBytes, err := ioutil.ReadAll(fd) - Expect(err).NotTo(HaveOccurred()) - Expect(len(fileBytes)).To(Equal(0)) - fd.Close() - }) - - It("creates a non-existing file and all intermediary directories", func() { - fd, err := ioutil.TempFile("", "create_test") - Expect(err).NotTo(HaveOccurred()) - - _, err = fd.WriteString("Never Gonna Let You Down") - Expect(err).NotTo(HaveOccurred()) - fd.Close() - - fileBytes, err := ioutil.ReadFile(fd.Name()) - Expect(err).NotTo(HaveOccurred()) - Expect(string(fileBytes)).To(Equal("Never Gonna Let You Down")) - }) - }) - - Describe("CopyPathToPath", func() { - Describe("when the source is a file", func() { - var destPath string - - BeforeEach(func() { - fd, err := ioutil.TempFile("", "copy_test") - Expect(err).NotTo(HaveOccurred()) - fd.Close() - destPath = fd.Name() - }) - - AfterEach(func() { - os.RemoveAll(destPath) - }) - - It("copies the file contents", func() { - err := fileutils.CopyPathToPath(fixturePath, destPath) - Expect(err).NotTo(HaveOccurred()) - fileBytes, err := ioutil.ReadFile(destPath) - Expect(err).NotTo(HaveOccurred()) - - fixtureBytes, err := ioutil.ReadFile(fixturePath) - Expect(err).NotTo(HaveOccurred()) - Expect(fileBytes).To(Equal(fixtureBytes)) - }) - - It("preserves the file mode", func() { - err := fileutils.CopyPathToPath(fixturePath, destPath) - Expect(err).NotTo(HaveOccurred()) - fileInfo, err := os.Stat(destPath) - Expect(err).NotTo(HaveOccurred()) - - expectedFileInfo, err := os.Stat(fixturePath) - Expect(err).NotTo(HaveOccurred()) - - Expect(fileInfo.Mode()).To(Equal(expectedFileInfo.Mode())) - }) - }) - - Describe("when the source is a directory", func() { - var dirPath, destPath string - - BeforeEach(func() { - dirPath = filepath.Join(filepath.Dir(fixturePath), "some-dir") - destPath = filepath.Join(filepath.Dir(fixturePath), "some-other-dir") - }) - - AfterEach(func() { - os.RemoveAll(destPath) - }) - - It("creates a directory at the destination path", func() { - err := fileutils.CopyPathToPath(dirPath, destPath) - Expect(err).NotTo(HaveOccurred()) - - fileInfo, err := os.Stat(destPath) - Expect(err).NotTo(HaveOccurred()) - Expect(fileInfo.IsDir()).To(BeTrue()) - }) - - It("copies all of the files from the src directory", func() { - err := fileutils.CopyPathToPath(dirPath, destPath) - Expect(err).NotTo(HaveOccurred()) - - fileInfo, err := os.Stat(path.Join(destPath, "some-file")) - Expect(err).NotTo(HaveOccurred()) - Expect(fileInfo.IsDir()).To(BeFalse()) - }) - - It("preserves the directory's mode", func() { - err := fileutils.CopyPathToPath(dirPath, destPath) - Expect(err).NotTo(HaveOccurred()) - - fileInfo, err := os.Stat(destPath) - Expect(err).NotTo(HaveOccurred()) - - expectedFileInfo, err := os.Stat(dirPath) - Expect(err).NotTo(HaveOccurred()) - - Expect(fileInfo.Mode()).To(Equal(expectedFileInfo.Mode())) - }) - }) - }) -}) diff --git a/cf/fileutils/fileutils/fileutils_suite_test.go b/cf/fileutils/fileutils/fileutils_suite_test.go deleted file mode 100644 index 1f160395b94..00000000000 --- a/cf/fileutils/fileutils/fileutils_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package fileutils_test - -import ( - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" - - "testing" -) - -func TestApp(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "File Utils Suite") -} diff --git a/cf/fileutils/fileutils/temp_utils.go b/cf/fileutils/fileutils/temp_utils.go deleted file mode 100644 index 4961a8d40b7..00000000000 --- a/cf/fileutils/fileutils/temp_utils.go +++ /dev/null @@ -1,27 +0,0 @@ -package fileutils - -import ( - "io/ioutil" - "os" -) - -func TempDir(namePrefix string, cb func(tmpDir string, err error)) { - tmpDir, err := ioutil.TempDir("", namePrefix) - - defer func() { - os.RemoveAll(tmpDir) - }() - - cb(tmpDir, err) -} - -func TempFile(namePrefix string, cb func(tmpFile *os.File, err error)) { - tmpFile, err := ioutil.TempFile("", namePrefix) - - defer func() { - tmpFile.Close() - os.Remove(tmpFile.Name()) - }() - - cb(tmpFile, err) -} diff --git a/cf/fileutils/fixtures/fileutils/some-dir/.gitkeep b/cf/fileutils/fixtures/fileutils/some-dir/.gitkeep deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/cf/fileutils/fixtures/fileutils/some-dir/some-file b/cf/fileutils/fixtures/fileutils/some-dir/some-file deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/cf/fileutils/fixtures/fileutils/supervirus.zsh b/cf/fileutils/fixtures/fileutils/supervirus.zsh deleted file mode 100644 index 0ab0fad7e7a..00000000000 --- a/cf/fileutils/fixtures/fileutils/supervirus.zsh +++ /dev/null @@ -1 +0,0 @@ -just kidding diff --git a/cf/fileutils/fixtures/some.config b/cf/fileutils/fixtures/some.config deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/cf/fileutils/fixtures/test_glob/some_directory/sub_dir/other_sub_dir/.gitkeep b/cf/fileutils/fixtures/test_glob/some_directory/sub_dir/other_sub_dir/.gitkeep deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/cf/fileutils/glob/README.md b/cf/fileutils/glob/README.md deleted file mode 100644 index c2f05fb3c27..00000000000 --- a/cf/fileutils/glob/README.md +++ /dev/null @@ -1,26 +0,0 @@ -glob.go and glob_test.go forked from doozerd (https://github.com/ha/doozerd) - -LICENCE -======= - - The MIT License - - Copyright (c) 2010 Blake Mizerany, Keith Rarick - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. diff --git a/cf/fileutils/glob/dir.go b/cf/fileutils/glob/dir.go deleted file mode 100644 index 45ca14fbb45..00000000000 --- a/cf/fileutils/glob/dir.go +++ /dev/null @@ -1,86 +0,0 @@ -package glob - -import ( - "errors" - "fmt" - "os" - "path" - "path/filepath" - "strings" -) - -type Dir interface { - Glob(patterns ...string) (filePaths []string, err error) -} - -type dir struct { - path string -} - -func NewDir(path string) (d Dir) { - return dir{path: path} -} - -func (d dir) Glob(patterns ...string) (filePaths []string, err error) { - for _, pattern := range patterns { - var newFiles []string - - newFiles, err = d.glob(pattern) - if err != nil { - err = wrapError(err, "Finding files matching pattern %s", pattern) - return - } - - filePaths = append(filePaths, newFiles...) - } - - return -} - -func (d dir) glob(pattern string) (files []string, err error) { - // unify path so that pattern will match files on Windows - unifiedPath := strings.TrimPrefix(filepath.ToSlash(d.path), filepath.VolumeName(d.path)) - globPattern := path.Join(unifiedPath, pattern) - - glob, err := CompileGlob(globPattern) - if err != nil { - err = wrapError(err, "Compiling glob for pattern %s", pattern) - return - } - - filepath.Walk(d.path, func(path string, info os.FileInfo, inErr error) (err error) { - path = strings.TrimPrefix(filepath.ToSlash(path), filepath.VolumeName(path)) - - if inErr != nil { - err = inErr - return - } - - if glob.Match(path) { - files = append(files, strings.Replace(path, unifiedPath+"/", "", 1)) - } - - return - }) - - // Ruby Dir.glob will include *.log when looking for **/*.log - // Our glob implementation will not do it automatically - if strings.Contains(pattern, "**/*") { - var extraFiles []string - - updatedPattern := strings.Replace(pattern, "**/*", "*", 1) - extraFiles, err = d.glob(updatedPattern) - if err != nil { - err = wrapError(err, "Recursing into pattern %s", updatedPattern) - return - } - - files = append(files, extraFiles...) - } - return -} - -func wrapError(err error, msg string, args ...interface{}) (newErr error) { - msg = fmt.Sprintf(msg, args...) - return errors.New(fmt.Sprintf("%s: %s", msg, err.Error())) -} diff --git a/cf/fileutils/glob/dir_test.go b/cf/fileutils/glob/dir_test.go deleted file mode 100644 index 2295e3b0ba2..00000000000 --- a/cf/fileutils/glob/dir_test.go +++ /dev/null @@ -1,68 +0,0 @@ -package glob - -import ( - "os" - "path/filepath" - "testing" -) - -func TestDirGlob(t *testing.T) { - fixturesDir := globFixturesDir() - dir := NewDir(fixturesDir) - patterns := []string{"**/*.stdout.log", "*.stderr.log", "../some.config", "some_directory/**/*"} - - filePaths, err := dir.Glob(patterns...) - if err != nil { - t.Fatalf("Expected No Error but got %v", err) - return - } - - // regular files - assertPathIsIncluded(t, filePaths, "app.stdout.log") - assertPathIsIncluded(t, filePaths, "app.stderr.log") - - // file in a directory - assertPathIsIncluded(t, filePaths, "other_logs/other_app.stdout.log") - - // file in a sub directory - assertPathIsIncluded(t, filePaths, "other_logs/more_logs/more.stdout.log") - - // directories - assertPathIsIncluded(t, filePaths, "some_directory/sub_dir") - assertPathIsIncluded(t, filePaths, "some_directory/sub_dir/other_sub_dir") - - // file that is not matching filter - assertPathIsExcluded(t, filePaths, "some_directory") - assertPathIsExcluded(t, filePaths, "other_logs/other_app.stderr.log") - assertPathIsExcluded(t, filePaths, "../some.config") -} - -func globFixturesDir() string { - pwd, _ := os.Getwd() - return filepath.Join(pwd, "..", "fixtures", "test_glob") -} - -func assertPathIsIncluded(t *testing.T, filePaths []string, includedPath string) { - found := findFile(filePaths, includedPath) - - if !found { - t.Errorf("Expected to find file path `%s`", includedPath) - } -} - -func assertPathIsExcluded(t *testing.T, filePaths []string, excludedPath string) { - found := findFile(filePaths, excludedPath) - - if found { - t.Errorf("Expected to NOT find file path `%s`", excludedPath) - } -} - -func findFile(filePaths []string, expectedPath string) bool { - for _, filePath := range filePaths { - if filePath == expectedPath { - return true - } - } - return false -} diff --git a/cf/fileutils/glob/glob.go b/cf/fileutils/glob/glob.go deleted file mode 100644 index b9fc6f8bb5b..00000000000 --- a/cf/fileutils/glob/glob.go +++ /dev/null @@ -1,100 +0,0 @@ -package glob - -import ( - "regexp" - "strings" -) - -// Glob holds a Unix-style glob pattern in a compiled form for efficient -// matching against paths. -// -// Glob notation: -// - `?` matches a single char in a single path component -// - `*` matches zero or more chars in a single path component -// - `**` matches zero or more chars in zero or more components -// - any other sequence matches itself -type Glob struct { - Pattern string // original glob pattern - s string // translated to regexp pattern - r *regexp.Regexp // compiled regexp -} - -var charPat = "[^/\\[\\]\\(\\)]" -var globRe = mustBuildRe(`(` + charPat + `|[\*\?])`) - -func mustBuildRe(p string) *regexp.Regexp { - return regexp.MustCompile(`^/$|^(/` + p + `+)+$`) -} - -// Supports unix/ruby-style glob patterns: -// - `?` matches a single char in a single path component -// - `*` matches zero or more chars in a single path component -// - `**` matches zero or more chars in zero or more components -func translateGlob(pat string) (string, error) { - if !globRe.MatchString(pat) { - return "", GlobError(pat) - } - - outs := make([]string, len(pat)) - i, double := 0, false - for _, c := range pat { - switch c { - default: - outs[i] = string(c) - double = false - case '.', '+', '-', '^', '$', '[', ']', '(', ')': - outs[i] = `\` + string(c) - double = false - case '?': - outs[i] = `[^/]` - double = false - case '*': - if double { - outs[i-1] = `.*` - } else { - outs[i] = `[^/]*` - } - double = !double - } - i++ - } - outs = outs[0:i] - - return "^" + strings.Join(outs, "") + "$", nil -} - -// CompileGlob translates pat into a form more convenient for -// matching against paths in the store. -func CompileGlob(pat string) (*Glob, error) { - s, err := translateGlob(pat) - if err != nil { - return nil, err - } - - r, err := regexp.Compile(s) - if err != nil { - return nil, err - } - - return &Glob{pat, s, r}, nil -} - -// MustCompileGlob is like CompileGlob, but it panics if an error occurs, -// simplifying safe initialization of global variables holding glob patterns. -func MustCompileGlob(pat string) *Glob { - g, err := CompileGlob(pat) - if err != nil { - panic(err) - } - return g -} - -func (g *Glob) Match(path string) bool { - return g.r.MatchString(path) -} - -type GlobError string - -func (e GlobError) Error() string { - return "invalid glob pattern: " + string(e) -} diff --git a/cf/fileutils/glob/glob_test.go b/cf/fileutils/glob/glob_test.go deleted file mode 100644 index bd74b09f4fa..00000000000 --- a/cf/fileutils/glob/glob_test.go +++ /dev/null @@ -1,110 +0,0 @@ -package glob - -import ( - "testing" -) - -var globs = [][]string{ - {"/", `^/$`}, - {"/a", `^/a$`}, - {"/a.b", `^/a\.b$`}, - {"/a-b", `^/a\-b$`}, - {"/a?", `^/a[^/]$`}, - {"/a/b", `^/a/b$`}, - {"/*", `^/[^/]*$`}, - {"/*/a", `^/[^/]*/a$`}, - {"/*a/b", `^/[^/]*a/b$`}, - {"/a*/b", `^/a[^/]*/b$`}, - {"/a*a/b", `^/a[^/]*a/b$`}, - {"/*a*/b", `^/[^/]*a[^/]*/b$`}, - {"/**", `^/.*$`}, - {"/**/a", `^/.*/a$`}, -} - -var matches = [][]string{ - {"/a/b", "/a/b"}, - {"/a?", "/ab", "/ac"}, - {"/a*", "/a", "/ab", "/abc"}, - {"/a**", "/a", "/ab", "/abc", "/a/", "/a/b", "/ab/c"}, -} - -var nonMatches = [][]string{ - {"/a/b", "/a/c", "/a/", "/a/b/", "/a/bc"}, - {"/a?", "/", "/abc", "/a", "/a/"}, - {"/a*", "/", "/a/", "/ba"}, - {"/a**", "/", "/ba"}, -} - -var dontCompile = []string{ - "", - "a", - "a/", - "//", - "/a/", - "/a[b", - "/a]b", - "/a(b", - "/a)b", -} - -func TestGlobTranslateOk(t *testing.T) { - for _, parts := range globs { - pat, exp := parts[0], parts[1] - got, err := translateGlob(pat) - if got != exp { - t.Errorf("expected %q, but got %q from %q", exp, got, pat) - } - if err != nil { - t.Errorf("in %q, unexpected err %v", pat, err) - } - } -} - -func TestGlobTranslateError(t *testing.T) { - for _, pat := range dontCompile { - re, err := translateGlob(pat) - if err == nil { - t.Errorf("pat %q shouldn't translate, but got %q", pat, re) - continue - } - - glob, err := CompileGlob(pat) - if err == nil { - t.Errorf("pat %q shouldn't compile, but got %#v", pat, glob) - } - } -} - -func TestGlobMatches(t *testing.T) { - for _, parts := range matches { - pat, paths := parts[0], parts[1:] - glob, err := CompileGlob(pat) - if err != nil { - t.Fatalf("Expected no error but got %v", err) - return - } - - for _, path := range paths { - if !glob.Match(path) { - t.Errorf("pat %q should match %q", pat, path) - } - } - } -} - -func TestGlobNonMatches(t *testing.T) { - for _, parts := range nonMatches { - pat, paths := parts[0], parts[1:] - glob, err := CompileGlob(pat) - if err != nil { - t.Fatalf("Expected no error but got %v", err) - return - } - - for _, path := range paths { - if glob.Match(path) { - t.Errorf("pat %q should not match %q", pat, path) - } - } - } -} diff --git a/cf/flagcontext/flag_content_helper_test.go b/cf/flagcontext/flag_content_helper_test.go index 22f2cca3344..c57324995b9 100644 --- a/cf/flagcontext/flag_content_helper_test.go +++ b/cf/flagcontext/flag_content_helper_test.go @@ -6,7 +6,7 @@ import ( "code.cloudfoundry.org/cli/cf/flagcontext" - "code.cloudfoundry.org/cli/cf/fileutils/fileutils" + "code.cloudfoundry.org/gofileutils/fileutils" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/cf/trace/logger_provider_test.go b/cf/trace/logger_provider_test.go index 4a23c10f5b2..2e1198fd443 100644 --- a/cf/trace/logger_provider_test.go +++ b/cf/trace/logger_provider_test.go @@ -5,8 +5,8 @@ import ( "path" "runtime" - "code.cloudfoundry.org/cli/cf/fileutils/fileutils" . "code.cloudfoundry.org/cli/cf/trace" + "code.cloudfoundry.org/gofileutils/fileutils" "os" diff --git a/go.mod b/go.mod index eb0923ba28f..cc38e8ad00b 100644 --- a/go.mod +++ b/go.mod @@ -10,6 +10,7 @@ require ( code.cloudfoundry.org/diego-ssh v0.0.0-20230810200140-af9d79fe9c82 code.cloudfoundry.org/go-log-cache/v2 v2.0.7 code.cloudfoundry.org/go-loggregator/v9 v9.2.0 + code.cloudfoundry.org/gofileutils v0.0.0-20170111115228-4d0c80011a0f code.cloudfoundry.org/jsonry v1.1.4 code.cloudfoundry.org/lager/v3 v3.0.2 code.cloudfoundry.org/tlsconfig v0.0.0-20230612153104-23c0622de227 diff --git a/go.sum b/go.sum index 2c54b8cb73b..d3a304136af 100644 --- a/go.sum +++ b/go.sum @@ -14,6 +14,8 @@ code.cloudfoundry.org/go-loggregator/v9 v9.2.0 h1:YNVD654RhMWzG195DZm0gNnrWAJJhE code.cloudfoundry.org/go-loggregator/v9 v9.2.0/go.mod h1:AP7PmrWSpyC9ltOQHcwF16BVkAVXS96i8+8gwI4lXRY= code.cloudfoundry.org/inigo v0.0.0-20230612153013-b300679e6ed6 h1:lhQNfVleRMX7dsZVZViC0gI9r/rwkO+esz06+HDCSu0= code.cloudfoundry.org/inigo v0.0.0-20230612153013-b300679e6ed6/go.mod h1:1ZB1JCh2FAp+SqX79ve6dc8YREvbsziULEOncAilX4Q= +code.cloudfoundry.org/gofileutils v0.0.0-20170111115228-4d0c80011a0f h1:UrKzEwTgeiff9vxdrfdqxibzpWjxLnuXDI5m6z3GJAk= +code.cloudfoundry.org/gofileutils v0.0.0-20170111115228-4d0c80011a0f/go.mod h1:sk5LnIjB/nIEU7yP5sDQExVm62wu0pBh3yrElngUisI= code.cloudfoundry.org/jsonry v1.1.4 h1:P9N7IlH1/4aRCLcXLgLFj1hkcBmV7muijJzY+K6U4hE= code.cloudfoundry.org/jsonry v1.1.4/go.mod h1:6aKilShQP7w/Ez76h1El2/n9y2OkHuU56nKSBB9Gp0A= code.cloudfoundry.org/lager v1.1.1-0.20191008172124-a9afc05ee5be/go.mod h1:O2sS7gKP3HM2iemG+EnwvyNQK7pTSC6Foi4QiMp9sSk= From 3fa869449f9c5ba49ff6af7d744ee56a8613c2a4 Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Tue, 19 Sep 2023 09:33:52 -0700 Subject: [PATCH 08/15] Revert "move https://github.com/cloudfoundry-incubator/cfnetworking-cli-api back to cli" This reverts commit 80e4086eee041127be22238e72633f34d5d331ab. --- .../fake_networking_client.go | 2 +- actor/cfnetworkingaction/networking_client.go | 2 +- actor/cfnetworkingaction/policy.go | 2 +- actor/cfnetworkingaction/policy_test.go | 2 +- .../cfnetv1/cfnetv1_suite_test.go | 56 -- .../cfnetv1fakes/fake_connection_wrapper.go | 162 ----- api/cfnetworking/cfnetv1/client.go | 138 ---- .../cfnetv1/connection_wrapper.go | 17 - api/cfnetworking/cfnetv1/internal/routes.go | 21 - api/cfnetworking/cfnetv1/policy.go | 105 --- api/cfnetworking/cfnetv1/policy_test.go | 339 ---------- api/cfnetworking/cfnetv1/ports.go | 6 - api/cfnetworking/cfnetv1/request.go | 70 -- api/cfnetworking/cfnetworking_suite_test.go | 35 - .../cfnetworkingfakes/fake_connection.go | 100 --- .../cfnetworkingfakes/fake_read_seeker.go | 176 ----- api/cfnetworking/connection.go | 8 - api/cfnetworking/errors.go | 64 -- api/cfnetworking/errors_test.go | 36 - .../networkerror/bad_request_error.go | 9 - .../networkerror/conflict_error.go | 9 - .../networkerror/error_response.go | 9 - .../networkerror/forbidden_error.go | 9 - .../networkerror/invalid_auth_token_error.go | 11 - .../networkerror/not_acceptable_error.go | 9 - .../networkerror/not_found_error.go | 10 - .../networkerror/raw_http_status_error.go | 14 - .../networkerror/request_error.go | 11 - .../ssl_validation_hostname_error.go | 13 - .../networkerror/unauthorized_error.go | 9 - .../networkerror/unexpected_response_error.go | 20 - .../networkerror/unverified_server_error.go | 11 - api/cfnetworking/networking_connection.go | 130 ---- .../networking_connection_test.go | 251 ------- api/cfnetworking/request.go | 35 - api/cfnetworking/response.go | 29 - api/cfnetworking/wrapper/request_logger.go | 156 ----- .../wrapper/request_logger_test.go | 328 ---------- api/cfnetworking/wrapper/retry_request.go | 54 -- .../wrapper/retry_request_test.go | 110 ---- .../wrapper/uaa_authentication.go | 81 --- .../wrapper/uaa_authentication_test.go | 174 ----- .../wrapper/util/in_memory_cache.go | 26 - .../wrapper/wrapper_suite_test.go | 36 - .../fake_request_logger_output.go | 613 ------------------ .../wrapper/wrapperfakes/fake_token_cache.go | 201 ------ .../wrapper/wrapperfakes/fake_uaaclient.go | 104 --- command/v7/shared/new_networking_client.go | 4 +- go.mod | 1 + go.sum | 2 + 50 files changed, 9 insertions(+), 3811 deletions(-) delete mode 100644 api/cfnetworking/cfnetv1/cfnetv1_suite_test.go delete mode 100644 api/cfnetworking/cfnetv1/cfnetv1fakes/fake_connection_wrapper.go delete mode 100644 api/cfnetworking/cfnetv1/client.go delete mode 100644 api/cfnetworking/cfnetv1/connection_wrapper.go delete mode 100644 api/cfnetworking/cfnetv1/internal/routes.go delete mode 100644 api/cfnetworking/cfnetv1/policy.go delete mode 100644 api/cfnetworking/cfnetv1/policy_test.go delete mode 100644 api/cfnetworking/cfnetv1/ports.go delete mode 100644 api/cfnetworking/cfnetv1/request.go delete mode 100644 api/cfnetworking/cfnetworking_suite_test.go delete mode 100644 api/cfnetworking/cfnetworkingfakes/fake_connection.go delete mode 100644 api/cfnetworking/cfnetworkingfakes/fake_read_seeker.go delete mode 100644 api/cfnetworking/connection.go delete mode 100644 api/cfnetworking/errors.go delete mode 100644 api/cfnetworking/errors_test.go delete mode 100644 api/cfnetworking/networkerror/bad_request_error.go delete mode 100644 api/cfnetworking/networkerror/conflict_error.go delete mode 100644 api/cfnetworking/networkerror/error_response.go delete mode 100644 api/cfnetworking/networkerror/forbidden_error.go delete mode 100644 api/cfnetworking/networkerror/invalid_auth_token_error.go delete mode 100644 api/cfnetworking/networkerror/not_acceptable_error.go delete mode 100644 api/cfnetworking/networkerror/not_found_error.go delete mode 100644 api/cfnetworking/networkerror/raw_http_status_error.go delete mode 100644 api/cfnetworking/networkerror/request_error.go delete mode 100644 api/cfnetworking/networkerror/ssl_validation_hostname_error.go delete mode 100644 api/cfnetworking/networkerror/unauthorized_error.go delete mode 100644 api/cfnetworking/networkerror/unexpected_response_error.go delete mode 100644 api/cfnetworking/networkerror/unverified_server_error.go delete mode 100644 api/cfnetworking/networking_connection.go delete mode 100644 api/cfnetworking/networking_connection_test.go delete mode 100644 api/cfnetworking/request.go delete mode 100644 api/cfnetworking/response.go delete mode 100644 api/cfnetworking/wrapper/request_logger.go delete mode 100644 api/cfnetworking/wrapper/request_logger_test.go delete mode 100644 api/cfnetworking/wrapper/retry_request.go delete mode 100644 api/cfnetworking/wrapper/retry_request_test.go delete mode 100644 api/cfnetworking/wrapper/uaa_authentication.go delete mode 100644 api/cfnetworking/wrapper/uaa_authentication_test.go delete mode 100644 api/cfnetworking/wrapper/util/in_memory_cache.go delete mode 100644 api/cfnetworking/wrapper/wrapper_suite_test.go delete mode 100644 api/cfnetworking/wrapper/wrapperfakes/fake_request_logger_output.go delete mode 100644 api/cfnetworking/wrapper/wrapperfakes/fake_token_cache.go delete mode 100644 api/cfnetworking/wrapper/wrapperfakes/fake_uaaclient.go diff --git a/actor/cfnetworkingaction/cfnetworkingactionfakes/fake_networking_client.go b/actor/cfnetworkingaction/cfnetworkingactionfakes/fake_networking_client.go index e0dd1dc55f7..ce5fc06a3e2 100644 --- a/actor/cfnetworkingaction/cfnetworkingactionfakes/fake_networking_client.go +++ b/actor/cfnetworkingaction/cfnetworkingactionfakes/fake_networking_client.go @@ -4,7 +4,7 @@ package cfnetworkingactionfakes import ( "sync" - "code.cloudfoundry.org/cli/api/cfnetworking/cfnetv1" + "code.cloudfoundry.org/cfnetworking-cli-api/cfnetworking/cfnetv1" "code.cloudfoundry.org/cli/actor/cfnetworkingaction" ) diff --git a/actor/cfnetworkingaction/networking_client.go b/actor/cfnetworkingaction/networking_client.go index ad404a01b51..46fe668573a 100644 --- a/actor/cfnetworkingaction/networking_client.go +++ b/actor/cfnetworkingaction/networking_client.go @@ -1,6 +1,6 @@ package cfnetworkingaction -import "code.cloudfoundry.org/cli/api/cfnetworking/cfnetv1" +import "code.cloudfoundry.org/cfnetworking-cli-api/cfnetworking/cfnetv1" //go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . NetworkingClient diff --git a/actor/cfnetworkingaction/policy.go b/actor/cfnetworkingaction/policy.go index 8aca6747a1f..a0e44b246ed 100644 --- a/actor/cfnetworkingaction/policy.go +++ b/actor/cfnetworkingaction/policy.go @@ -1,8 +1,8 @@ package cfnetworkingaction import ( + "code.cloudfoundry.org/cfnetworking-cli-api/cfnetworking/cfnetv1" "code.cloudfoundry.org/cli/actor/actionerror" - "code.cloudfoundry.org/cli/api/cfnetworking/cfnetv1" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" "code.cloudfoundry.org/cli/resources" diff --git a/actor/cfnetworkingaction/policy_test.go b/actor/cfnetworkingaction/policy_test.go index 3325f4505d9..539a7aab427 100644 --- a/actor/cfnetworkingaction/policy_test.go +++ b/actor/cfnetworkingaction/policy_test.go @@ -9,10 +9,10 @@ import ( "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/util/batcher" + "code.cloudfoundry.org/cfnetworking-cli-api/cfnetworking/cfnetv1" "code.cloudfoundry.org/cli/actor/actionerror" . "code.cloudfoundry.org/cli/actor/cfnetworkingaction" "code.cloudfoundry.org/cli/actor/cfnetworkingaction/cfnetworkingactionfakes" - "code.cloudfoundry.org/cli/api/cfnetworking/cfnetv1" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/api/cfnetworking/cfnetv1/cfnetv1_suite_test.go b/api/cfnetworking/cfnetv1/cfnetv1_suite_test.go deleted file mode 100644 index d2eb5339351..00000000000 --- a/api/cfnetworking/cfnetv1/cfnetv1_suite_test.go +++ /dev/null @@ -1,56 +0,0 @@ -package cfnetv1_test - -import ( - "bytes" - "log" - - . "code.cloudfoundry.org/cli/api/cfnetworking/cfnetv1" - - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" - . "github.com/onsi/gomega/ghttp" - - "testing" -) - -func TestCFNetV1(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "CF Networking V1 Client Suite") -} - -var server *Server - -var _ = SynchronizedBeforeSuite(func() []byte { - return []byte{} -}, func(data []byte) { - server = NewTLSServer() - - // Suppresses ginkgo server logs - server.HTTPTestServer.Config.ErrorLog = log.New(&bytes.Buffer{}, "", 0) -}) - -var _ = SynchronizedAfterSuite(func() { - server.Close() -}, func() {}) - -var _ = BeforeEach(func() { - server.Reset() -}) - -func NewTestClient(passed ...Config) *Client { - var config Config - if len(passed) > 0 { - config = passed[0] - } else { - config = Config{} - } - config.AppName = "CF Networking V1 Test" - config.AppVersion = "Unknown" - config.SkipSSLValidation = true - - if config.URL == "" { - config.URL = server.URL() - } - - return NewClient(config) -} diff --git a/api/cfnetworking/cfnetv1/cfnetv1fakes/fake_connection_wrapper.go b/api/cfnetworking/cfnetv1/cfnetv1fakes/fake_connection_wrapper.go deleted file mode 100644 index 39b81985e8a..00000000000 --- a/api/cfnetworking/cfnetv1/cfnetv1fakes/fake_connection_wrapper.go +++ /dev/null @@ -1,162 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package cfnetv1fakes - -import ( - "sync" - - "code.cloudfoundry.org/cli/api/cfnetworking" - "code.cloudfoundry.org/cli/api/cfnetworking/cfnetv1" -) - -type FakeConnectionWrapper struct { - MakeStub func(request *cfnetworking.Request, passedResponse *cfnetworking.Response) error - makeMutex sync.RWMutex - makeArgsForCall []struct { - request *cfnetworking.Request - passedResponse *cfnetworking.Response - } - makeReturns struct { - result1 error - } - makeReturnsOnCall map[int]struct { - result1 error - } - WrapStub func(innerconnection cfnetworking.Connection) cfnetworking.Connection - wrapMutex sync.RWMutex - wrapArgsForCall []struct { - innerconnection cfnetworking.Connection - } - wrapReturns struct { - result1 cfnetworking.Connection - } - wrapReturnsOnCall map[int]struct { - result1 cfnetworking.Connection - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeConnectionWrapper) Make(request *cfnetworking.Request, passedResponse *cfnetworking.Response) error { - fake.makeMutex.Lock() - ret, specificReturn := fake.makeReturnsOnCall[len(fake.makeArgsForCall)] - fake.makeArgsForCall = append(fake.makeArgsForCall, struct { - request *cfnetworking.Request - passedResponse *cfnetworking.Response - }{request, passedResponse}) - fake.recordInvocation("Make", []interface{}{request, passedResponse}) - fake.makeMutex.Unlock() - if fake.MakeStub != nil { - return fake.MakeStub(request, passedResponse) - } - if specificReturn { - return ret.result1 - } - return fake.makeReturns.result1 -} - -func (fake *FakeConnectionWrapper) MakeCallCount() int { - fake.makeMutex.RLock() - defer fake.makeMutex.RUnlock() - return len(fake.makeArgsForCall) -} - -func (fake *FakeConnectionWrapper) MakeArgsForCall(i int) (*cfnetworking.Request, *cfnetworking.Response) { - fake.makeMutex.RLock() - defer fake.makeMutex.RUnlock() - return fake.makeArgsForCall[i].request, fake.makeArgsForCall[i].passedResponse -} - -func (fake *FakeConnectionWrapper) MakeReturns(result1 error) { - fake.MakeStub = nil - fake.makeReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeConnectionWrapper) MakeReturnsOnCall(i int, result1 error) { - fake.MakeStub = nil - if fake.makeReturnsOnCall == nil { - fake.makeReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.makeReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeConnectionWrapper) Wrap(innerconnection cfnetworking.Connection) cfnetworking.Connection { - fake.wrapMutex.Lock() - ret, specificReturn := fake.wrapReturnsOnCall[len(fake.wrapArgsForCall)] - fake.wrapArgsForCall = append(fake.wrapArgsForCall, struct { - innerconnection cfnetworking.Connection - }{innerconnection}) - fake.recordInvocation("Wrap", []interface{}{innerconnection}) - fake.wrapMutex.Unlock() - if fake.WrapStub != nil { - return fake.WrapStub(innerconnection) - } - if specificReturn { - return ret.result1 - } - return fake.wrapReturns.result1 -} - -func (fake *FakeConnectionWrapper) WrapCallCount() int { - fake.wrapMutex.RLock() - defer fake.wrapMutex.RUnlock() - return len(fake.wrapArgsForCall) -} - -func (fake *FakeConnectionWrapper) WrapArgsForCall(i int) cfnetworking.Connection { - fake.wrapMutex.RLock() - defer fake.wrapMutex.RUnlock() - return fake.wrapArgsForCall[i].innerconnection -} - -func (fake *FakeConnectionWrapper) WrapReturns(result1 cfnetworking.Connection) { - fake.WrapStub = nil - fake.wrapReturns = struct { - result1 cfnetworking.Connection - }{result1} -} - -func (fake *FakeConnectionWrapper) WrapReturnsOnCall(i int, result1 cfnetworking.Connection) { - fake.WrapStub = nil - if fake.wrapReturnsOnCall == nil { - fake.wrapReturnsOnCall = make(map[int]struct { - result1 cfnetworking.Connection - }) - } - fake.wrapReturnsOnCall[i] = struct { - result1 cfnetworking.Connection - }{result1} -} - -func (fake *FakeConnectionWrapper) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.makeMutex.RLock() - defer fake.makeMutex.RUnlock() - fake.wrapMutex.RLock() - defer fake.wrapMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeConnectionWrapper) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ cfnetv1.ConnectionWrapper = new(FakeConnectionWrapper) diff --git a/api/cfnetworking/cfnetv1/client.go b/api/cfnetworking/cfnetv1/client.go deleted file mode 100644 index 5c2f36020cd..00000000000 --- a/api/cfnetworking/cfnetv1/client.go +++ /dev/null @@ -1,138 +0,0 @@ -// Package cfnetv1 represents a CF Networking V1 client. -// -// These sets of packages are still under development/pre-pre-pre...alpha. Use -// at your own risk! Functionality and design may change without warning. -// -// For more information on the CF Networking API see -// https://github.com/cloudfoundry-incubator/cf-networking-release/blob/develop/docs/API.md -// -// # Method Naming Conventions -// -// The client takes a '' -// approach to method names. If the and -// are similar, they do not need to be repeated. If a GUID is required for the -// , the pluralization is removed from said endpoint in the -// method name. -// -// For Example: -// -// Method Name: GetApplication -// Endpoint: /v2/applications/:guid -// Action Name: Get -// Top Level Endpoint: applications -// Return Value: Application -// -// Method Name: GetServiceInstances -// Endpoint: /v2/service_instances -// Action Name: Get -// Top Level Endpoint: service_instances -// Return Value: []ServiceInstance -// -// Method Name: GetSpaceServiceInstances -// Endpoint: /v2/spaces/:guid/service_instances -// Action Name: Get -// Top Level Endpoint: spaces -// Return Value: []ServiceInstance -// -// Use the following table to determine which HTTP Command equates to which -// Action Name: -// -// HTTP Command -> Action Name -// POST -> Create -// GET -> Get -// PUT -> Update -// DELETE -> Delete -// -// # Method Locations -// -// Methods exist in the same file as their return type, regardless of which -// endpoint they use. -// -// # Error Handling -// -// All error handling that requires parsing the error_code/code returned back -// from the Cloud Controller should be placed in the errorWrapper. Everything -// else can be handled in the individual operations. All parsed cloud -// controller errors should exist in errors.go, all generic HTTP errors should -// exist in the cloudcontroller's errors.go. Errors related to the individaul -// operation should exist at the top of that operation's file. -// -// # No inline-relations-depth And summary Endpoints -// -// This package will not use ever use 'inline-relations-depth' or the -// '/summary' endpoints for any operations. These requests can be extremely -// taxing on the Cloud Controller and are avoided at all costs. Additionally, -// the objects returned back from these requests can become extremely -// inconsistant across versions and are problematic to deal with in general. -package cfnetv1 - -import ( - "fmt" - "runtime" - "time" - - "code.cloudfoundry.org/cli/api/cfnetworking" - "code.cloudfoundry.org/cli/api/cfnetworking/cfnetv1/internal" - - "github.com/tedsuo/rata" -) - -// Client is a client that can be used to talk to a CF Networking API. -type Client struct { - connection cfnetworking.Connection - router *rata.RequestGenerator - url string - userAgent string -} - -// Config allows the Client to be configured -type Config struct { - // AppName is the name of the application/process using the client. - AppName string - - // AppVersion is the version of the application/process using the client. - AppVersion string - - // DialTimeout is the DNS timeout used to make all requests to the Cloud - // Controller. - DialTimeout time.Duration - - // SkipSSLValidation controls whether a client verifies the server's - // certificate chain and host name. If SkipSSLValidation is true, TLS accepts - // any certificate presented by the server and any host name in that - // certificate for *all* client requests going forward. - // - // In this mode, TLS is susceptible to man-in-the-middle attacks. This should - // be used only for testing. - SkipSSLValidation bool - - // URL is a fully qualified URL to the CF Networking API. - URL string - - // Wrappers that apply to the client connection. - Wrappers []ConnectionWrapper -} - -// NewClient returns a new CF Networking client. -func NewClient(config Config) *Client { - userAgent := fmt.Sprintf("%s/%s (%s; %s %s)", config.AppName, config.AppVersion, runtime.Version(), runtime.GOARCH, runtime.GOOS) - - connection := cfnetworking.NewConnection(cfnetworking.Config{ - DialTimeout: config.DialTimeout, - SkipSSLValidation: config.SkipSSLValidation, - }) - - wrappedConnection := cfnetworking.NewErrorWrapper().Wrap(connection) - for _, wrapper := range config.Wrappers { - wrappedConnection = wrapper.Wrap(wrappedConnection) - } - - client := &Client{ - connection: wrappedConnection, - router: rata.NewRequestGenerator(config.URL, internal.Routes), - url: config.URL, - userAgent: userAgent, - } - - return client -} diff --git a/api/cfnetworking/cfnetv1/connection_wrapper.go b/api/cfnetworking/cfnetv1/connection_wrapper.go deleted file mode 100644 index 495d5f88272..00000000000 --- a/api/cfnetworking/cfnetv1/connection_wrapper.go +++ /dev/null @@ -1,17 +0,0 @@ -package cfnetv1 - -import "code.cloudfoundry.org/cli/api/cfnetworking" - -//go:generate counterfeiter . ConnectionWrapper - -// ConnectionWrapper can wrap a given connection allowing the wrapper to modify -// all requests going in and out of the given connection. -type ConnectionWrapper interface { - cfnetworking.Connection - Wrap(innerconnection cfnetworking.Connection) cfnetworking.Connection -} - -// WrapConnection wraps the current Client connection in the wrapper. -func (client *Client) WrapConnection(wrapper ConnectionWrapper) { - client.connection = wrapper.Wrap(client.connection) -} diff --git a/api/cfnetworking/cfnetv1/internal/routes.go b/api/cfnetworking/cfnetv1/internal/routes.go deleted file mode 100644 index 69cf937ca4f..00000000000 --- a/api/cfnetworking/cfnetv1/internal/routes.go +++ /dev/null @@ -1,21 +0,0 @@ -package internal - -import ( - "net/http" - - "github.com/tedsuo/rata" -) - -const ( - CreatePolicies = "PostPolicies" - DeletePolicies = "DeletePolicies" - ListPolicies = "ListPolicies" -) - -// Routes is a list of routes used by the rata library to construct request -// URLs. -var Routes = rata.Routes{ - {Path: "/policies", Method: http.MethodPost, Name: CreatePolicies}, - {Path: "/policies/delete", Method: http.MethodPost, Name: DeletePolicies}, - {Path: "/policies", Method: http.MethodGet, Name: ListPolicies}, -} diff --git a/api/cfnetworking/cfnetv1/policy.go b/api/cfnetworking/cfnetv1/policy.go deleted file mode 100644 index bc3a814b061..00000000000 --- a/api/cfnetworking/cfnetv1/policy.go +++ /dev/null @@ -1,105 +0,0 @@ -package cfnetv1 - -import ( - "bytes" - "encoding/json" - - "strings" - - "code.cloudfoundry.org/cli/api/cfnetworking" - "code.cloudfoundry.org/cli/api/cfnetworking/cfnetv1/internal" -) - -type PolicyProtocol string - -const ( - PolicyProtocolTCP PolicyProtocol = "tcp" - PolicyProtocolUDP PolicyProtocol = "udp" -) - -type PolicyList struct { - TotalPolicies int `json:"total_policies,omitempty"` - Policies []Policy `json:"policies"` -} - -type Policy struct { - Source PolicySource `json:"source"` - Destination PolicyDestination `json:"destination"` -} - -type PolicySource struct { - ID string `json:"id"` -} - -type PolicyDestination struct { - ID string `json:"id"` - Protocol PolicyProtocol `json:"protocol"` - Ports Ports `json:"ports"` -} - -// CreatePolicies will create the network policy with the given parameters. -func (client Client) CreatePolicies(policies []Policy) error { - rawJSON, err := json.Marshal(PolicyList{Policies: policies}) - if err != nil { - return err - } - - request, err := client.newHTTPRequest(requestOptions{ - RequestName: internal.CreatePolicies, - Body: bytes.NewReader(rawJSON), - }) - if err != nil { - return err - } - - return client.connection.Make(request, &cfnetworking.Response{}) -} - -// ListPolicies will list the policies with the app guids in either the source or destination. -func (client Client) ListPolicies(appGUIDs ...string) ([]Policy, error) { - var request *cfnetworking.Request - var err error - if len(appGUIDs) == 0 { - request, err = client.newHTTPRequest(requestOptions{ - RequestName: internal.ListPolicies, - }) - } else { - request, err = client.newHTTPRequest(requestOptions{ - RequestName: internal.ListPolicies, - Query: map[string][]string{ - "id": {strings.Join(appGUIDs, ",")}, - }, - }) - } - if err != nil { - return []Policy{}, err - } - - policies := PolicyList{} - response := &cfnetworking.Response{} - - err = client.connection.Make(request, response) - if err != nil { - return []Policy{}, err - } - - err = json.Unmarshal(response.RawResponse, &policies) - if err != nil { - return []Policy{}, err - } - - return policies.Policies, nil -} - -// RemovePolicies will remove the network policy with the given parameters. -func (client Client) RemovePolicies(policies []Policy) error { - rawJSON, err := json.Marshal(PolicyList{Policies: policies}) - if err != nil { - return err - } - request, err := client.newHTTPRequest(requestOptions{ - RequestName: internal.DeletePolicies, - Body: bytes.NewReader(rawJSON), - }) - return client.connection.Make(request, &cfnetworking.Response{}) -} diff --git a/api/cfnetworking/cfnetv1/policy_test.go b/api/cfnetworking/cfnetv1/policy_test.go deleted file mode 100644 index 1a214cb6031..00000000000 --- a/api/cfnetworking/cfnetv1/policy_test.go +++ /dev/null @@ -1,339 +0,0 @@ -package cfnetv1_test - -import ( - "net/http" - - . "code.cloudfoundry.org/cli/api/cfnetworking/cfnetv1" - "code.cloudfoundry.org/cli/api/cfnetworking/networkerror" - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" - . "github.com/onsi/gomega/ghttp" -) - -var _ = Describe("Policy", func() { - var client *Client - BeforeEach(func() { - client = NewTestClient() - }) - - Describe("CreatePolicies", func() { - Context("when the stack is found", func() { - BeforeEach(func() { - expectedBody := `{ - "policies": [ - { - "source": { - "id": "source-id-1" - }, - "destination": { - "id": "destination-id-1", - "protocol": "tcp", - "ports": { - "start": 1234, - "end": 1235 - } - } - }, - { - "source": { - "id": "source-id-2" - }, - "destination": { - "id": "destination-id-2", - "protocol": "udp", - "ports": { - "start": 1234, - "end": 1235 - } - } - } - ] - }` - server.AppendHandlers( - CombineHandlers( - VerifyRequest(http.MethodPost, "/policies"), - VerifyJSON(expectedBody), - RespondWith(http.StatusOK, ""), - ), - ) - }) - - It("passes the body correctly", func() { - err := client.CreatePolicies([]Policy{ - { - Source: PolicySource{ - ID: "source-id-1", - }, - Destination: PolicyDestination{ - ID: "destination-id-1", - Protocol: PolicyProtocolTCP, - Ports: Ports{ - Start: 1234, - End: 1235, - }, - }, - }, - { - Source: PolicySource{ - ID: "source-id-2", - }, - Destination: PolicyDestination{ - ID: "destination-id-2", - Protocol: PolicyProtocolUDP, - Ports: Ports{ - Start: 1234, - End: 1235, - }, - }, - }, - }) - Expect(err).ToNot(HaveOccurred()) - Expect(server.ReceivedRequests()).To(HaveLen(1)) - }) - }) - - Context("when the client returns an error", func() { - BeforeEach(func() { - response := `{ - "error": "Oh Noes" - }` - server.AppendHandlers( - CombineHandlers( - VerifyRequest(http.MethodPost, "/policies"), - RespondWith(http.StatusBadRequest, response), - ), - ) - }) - - It("returns the error and warnings", func() { - err := client.CreatePolicies(nil) - Expect(err).To(MatchError(networkerror.BadRequestError{ - Message: "Oh Noes", - })) - }) - }) - }) - - Describe("ListPolicies", func() { - var expectedPolicies []Policy - Context("when the policies are found", func() { - BeforeEach(func() { - response := `{ - "policies": [ - { - "source": { - "id": "source-id-1" - }, - "destination": { - "id": "destination-id-1", - "protocol": "tcp", - "ports": { - "start": 1234, - "end": 1235 - } - } - }, - { - "source": { - "id": "source-id-2" - }, - "destination": { - "id": "destination-id-2", - "protocol": "tcp", - "ports": { - "start": 4321, - "end": 5321 - } - } - } - ] - }` - server.AppendHandlers( - CombineHandlers( - VerifyRequest(http.MethodGet, "/policies"), - RespondWith(http.StatusOK, response), - ), - ) - expectedPolicies = []Policy{ - { - Source: PolicySource{ - ID: "source-id-1", - }, - Destination: PolicyDestination{ - ID: "destination-id-1", - Protocol: "tcp", - Ports: Ports{ - Start: 1234, - End: 1235, - }, - }, - }, - { - Source: PolicySource{ - ID: "source-id-2", - }, - Destination: PolicyDestination{ - ID: "destination-id-2", - Protocol: "tcp", - Ports: Ports{ - Start: 4321, - End: 5321, - }, - }, - }, - } - }) - - It("returns the policies correctly", func() { - policies, err := client.ListPolicies() - Expect(policies).To(Equal(expectedPolicies)) - Expect(err).ToNot(HaveOccurred()) - Expect(server.ReceivedRequests()).To(HaveLen(1)) - }) - - Context("when an app guid is passed", func() { - It("makes the query correctly", func() { - policies, err := client.ListPolicies("source-id-1") - Expect(policies).To(Equal(expectedPolicies)) - Expect(err).ToNot(HaveOccurred()) - - requests := server.ReceivedRequests() - Expect(requests).To(HaveLen(1)) - Expect(requests[0].RequestURI).To(Equal("/policies?id=source-id-1")) - }) - }) - - Context("when multiple app guid are passed", func() { - It("makes the query correctly", func() { - policies, err := client.ListPolicies("source-id-1", "source-id-2") - Expect(policies).To(Equal(expectedPolicies)) - Expect(err).ToNot(HaveOccurred()) - - requests := server.ReceivedRequests() - Expect(requests).To(HaveLen(1)) - Expect(requests[0].RequestURI).To(Equal("/policies?id=source-id-1%2Csource-id-2")) - }) - }) - - }) - - Context("when the client returns an error", func() { - BeforeEach(func() { - response := `{ - "error": "Oh Noes" - }` - server.AppendHandlers( - CombineHandlers( - VerifyRequest(http.MethodGet, "/policies"), - RespondWith(http.StatusBadRequest, response), - ), - ) - }) - - It("returns the error", func() { - _, err := client.ListPolicies() - Expect(err).To(MatchError(networkerror.BadRequestError{ - Message: "Oh Noes", - })) - }) - }) - }) - - Describe("RemovePolicies", func() { - Context("when the policy is found", func() { - BeforeEach(func() { - expectedBody := `{ - "policies": [ - { - "source": { - "id": "source-id-1" - }, - "destination": { - "id": "destination-id-1", - "protocol": "tcp", - "ports": { - "start": 1234, - "end": 1235 - } - } - }, - { - "source": { - "id": "source-id-2" - }, - "destination": { - "id": "destination-id-2", - "protocol": "udp", - "ports": { - "start": 1234, - "end": 1235 - } - } - } - ] - }` - server.AppendHandlers( - CombineHandlers( - VerifyRequest(http.MethodPost, "/policies/delete"), - VerifyJSON(expectedBody), - RespondWith(http.StatusOK, ""), - ), - ) - }) - - It("passes the body correctly", func() { - err := client.RemovePolicies([]Policy{ - { - Source: PolicySource{ - ID: "source-id-1", - }, - Destination: PolicyDestination{ - ID: "destination-id-1", - Protocol: PolicyProtocolTCP, - Ports: Ports{ - Start: 1234, - End: 1235, - }, - }, - }, - { - Source: PolicySource{ - ID: "source-id-2", - }, - Destination: PolicyDestination{ - ID: "destination-id-2", - Protocol: PolicyProtocolUDP, - Ports: Ports{ - Start: 1234, - End: 1235, - }, - }, - }, - }) - Expect(err).ToNot(HaveOccurred()) - Expect(server.ReceivedRequests()).To(HaveLen(1)) - }) - }) - - Context("when the client returns an error", func() { - BeforeEach(func() { - response := `{ - "error": "Oh Noes" - }` - server.AppendHandlers( - CombineHandlers( - VerifyRequest(http.MethodPost, "/policies/delete"), - RespondWith(http.StatusBadRequest, response), - ), - ) - }) - - It("returns the error", func() { - err := client.RemovePolicies(nil) - Expect(err).To(MatchError(networkerror.BadRequestError{ - Message: "Oh Noes", - })) - }) - }) - }) -}) diff --git a/api/cfnetworking/cfnetv1/ports.go b/api/cfnetworking/cfnetv1/ports.go deleted file mode 100644 index d684f64418b..00000000000 --- a/api/cfnetworking/cfnetv1/ports.go +++ /dev/null @@ -1,6 +0,0 @@ -package cfnetv1 - -type Ports struct { - Start int `json:"start"` - End int `json:"end"` -} diff --git a/api/cfnetworking/cfnetv1/request.go b/api/cfnetworking/cfnetv1/request.go deleted file mode 100644 index 1160e84be47..00000000000 --- a/api/cfnetworking/cfnetv1/request.go +++ /dev/null @@ -1,70 +0,0 @@ -package cfnetv1 - -import ( - "fmt" - "io" - "net/http" - "net/url" - - "code.cloudfoundry.org/cli/api/cfnetworking" -) - -// Params represents URI parameters for a request. -type Params map[string]string - -// requestOptions contains all the options to create an HTTP request. -type requestOptions struct { - // URIParams are the list URI route parameters - URIParams Params - - // Query is a list of HTTP query parameters - Query url.Values - - // RequestName is the name of the request (see routes) - RequestName string - - // URI is the URI of the request. - URI string - // Method is the HTTP method of the request. - Method string - - // Body is the request body - Body io.ReadSeeker -} - -// newHTTPRequest returns a constructed HTTP.Request with some defaults. -// Defaults are applied when Request fields are not filled in. -func (client Client) newHTTPRequest(passedRequest requestOptions) (*cfnetworking.Request, error) { - var request *http.Request - var err error - if passedRequest.URI != "" { - request, err = http.NewRequest( - passedRequest.Method, - fmt.Sprintf("%s%s", client.url, passedRequest.URI), - passedRequest.Body, - ) - } else { - request, err = client.router.CreateRequest( - passedRequest.RequestName, - map[string]string(passedRequest.URIParams), - passedRequest.Body, - ) - if err == nil { - request.URL.RawQuery = passedRequest.Query.Encode() - } - } - if err != nil { - return nil, err - } - - request.Header = http.Header{} - request.Header.Set("Accept", "application/json") - request.Header.Set("User-Agent", client.userAgent) - - if passedRequest.Body != nil { - request.Header.Set("Content-Type", "application/json") - } - - // Make sure the body is the same as the one in the request - return cfnetworking.NewRequest(request, passedRequest.Body), nil -} diff --git a/api/cfnetworking/cfnetworking_suite_test.go b/api/cfnetworking/cfnetworking_suite_test.go deleted file mode 100644 index b434160e526..00000000000 --- a/api/cfnetworking/cfnetworking_suite_test.go +++ /dev/null @@ -1,35 +0,0 @@ -package cfnetworking_test - -import ( - "bytes" - "log" - "testing" - - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" - . "github.com/onsi/gomega/ghttp" -) - -func TestUaa(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "CF Networking Suite") -} - -var server *Server - -var _ = SynchronizedBeforeSuite(func() []byte { - return []byte{} -}, func(data []byte) { - server = NewTLSServer() - - // Suppresses ginkgo server logs - server.HTTPTestServer.Config.ErrorLog = log.New(&bytes.Buffer{}, "", 0) -}) - -var _ = SynchronizedAfterSuite(func() { - server.Close() -}, func() {}) - -var _ = BeforeEach(func() { - server.Reset() -}) diff --git a/api/cfnetworking/cfnetworkingfakes/fake_connection.go b/api/cfnetworking/cfnetworkingfakes/fake_connection.go deleted file mode 100644 index a4ed6f0255e..00000000000 --- a/api/cfnetworking/cfnetworkingfakes/fake_connection.go +++ /dev/null @@ -1,100 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package cfnetworkingfakes - -import ( - "sync" - - "code.cloudfoundry.org/cli/api/cfnetworking" -) - -type FakeConnection struct { - MakeStub func(request *cfnetworking.Request, passedResponse *cfnetworking.Response) error - makeMutex sync.RWMutex - makeArgsForCall []struct { - request *cfnetworking.Request - passedResponse *cfnetworking.Response - } - makeReturns struct { - result1 error - } - makeReturnsOnCall map[int]struct { - result1 error - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeConnection) Make(request *cfnetworking.Request, passedResponse *cfnetworking.Response) error { - fake.makeMutex.Lock() - ret, specificReturn := fake.makeReturnsOnCall[len(fake.makeArgsForCall)] - fake.makeArgsForCall = append(fake.makeArgsForCall, struct { - request *cfnetworking.Request - passedResponse *cfnetworking.Response - }{request, passedResponse}) - fake.recordInvocation("Make", []interface{}{request, passedResponse}) - fake.makeMutex.Unlock() - if fake.MakeStub != nil { - return fake.MakeStub(request, passedResponse) - } - if specificReturn { - return ret.result1 - } - return fake.makeReturns.result1 -} - -func (fake *FakeConnection) MakeCallCount() int { - fake.makeMutex.RLock() - defer fake.makeMutex.RUnlock() - return len(fake.makeArgsForCall) -} - -func (fake *FakeConnection) MakeArgsForCall(i int) (*cfnetworking.Request, *cfnetworking.Response) { - fake.makeMutex.RLock() - defer fake.makeMutex.RUnlock() - return fake.makeArgsForCall[i].request, fake.makeArgsForCall[i].passedResponse -} - -func (fake *FakeConnection) MakeReturns(result1 error) { - fake.MakeStub = nil - fake.makeReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeConnection) MakeReturnsOnCall(i int, result1 error) { - fake.MakeStub = nil - if fake.makeReturnsOnCall == nil { - fake.makeReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.makeReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeConnection) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.makeMutex.RLock() - defer fake.makeMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeConnection) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ cfnetworking.Connection = new(FakeConnection) diff --git a/api/cfnetworking/cfnetworkingfakes/fake_read_seeker.go b/api/cfnetworking/cfnetworkingfakes/fake_read_seeker.go deleted file mode 100644 index e2aa7f91bac..00000000000 --- a/api/cfnetworking/cfnetworkingfakes/fake_read_seeker.go +++ /dev/null @@ -1,176 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package cfnetworkingfakes - -import ( - "sync" - - "code.cloudfoundry.org/cli/api/cfnetworking" -) - -type FakeReadSeeker struct { - ReadStub func(p []byte) (n int, err error) - readMutex sync.RWMutex - readArgsForCall []struct { - p []byte - } - readReturns struct { - result1 int - result2 error - } - readReturnsOnCall map[int]struct { - result1 int - result2 error - } - SeekStub func(offset int64, whence int) (int64, error) - seekMutex sync.RWMutex - seekArgsForCall []struct { - offset int64 - whence int - } - seekReturns struct { - result1 int64 - result2 error - } - seekReturnsOnCall map[int]struct { - result1 int64 - result2 error - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeReadSeeker) Read(p []byte) (n int, err error) { - var pCopy []byte - if p != nil { - pCopy = make([]byte, len(p)) - copy(pCopy, p) - } - fake.readMutex.Lock() - ret, specificReturn := fake.readReturnsOnCall[len(fake.readArgsForCall)] - fake.readArgsForCall = append(fake.readArgsForCall, struct { - p []byte - }{pCopy}) - fake.recordInvocation("Read", []interface{}{pCopy}) - fake.readMutex.Unlock() - if fake.ReadStub != nil { - return fake.ReadStub(p) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fake.readReturns.result1, fake.readReturns.result2 -} - -func (fake *FakeReadSeeker) ReadCallCount() int { - fake.readMutex.RLock() - defer fake.readMutex.RUnlock() - return len(fake.readArgsForCall) -} - -func (fake *FakeReadSeeker) ReadArgsForCall(i int) []byte { - fake.readMutex.RLock() - defer fake.readMutex.RUnlock() - return fake.readArgsForCall[i].p -} - -func (fake *FakeReadSeeker) ReadReturns(result1 int, result2 error) { - fake.ReadStub = nil - fake.readReturns = struct { - result1 int - result2 error - }{result1, result2} -} - -func (fake *FakeReadSeeker) ReadReturnsOnCall(i int, result1 int, result2 error) { - fake.ReadStub = nil - if fake.readReturnsOnCall == nil { - fake.readReturnsOnCall = make(map[int]struct { - result1 int - result2 error - }) - } - fake.readReturnsOnCall[i] = struct { - result1 int - result2 error - }{result1, result2} -} - -func (fake *FakeReadSeeker) Seek(offset int64, whence int) (int64, error) { - fake.seekMutex.Lock() - ret, specificReturn := fake.seekReturnsOnCall[len(fake.seekArgsForCall)] - fake.seekArgsForCall = append(fake.seekArgsForCall, struct { - offset int64 - whence int - }{offset, whence}) - fake.recordInvocation("Seek", []interface{}{offset, whence}) - fake.seekMutex.Unlock() - if fake.SeekStub != nil { - return fake.SeekStub(offset, whence) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fake.seekReturns.result1, fake.seekReturns.result2 -} - -func (fake *FakeReadSeeker) SeekCallCount() int { - fake.seekMutex.RLock() - defer fake.seekMutex.RUnlock() - return len(fake.seekArgsForCall) -} - -func (fake *FakeReadSeeker) SeekArgsForCall(i int) (int64, int) { - fake.seekMutex.RLock() - defer fake.seekMutex.RUnlock() - return fake.seekArgsForCall[i].offset, fake.seekArgsForCall[i].whence -} - -func (fake *FakeReadSeeker) SeekReturns(result1 int64, result2 error) { - fake.SeekStub = nil - fake.seekReturns = struct { - result1 int64 - result2 error - }{result1, result2} -} - -func (fake *FakeReadSeeker) SeekReturnsOnCall(i int, result1 int64, result2 error) { - fake.SeekStub = nil - if fake.seekReturnsOnCall == nil { - fake.seekReturnsOnCall = make(map[int]struct { - result1 int64 - result2 error - }) - } - fake.seekReturnsOnCall[i] = struct { - result1 int64 - result2 error - }{result1, result2} -} - -func (fake *FakeReadSeeker) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.readMutex.RLock() - defer fake.readMutex.RUnlock() - fake.seekMutex.RLock() - defer fake.seekMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeReadSeeker) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ cfnetworking.ReadSeeker = new(FakeReadSeeker) diff --git a/api/cfnetworking/connection.go b/api/cfnetworking/connection.go deleted file mode 100644 index bcc6548a93b..00000000000 --- a/api/cfnetworking/connection.go +++ /dev/null @@ -1,8 +0,0 @@ -package cfnetworking - -//go:generate counterfeiter . Connection - -// Connection creates and executes http requests -type Connection interface { - Make(request *Request, passedResponse *Response) error -} diff --git a/api/cfnetworking/errors.go b/api/cfnetworking/errors.go deleted file mode 100644 index 07f1c2459a5..00000000000 --- a/api/cfnetworking/errors.go +++ /dev/null @@ -1,64 +0,0 @@ -package cfnetworking - -import ( - "encoding/json" - "net/http" - - "code.cloudfoundry.org/cli/api/cfnetworking/networkerror" -) - -// errorWrapper is the wrapper that converts responses with 4xx and 5xx status -// codes to an error. -type errorWrapper struct { - connection Connection -} - -func NewErrorWrapper() *errorWrapper { - return new(errorWrapper) -} - -// Wrap wraps a Cloud Controller connection in this error handling wrapper. -func (e *errorWrapper) Wrap(innerconnection Connection) Connection { - e.connection = innerconnection - return e -} - -// Make converts RawHTTPStatusError, which represents responses with 4xx and -// 5xx status codes, to specific errors. -func (e *errorWrapper) Make(request *Request, passedResponse *Response) error { - err := e.connection.Make(request, passedResponse) - - if rawHTTPStatusErr, ok := err.(networkerror.RawHTTPStatusError); ok { - return convert(rawHTTPStatusErr) - } - return err -} - -func convert(rawHTTPStatusErr networkerror.RawHTTPStatusError) error { - // Try to unmarshal the raw error into a CC error. If unmarshaling fails, - // return the raw error. - var errorResponse networkerror.ErrorResponse - err := json.Unmarshal(rawHTTPStatusErr.RawResponse, &errorResponse) - if err != nil { - return rawHTTPStatusErr - } - - switch rawHTTPStatusErr.StatusCode { - case http.StatusBadRequest: // 400 - return networkerror.BadRequestError(errorResponse) - case http.StatusUnauthorized: // 401 - return networkerror.UnauthorizedError(errorResponse) - case http.StatusForbidden: // 403 - return networkerror.ForbiddenError(errorResponse) - case http.StatusNotAcceptable: // 406 - return networkerror.NotAcceptableError(errorResponse) - case http.StatusConflict: // 409 - return networkerror.ConflictError(errorResponse) - default: - return networkerror.UnexpectedResponseError{ - ErrorResponse: errorResponse, - RequestIDs: rawHTTPStatusErr.RequestIDs, - ResponseCode: rawHTTPStatusErr.StatusCode, - } - } -} diff --git a/api/cfnetworking/errors_test.go b/api/cfnetworking/errors_test.go deleted file mode 100644 index c130e255973..00000000000 --- a/api/cfnetworking/errors_test.go +++ /dev/null @@ -1,36 +0,0 @@ -package cfnetworking_test - -import ( - "fmt" - "net/http" - - . "code.cloudfoundry.org/cli/api/cfnetworking" - "code.cloudfoundry.org/cli/api/cfnetworking/cfnetworkingfakes" - "code.cloudfoundry.org/cli/api/cfnetworking/networkerror" - - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" -) - -var _ = Describe("Error Wrapper", func() { - const errorMessage = "I am an error" - - DescribeTable("Make", - func(statusCode int, expectedError error) { - fakeConnection := new(cfnetworkingfakes.FakeConnection) - fakeConnection.MakeReturns(networkerror.RawHTTPStatusError{ - StatusCode: statusCode, - RawResponse: []byte(fmt.Sprintf(`{"error":"%s"}`, errorMessage)), - }) - - errorWrapper := NewErrorWrapper().Wrap(fakeConnection) - err := errorWrapper.Make(nil, nil) - Expect(err).To(MatchError(expectedError)) - }, - Entry("400 -> BadRequestError", http.StatusBadRequest, networkerror.BadRequestError{Message: errorMessage}), - Entry("401 -> UnauthorizedError", http.StatusUnauthorized, networkerror.UnauthorizedError{Message: errorMessage}), - Entry("403 -> ForbiddenError", http.StatusForbidden, networkerror.ForbiddenError{Message: errorMessage}), - Entry("406 -> NotAcceptable", http.StatusNotAcceptable, networkerror.NotAcceptableError{Message: errorMessage}), - Entry("409 -> ConflictError", http.StatusConflict, networkerror.ConflictError{Message: errorMessage}), - ) -}) diff --git a/api/cfnetworking/networkerror/bad_request_error.go b/api/cfnetworking/networkerror/bad_request_error.go deleted file mode 100644 index 16db7bd925c..00000000000 --- a/api/cfnetworking/networkerror/bad_request_error.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkerror - -type BadRequestError struct { - Message string `json:"error"` -} - -func (e BadRequestError) Error() string { - return e.Message -} diff --git a/api/cfnetworking/networkerror/conflict_error.go b/api/cfnetworking/networkerror/conflict_error.go deleted file mode 100644 index 807ac313642..00000000000 --- a/api/cfnetworking/networkerror/conflict_error.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkerror - -type ConflictError struct { - Message string `json:"error"` -} - -func (e ConflictError) Error() string { - return e.Message -} diff --git a/api/cfnetworking/networkerror/error_response.go b/api/cfnetworking/networkerror/error_response.go deleted file mode 100644 index a3ff4659f9a..00000000000 --- a/api/cfnetworking/networkerror/error_response.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkerror - -type ErrorResponse struct { - Message string `json:"error"` -} - -func (e ErrorResponse) Error() string { - return e.Message -} diff --git a/api/cfnetworking/networkerror/forbidden_error.go b/api/cfnetworking/networkerror/forbidden_error.go deleted file mode 100644 index d780a34cb8f..00000000000 --- a/api/cfnetworking/networkerror/forbidden_error.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkerror - -type ForbiddenError struct { - Message string `json:"error"` -} - -func (e ForbiddenError) Error() string { - return e.Message -} diff --git a/api/cfnetworking/networkerror/invalid_auth_token_error.go b/api/cfnetworking/networkerror/invalid_auth_token_error.go deleted file mode 100644 index 3e3178c39ad..00000000000 --- a/api/cfnetworking/networkerror/invalid_auth_token_error.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkerror - -// InvalidAuthTokenError is returned when the client has an invalid -// authorization header. -type InvalidAuthTokenError struct { - Message string -} - -func (e InvalidAuthTokenError) Error() string { - return e.Message -} diff --git a/api/cfnetworking/networkerror/not_acceptable_error.go b/api/cfnetworking/networkerror/not_acceptable_error.go deleted file mode 100644 index 002a73df304..00000000000 --- a/api/cfnetworking/networkerror/not_acceptable_error.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkerror - -type NotAcceptableError struct { - Message string `json:"error"` -} - -func (e NotAcceptableError) Error() string { - return e.Message -} diff --git a/api/cfnetworking/networkerror/not_found_error.go b/api/cfnetworking/networkerror/not_found_error.go deleted file mode 100644 index a69d3030854..00000000000 --- a/api/cfnetworking/networkerror/not_found_error.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkerror - -// NotFoundError wraps a generic 404 error. -type NotFoundError struct { - Message string -} - -func (e NotFoundError) Error() string { - return e.Message -} diff --git a/api/cfnetworking/networkerror/raw_http_status_error.go b/api/cfnetworking/networkerror/raw_http_status_error.go deleted file mode 100644 index fea62dcd7fd..00000000000 --- a/api/cfnetworking/networkerror/raw_http_status_error.go +++ /dev/null @@ -1,14 +0,0 @@ -package networkerror - -import "fmt" - -// RawHTTPStatusError represents any response with a 4xx or 5xx status code. -type RawHTTPStatusError struct { - StatusCode int - RawResponse []byte - RequestIDs []string -} - -func (r RawHTTPStatusError) Error() string { - return fmt.Sprintf("Error Code: %d\nRaw Response: %s", r.StatusCode, r.RawResponse) -} diff --git a/api/cfnetworking/networkerror/request_error.go b/api/cfnetworking/networkerror/request_error.go deleted file mode 100644 index 7b0ff48937f..00000000000 --- a/api/cfnetworking/networkerror/request_error.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkerror - -// RequestError represents a generic error encountered while performing the -// HTTP request. This generic error occurs before a HTTP response is obtained. -type RequestError struct { - Err error -} - -func (e RequestError) Error() string { - return e.Err.Error() -} diff --git a/api/cfnetworking/networkerror/ssl_validation_hostname_error.go b/api/cfnetworking/networkerror/ssl_validation_hostname_error.go deleted file mode 100644 index a583abcff0e..00000000000 --- a/api/cfnetworking/networkerror/ssl_validation_hostname_error.go +++ /dev/null @@ -1,13 +0,0 @@ -package networkerror - -import "fmt" - -// SSLValidationHostnameError replaces x509.HostnameError when the server has -// SSL certificate that does not match the hostname. -type SSLValidationHostnameError struct { - Message string -} - -func (e SSLValidationHostnameError) Error() string { - return fmt.Sprintf("Hostname does not match SSL Certificate (%s)", e.Message) -} diff --git a/api/cfnetworking/networkerror/unauthorized_error.go b/api/cfnetworking/networkerror/unauthorized_error.go deleted file mode 100644 index 513c6de40cb..00000000000 --- a/api/cfnetworking/networkerror/unauthorized_error.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkerror - -type UnauthorizedError struct { - Message string `json:"error"` -} - -func (e UnauthorizedError) Error() string { - return e.Message -} diff --git a/api/cfnetworking/networkerror/unexpected_response_error.go b/api/cfnetworking/networkerror/unexpected_response_error.go deleted file mode 100644 index e337d7a7954..00000000000 --- a/api/cfnetworking/networkerror/unexpected_response_error.go +++ /dev/null @@ -1,20 +0,0 @@ -package networkerror - -import "fmt" - -// UnexpectedResponseError is returned when the client gets an error that has -// not been accounted for. -type UnexpectedResponseError struct { - ErrorResponse - - RequestIDs []string - ResponseCode int -} - -func (e UnexpectedResponseError) Error() string { - message := fmt.Sprintf("Unexpected Response\nResponse code: %d", e.ResponseCode) - for _, id := range e.RequestIDs { - message = fmt.Sprintf("%s\nRequest ID: %s", message, id) - } - return fmt.Sprintf("%s\nDescription: %s", message, e.Message) -} diff --git a/api/cfnetworking/networkerror/unverified_server_error.go b/api/cfnetworking/networkerror/unverified_server_error.go deleted file mode 100644 index 59a877302a8..00000000000 --- a/api/cfnetworking/networkerror/unverified_server_error.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkerror - -// UnverifiedServerError replaces x509.UnknownAuthorityError when the server -// has SSL but the client is unable to verify it's certificate -type UnverifiedServerError struct { - URL string -} - -func (UnverifiedServerError) Error() string { - return "x509: certificate signed by unknown authority" -} diff --git a/api/cfnetworking/networking_connection.go b/api/cfnetworking/networking_connection.go deleted file mode 100644 index 3980af92e5b..00000000000 --- a/api/cfnetworking/networking_connection.go +++ /dev/null @@ -1,130 +0,0 @@ -package cfnetworking - -import ( - "bytes" - "crypto/tls" - "crypto/x509" - "encoding/json" - "errors" - "io/ioutil" - "net" - "net/http" - "net/url" - "time" - - "code.cloudfoundry.org/cli/api/cfnetworking/networkerror" -) - -// NetworkingConnection represents a connection to the Cloud Controller -// server. -type NetworkingConnection struct { - HTTPClient *http.Client - UserAgent string -} - -// Config is for configuring a NetworkingConnection. -type Config struct { - DialTimeout time.Duration - SkipSSLValidation bool -} - -// NewConnection returns a new NetworkingConnection with provided -// configuration. -func NewConnection(config Config) *NetworkingConnection { - tr := &http.Transport{ - TLSClientConfig: &tls.Config{ - InsecureSkipVerify: config.SkipSSLValidation, - }, - Proxy: http.ProxyFromEnvironment, - DialContext: (&net.Dialer{ - KeepAlive: 30 * time.Second, - Timeout: config.DialTimeout, - }).DialContext, - } - - return &NetworkingConnection{ - HTTPClient: &http.Client{Transport: tr}, - } -} - -// Make performs the request and parses the response. -func (connection *NetworkingConnection) Make(request *Request, passedResponse *Response) error { - // In case this function is called from a retry, passedResponse may already - // be populated with a previous response. We reset in case there's an HTTP - // error and we don't repopulate it in populateResponse. - passedResponse.reset() - - response, err := connection.HTTPClient.Do(request.Request) - if err != nil { - return connection.processRequestErrors(request.Request, err) - } - - return connection.populateResponse(response, passedResponse) -} - -func (*NetworkingConnection) processRequestErrors(request *http.Request, err error) error { - switch e := err.(type) { - case *url.Error: - if errors.As(err, &x509.UnknownAuthorityError{}) { - return networkerror.UnverifiedServerError{ - URL: request.URL.String(), - } - } - - hostnameError := x509.HostnameError{} - if errors.As(err, &hostnameError) { - return networkerror.SSLValidationHostnameError{ - Message: hostnameError.Error(), - } - } - - return networkerror.RequestError{Err: e} - - default: - return err - } -} - -func (connection *NetworkingConnection) populateResponse(response *http.Response, passedResponse *Response) error { - passedResponse.HTTPResponse = response - - if resourceLocationURL := response.Header.Get("Location"); resourceLocationURL != "" { - passedResponse.ResourceLocationURL = resourceLocationURL - } - - rawBytes, err := ioutil.ReadAll(response.Body) - defer response.Body.Close() - if err != nil { - return err - } - - passedResponse.RawResponse = rawBytes - - err = connection.handleStatusCodes(response, passedResponse) - if err != nil { - return err - } - - if passedResponse.Result != nil { - decoder := json.NewDecoder(bytes.NewBuffer(passedResponse.RawResponse)) - decoder.UseNumber() - err = decoder.Decode(passedResponse.Result) - if err != nil { - return err - } - } - - return nil -} - -func (*NetworkingConnection) handleStatusCodes(response *http.Response, passedResponse *Response) error { - if response.StatusCode >= 400 { - return networkerror.RawHTTPStatusError{ - StatusCode: response.StatusCode, - RawResponse: passedResponse.RawResponse, - RequestIDs: response.Header["X-Vcap-Request-Id"], - } - } - - return nil -} diff --git a/api/cfnetworking/networking_connection_test.go b/api/cfnetworking/networking_connection_test.go deleted file mode 100644 index b8ee9a24fbf..00000000000 --- a/api/cfnetworking/networking_connection_test.go +++ /dev/null @@ -1,251 +0,0 @@ -package cfnetworking_test - -import ( - "fmt" - "net/http" - "runtime" - "strings" - - . "code.cloudfoundry.org/cli/api/cfnetworking" - "code.cloudfoundry.org/cli/api/cfnetworking/networkerror" - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" - . "github.com/onsi/gomega/ghttp" -) - -type DummyResponse struct { - Val1 string `json:"val1"` - Val2 int `json:"val2"` - Val3 interface{} `json:"val3,omitempty"` -} - -var _ = Describe("CF Networking Connection", func() { - var connection *NetworkingConnection - - BeforeEach(func() { - connection = NewConnection(Config{SkipSSLValidation: true}) - }) - - Describe("Make", func() { - Describe("Data Unmarshalling", func() { - var request *Request - - BeforeEach(func() { - response := `{ - "val1":"2.59.0", - "val2":2, - "val3":1111111111111111111 - }` - server.AppendHandlers( - CombineHandlers( - VerifyRequest(http.MethodGet, "/v2/foo", ""), - RespondWith(http.StatusOK, response), - ), - ) - - req, err := http.NewRequest(http.MethodGet, fmt.Sprintf("%s/v2/foo", server.URL()), nil) - Expect(err).ToNot(HaveOccurred()) - request = &Request{Request: req} - }) - - Context("when passed a response with a result set", func() { - It("unmarshals the data into a struct", func() { - var body DummyResponse - response := Response{ - Result: &body, - } - - err := connection.Make(request, &response) - Expect(err).NotTo(HaveOccurred()) - - Expect(body.Val1).To(Equal("2.59.0")) - Expect(body.Val2).To(Equal(2)) - }) - - It("keeps numbers unmarshalled to interfaces as interfaces", func() { - var body DummyResponse - response := Response{ - Result: &body, - } - - err := connection.Make(request, &response) - Expect(err).NotTo(HaveOccurred()) - Expect(fmt.Sprint(body.Val3)).To(Equal("1111111111111111111")) - }) - }) - - Context("when passed an empty response", func() { - It("skips the unmarshalling step", func() { - var response Response - err := connection.Make(request, &response) - Expect(err).NotTo(HaveOccurred()) - Expect(response.Result).To(BeNil()) - }) - }) - }) - - Describe("HTTP Response", func() { - var request *Request - - BeforeEach(func() { - response := `{}` - server.AppendHandlers( - CombineHandlers( - VerifyRequest(http.MethodGet, "/v2/foo", ""), - RespondWith(http.StatusOK, response), - ), - ) - - req, err := http.NewRequest(http.MethodGet, fmt.Sprintf("%s/v2/foo", server.URL()), nil) - Expect(err).ToNot(HaveOccurred()) - request = &Request{Request: req} - }) - - It("returns the status", func() { - response := Response{} - - err := connection.Make(request, &response) - Expect(err).NotTo(HaveOccurred()) - - Expect(response.HTTPResponse.Status).To(Equal("200 OK")) - }) - }) - - Describe("Response Headers", func() { - Describe("Location", func() { - BeforeEach(func() { - server.AppendHandlers( - CombineHandlers( - VerifyRequest(http.MethodGet, "/v2/foo"), - RespondWith(http.StatusAccepted, "{}", http.Header{"Location": {"/v2/some-location"}}), - ), - ) - }) - - It("returns the location in the ResourceLocationURL", func() { - req, err := http.NewRequest(http.MethodGet, fmt.Sprintf("%s/v2/foo", server.URL()), nil) - Expect(err).ToNot(HaveOccurred()) - request := &Request{Request: req} - - var response Response - err = connection.Make(request, &response) - Expect(err).NotTo(HaveOccurred()) - - Expect(server.ReceivedRequests()).To(HaveLen(1)) - Expect(response.ResourceLocationURL).To(Equal("/v2/some-location")) - }) - }) - }) - - Describe("Errors", func() { - Context("when the server does not exist", func() { - BeforeEach(func() { - connection = NewConnection(Config{}) - }) - - It("returns a RequestError", func() { - req, err := http.NewRequest(http.MethodGet, fmt.Sprintf("%s/v2/foo", "http://garbledyguk.com"), nil) - Expect(err).ToNot(HaveOccurred()) - request := &Request{Request: req} - - var response Response - err = connection.Make(request, &response) - Expect(err).To(HaveOccurred()) - - requestErr, ok := err.(networkerror.RequestError) - Expect(ok).To(BeTrue()) - Expect(requestErr.Error()).To(MatchRegexp(".*http://garbledyguk.com/v2/foo.*[nN]o such host")) - }) - }) - - Context("when the server does not have a verified certificate", func() { - Context("skipSSLValidation is false", func() { - BeforeEach(func() { - server.AppendHandlers( - CombineHandlers( - VerifyRequest(http.MethodGet, "/v2/foo"), - ), - ) - - connection = NewConnection(Config{}) - }) - - It("returns a UnverifiedServerError", func() { - req, err := http.NewRequest(http.MethodGet, server.URL(), nil) - Expect(err).ToNot(HaveOccurred()) - request := &Request{Request: req} - - var response Response - err = connection.Make(request, &response) - Expect(err).To(MatchError(networkerror.UnverifiedServerError{URL: server.URL()})) - }) - }) - }) - - Context("when the server's certificate does not match the hostname", func() { - Context("skipSSLValidation is false", func() { - BeforeEach(func() { - if runtime.GOOS == "windows" { - Skip("ssl validation has a different order on windows, will not be returned properly") - } - server.AppendHandlers( - CombineHandlers( - VerifyRequest(http.MethodGet, "/"), - ), - ) - - connection = NewConnection(Config{}) - }) - - // loopback.cli.ci.cf-app.com is a custom DNS record setup to point to 127.0.0.1 - It("returns a SSLValidationHostnameError", func() { - altHostURL := strings.Replace(server.URL(), "127.0.0.1", "loopback.cli.ci.cf-app.com", -1) - req, err := http.NewRequest(http.MethodGet, altHostURL, nil) - Expect(err).ToNot(HaveOccurred()) - request := &Request{Request: req} - - var response Response - err = connection.Make(request, &response) - Expect(err).To(MatchError(networkerror.SSLValidationHostnameError{ - Message: "x509: certificate is valid for example.com, not loopback.cli.ci.cf-app.com", - })) - }) - }) - }) - - Describe("RawHTTPStatusError", func() { - var networkResponse string - BeforeEach(func() { - networkResponse = `{ - "code": 90004, - "description": "The service binding could not be found: some-guid", - "error_code": "CF-ServiceBindingNotFound" - }` - - server.AppendHandlers( - CombineHandlers( - VerifyRequest(http.MethodGet, "/v2/foo"), - RespondWith(http.StatusNotFound, networkResponse, http.Header{"X-Vcap-Request-Id": {"6e0b4379-f5f7-4b2b-56b0-9ab7e96eed95", "6e0b4379-f5f7-4b2b-56b0-9ab7e96eed95::7445d9db-c31e-410d-8dc5-9f79ec3fc26f"}}), - ), - ) - }) - - It("returns a CCRawResponse", func() { - req, err := http.NewRequest(http.MethodGet, fmt.Sprintf("%s/v2/foo", server.URL()), nil) - Expect(err).ToNot(HaveOccurred()) - request := &Request{Request: req} - - var response Response - err = connection.Make(request, &response) - Expect(err).To(MatchError(networkerror.RawHTTPStatusError{ - StatusCode: http.StatusNotFound, - RawResponse: []byte(networkResponse), - RequestIDs: []string{"6e0b4379-f5f7-4b2b-56b0-9ab7e96eed95", "6e0b4379-f5f7-4b2b-56b0-9ab7e96eed95::7445d9db-c31e-410d-8dc5-9f79ec3fc26f"}, - })) - - Expect(server.ReceivedRequests()).To(HaveLen(1)) - }) - }) - }) - }) -}) diff --git a/api/cfnetworking/request.go b/api/cfnetworking/request.go deleted file mode 100644 index 84f42ed9d76..00000000000 --- a/api/cfnetworking/request.go +++ /dev/null @@ -1,35 +0,0 @@ -package cfnetworking - -import ( - "io" - "net/http" -) - -//go:generate counterfeiter . ReadSeeker - -type ReadSeeker interface { - io.ReadSeeker -} - -// Request represents the request of the cloud controller. -type Request struct { - *http.Request - - body io.ReadSeeker -} - -func (r *Request) ResetBody() error { - if r.body == nil { - return nil - } - - _, err := r.body.Seek(0, 0) - return err -} - -func NewRequest(request *http.Request, body io.ReadSeeker) *Request { - return &Request{ - Request: request, - body: body, - } -} diff --git a/api/cfnetworking/response.go b/api/cfnetworking/response.go deleted file mode 100644 index 8d4de87ccac..00000000000 --- a/api/cfnetworking/response.go +++ /dev/null @@ -1,29 +0,0 @@ -package cfnetworking - -import "net/http" - -// Response represents a Cloud Controller response object. -type Response struct { - // Result represents the resource entity type that is expected in the - // response JSON. - Result interface{} - - // RawResponse represents the response body. - RawResponse []byte - - // Warnings represents warnings parsed from the custom warnings headers of a - // Cloud Controller response. - Warnings []string - - // HTTPResponse represents the HTTP response object. - HTTPResponse *http.Response - - // ResourceLocationURL represents the Location header value - ResourceLocationURL string -} - -func (r *Response) reset() { - r.RawResponse = []byte{} - r.Warnings = []string{} - r.HTTPResponse = nil -} diff --git a/api/cfnetworking/wrapper/request_logger.go b/api/cfnetworking/wrapper/request_logger.go deleted file mode 100644 index 8fbe2aa3390..00000000000 --- a/api/cfnetworking/wrapper/request_logger.go +++ /dev/null @@ -1,156 +0,0 @@ -package wrapper - -import ( - "fmt" - "io/ioutil" - "net/http" - "sort" - "strings" - "time" - - "code.cloudfoundry.org/cli/api/cfnetworking" -) - -//go:generate counterfeiter . RequestLoggerOutput - -// RequestLoggerOutput is the interface for displaying logs -type RequestLoggerOutput interface { - DisplayHeader(name string, value string) error - DisplayHost(name string) error - DisplayJSONBody(body []byte) error - DisplayMessage(msg string) error - DisplayRequestHeader(method string, uri string, httpProtocol string) error - DisplayResponseHeader(httpProtocol string, status string) error - DisplayType(name string, requestDate time.Time) error - HandleInternalError(err error) - Start() error - Stop() error -} - -// RequestLogger is the wrapper that logs requests to and responses from the -// Cloud Controller server -type RequestLogger struct { - connection cfnetworking.Connection - output RequestLoggerOutput -} - -// NewRequestLogger returns a pointer to a RequestLogger wrapper -func NewRequestLogger(output RequestLoggerOutput) *RequestLogger { - return &RequestLogger{ - output: output, - } -} - -// Wrap sets the connection on the RequestLogger and returns itself -func (logger *RequestLogger) Wrap(innerconnection cfnetworking.Connection) cfnetworking.Connection { - logger.connection = innerconnection - return logger -} - -// Make records the request and the response to UI -func (logger *RequestLogger) Make(request *cfnetworking.Request, passedResponse *cfnetworking.Response) error { - err := logger.displayRequest(request) - if err != nil { - logger.output.HandleInternalError(err) - } - - err = logger.connection.Make(request, passedResponse) - - if passedResponse.HTTPResponse != nil { - displayErr := logger.displayResponse(passedResponse) - if displayErr != nil { - logger.output.HandleInternalError(displayErr) - } - } - - return err -} - -func (logger *RequestLogger) displayRequest(request *cfnetworking.Request) error { - err := logger.output.Start() - if err != nil { - return err - } - defer logger.output.Stop() - - err = logger.output.DisplayType("REQUEST", time.Now()) - if err != nil { - return err - } - err = logger.output.DisplayRequestHeader(request.Method, request.URL.RequestURI(), request.Proto) - if err != nil { - return err - } - err = logger.output.DisplayHost(request.URL.Host) - if err != nil { - return err - } - err = logger.displaySortedHeaders(request.Header) - if err != nil { - return err - } - - contentType := request.Header.Get("Content-Type") - if request.Body != nil { - if strings.Contains(contentType, "json") { - rawRequestBody, err := ioutil.ReadAll(request.Body) - if err != nil { - return err - } - - defer request.ResetBody() - - return logger.output.DisplayJSONBody(rawRequestBody) - } else if contentType != "" { - return logger.output.DisplayMessage(fmt.Sprintf("[%s Content Hidden]", strings.Split(contentType, ";")[0])) - } - } - return nil -} - -func (logger *RequestLogger) displayResponse(passedResponse *cfnetworking.Response) error { - err := logger.output.Start() - if err != nil { - return err - } - defer logger.output.Stop() - - err = logger.output.DisplayType("RESPONSE", time.Now()) - if err != nil { - return err - } - err = logger.output.DisplayResponseHeader(passedResponse.HTTPResponse.Proto, passedResponse.HTTPResponse.Status) - if err != nil { - return err - } - err = logger.displaySortedHeaders(passedResponse.HTTPResponse.Header) - if err != nil { - return err - } - return logger.output.DisplayJSONBody(passedResponse.RawResponse) -} - -func (logger *RequestLogger) displaySortedHeaders(headers http.Header) error { - keys := []string{} - for key, _ := range headers { - keys = append(keys, key) - } - sort.Strings(keys) - - for _, key := range keys { - for _, value := range headers[key] { - err := logger.output.DisplayHeader(key, redactHeaders(key, value)) - if err != nil { - return err - } - } - } - return nil -} - -func redactHeaders(key string, value string) string { - if key == "Authorization" { - return "[PRIVATE DATA HIDDEN]" - } - return value -} diff --git a/api/cfnetworking/wrapper/request_logger_test.go b/api/cfnetworking/wrapper/request_logger_test.go deleted file mode 100644 index b4437e996de..00000000000 --- a/api/cfnetworking/wrapper/request_logger_test.go +++ /dev/null @@ -1,328 +0,0 @@ -package wrapper_test - -import ( - "bytes" - "errors" - "io/ioutil" - "net/http" - "net/url" - "time" - - "code.cloudfoundry.org/cli/api/cfnetworking" - "code.cloudfoundry.org/cli/api/cfnetworking/cfnetworkingfakes" - . "code.cloudfoundry.org/cli/api/cfnetworking/wrapper" - "code.cloudfoundry.org/cli/api/cfnetworking/wrapper/wrapperfakes" - - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" -) - -var _ = Describe("Request Logger", func() { - var ( - fakeConnection *cfnetworkingfakes.FakeConnection - fakeOutput *wrapperfakes.FakeRequestLoggerOutput - - wrapper cfnetworking.Connection - - request *cfnetworking.Request - response *cfnetworking.Response - executeErr error - ) - - BeforeEach(func() { - fakeConnection = new(cfnetworkingfakes.FakeConnection) - fakeOutput = new(wrapperfakes.FakeRequestLoggerOutput) - - wrapper = NewRequestLogger(fakeOutput).Wrap(fakeConnection) - - body := bytes.NewReader([]byte("foo")) - - req, err := http.NewRequest(http.MethodGet, "https://foo.bar.com/banana", body) - Expect(err).NotTo(HaveOccurred()) - - req.URL.RawQuery = url.Values{ - "query1": {"a"}, - "query2": {"b"}, - }.Encode() - - headers := http.Header{} - headers.Add("Aghi", "bar") - headers.Add("Abc", "json") - headers.Add("Adef", "application/json") - req.Header = headers - - response = &cfnetworking.Response{ - RawResponse: []byte("some-response-body"), - HTTPResponse: &http.Response{}, - } - request = cfnetworking.NewRequest(req, body) - }) - - JustBeforeEach(func() { - executeErr = wrapper.Make(request, response) - }) - - Describe("Make", func() { - It("outputs the request", func() { - Expect(executeErr).NotTo(HaveOccurred()) - - Expect(fakeOutput.DisplayTypeCallCount()).To(BeNumerically(">=", 1)) - name, date := fakeOutput.DisplayTypeArgsForCall(0) - Expect(name).To(Equal("REQUEST")) - Expect(date).To(BeTemporally("~", time.Now(), time.Second)) - - Expect(fakeOutput.DisplayRequestHeaderCallCount()).To(Equal(1)) - method, uri, protocol := fakeOutput.DisplayRequestHeaderArgsForCall(0) - Expect(method).To(Equal(http.MethodGet)) - Expect(uri).To(MatchRegexp("/banana\\?(?:query1=a&query2=b|query2=b&query1=a)")) - Expect(protocol).To(Equal("HTTP/1.1")) - - Expect(fakeOutput.DisplayHostCallCount()).To(Equal(1)) - host := fakeOutput.DisplayHostArgsForCall(0) - Expect(host).To(Equal("foo.bar.com")) - - Expect(fakeOutput.DisplayHeaderCallCount()).To(BeNumerically(">=", 3)) - name, value := fakeOutput.DisplayHeaderArgsForCall(0) - Expect(name).To(Equal("Abc")) - Expect(value).To(Equal("json")) - name, value = fakeOutput.DisplayHeaderArgsForCall(1) - Expect(name).To(Equal("Adef")) - Expect(value).To(Equal("application/json")) - name, value = fakeOutput.DisplayHeaderArgsForCall(2) - Expect(name).To(Equal("Aghi")) - Expect(value).To(Equal("bar")) - - Expect(fakeOutput.DisplayMessageCallCount()).To(Equal(0)) - }) - - Context("when an authorization header is in the request", func() { - BeforeEach(func() { - request.Header = http.Header{"Authorization": []string{"should not be shown"}} - }) - - It("redacts the contents of the authorization header", func() { - Expect(executeErr).NotTo(HaveOccurred()) - Expect(fakeOutput.DisplayHeaderCallCount()).To(Equal(1)) - key, value := fakeOutput.DisplayHeaderArgsForCall(0) - Expect(key).To(Equal("Authorization")) - Expect(value).To(Equal("[PRIVATE DATA HIDDEN]")) - }) - }) - - Context("when passed a body", func() { - Context("when the request's Content-Type is application/json", func() { - BeforeEach(func() { - request.Header.Set("Content-Type", "application/json") - }) - - It("outputs the body", func() { - Expect(executeErr).NotTo(HaveOccurred()) - - Expect(fakeOutput.DisplayJSONBodyCallCount()).To(BeNumerically(">=", 1)) - Expect(fakeOutput.DisplayJSONBodyArgsForCall(0)).To(Equal([]byte("foo"))) - - bytes, err := ioutil.ReadAll(request.Body) - Expect(err).NotTo(HaveOccurred()) - Expect(bytes).To(Equal([]byte("foo"))) - }) - }) - - Context("when request's Content-Type is anything else", func() { - BeforeEach(func() { - request.Header.Set("Content-Type", "banana;rama") - }) - - It("does not display the body", func() { - Expect(fakeOutput.DisplayJSONBodyCallCount()).To(Equal(1)) // Once for response body only - Expect(fakeOutput.DisplayMessageCallCount()).To(Equal(1)) - Expect(fakeOutput.DisplayMessageArgsForCall(0)).To(Equal("[banana Content Hidden]")) - }) - }) - }) - - Context("when an error occures while trying to log the request", func() { - var expectedErr error - - BeforeEach(func() { - expectedErr = errors.New("this should never block the request") - - calledOnce := false - fakeOutput.StartStub = func() error { - if !calledOnce { - calledOnce = true - return expectedErr - } - return nil - } - }) - - It("should display the error and continue on", func() { - Expect(executeErr).NotTo(HaveOccurred()) - - Expect(fakeOutput.HandleInternalErrorCallCount()).To(Equal(1)) - Expect(fakeOutput.HandleInternalErrorArgsForCall(0)).To(MatchError(expectedErr)) - }) - }) - - Context("when the request is successful", func() { - BeforeEach(func() { - response = &cfnetworking.Response{ - RawResponse: []byte("some-response-body"), - HTTPResponse: &http.Response{ - Proto: "HTTP/1.1", - Status: "200 OK", - Header: http.Header{ - "BBBBB": {"second"}, - "AAAAA": {"first"}, - "CCCCC": {"third"}, - }, - }, - } - }) - - It("outputs the response", func() { - Expect(executeErr).NotTo(HaveOccurred()) - - Expect(fakeOutput.DisplayTypeCallCount()).To(Equal(2)) - name, date := fakeOutput.DisplayTypeArgsForCall(1) - Expect(name).To(Equal("RESPONSE")) - Expect(date).To(BeTemporally("~", time.Now(), time.Second)) - - Expect(fakeOutput.DisplayResponseHeaderCallCount()).To(Equal(1)) - protocol, status := fakeOutput.DisplayResponseHeaderArgsForCall(0) - Expect(protocol).To(Equal("HTTP/1.1")) - Expect(status).To(Equal("200 OK")) - - Expect(fakeOutput.DisplayHeaderCallCount()).To(BeNumerically(">=", 6)) - name, value := fakeOutput.DisplayHeaderArgsForCall(3) - Expect(name).To(Equal("AAAAA")) - Expect(value).To(Equal("first")) - name, value = fakeOutput.DisplayHeaderArgsForCall(4) - Expect(name).To(Equal("BBBBB")) - Expect(value).To(Equal("second")) - name, value = fakeOutput.DisplayHeaderArgsForCall(5) - Expect(name).To(Equal("CCCCC")) - Expect(value).To(Equal("third")) - - Expect(fakeOutput.DisplayJSONBodyCallCount()).To(BeNumerically(">=", 1)) - Expect(fakeOutput.DisplayJSONBodyArgsForCall(0)).To(Equal([]byte("some-response-body"))) - }) - }) - - Context("when the request is unsuccessful", func() { - var expectedErr error - - BeforeEach(func() { - expectedErr = errors.New("banana") - fakeConnection.MakeReturns(expectedErr) - }) - - Context("when the http response is not set", func() { - BeforeEach(func() { - response = &cfnetworking.Response{} - }) - - It("outputs nothing", func() { - Expect(executeErr).To(MatchError(expectedErr)) - Expect(fakeOutput.DisplayResponseHeaderCallCount()).To(Equal(0)) - }) - }) - - Context("when the http response is set", func() { - BeforeEach(func() { - response = &cfnetworking.Response{ - RawResponse: []byte("some-error-body"), - HTTPResponse: &http.Response{ - Proto: "HTTP/1.1", - Status: "200 OK", - Header: http.Header{ - "BBBBB": {"second"}, - "AAAAA": {"first"}, - "CCCCC": {"third"}, - }, - }, - } - }) - - It("outputs the response", func() { - Expect(executeErr).To(MatchError(expectedErr)) - - Expect(fakeOutput.DisplayTypeCallCount()).To(Equal(2)) - name, date := fakeOutput.DisplayTypeArgsForCall(1) - Expect(name).To(Equal("RESPONSE")) - Expect(date).To(BeTemporally("~", time.Now(), time.Second)) - - Expect(fakeOutput.DisplayResponseHeaderCallCount()).To(Equal(1)) - protocol, status := fakeOutput.DisplayResponseHeaderArgsForCall(0) - Expect(protocol).To(Equal("HTTP/1.1")) - Expect(status).To(Equal("200 OK")) - - Expect(fakeOutput.DisplayHeaderCallCount()).To(BeNumerically(">=", 6)) - name, value := fakeOutput.DisplayHeaderArgsForCall(3) - Expect(name).To(Equal("AAAAA")) - Expect(value).To(Equal("first")) - name, value = fakeOutput.DisplayHeaderArgsForCall(4) - Expect(name).To(Equal("BBBBB")) - Expect(value).To(Equal("second")) - name, value = fakeOutput.DisplayHeaderArgsForCall(5) - Expect(name).To(Equal("CCCCC")) - Expect(value).To(Equal("third")) - - Expect(fakeOutput.DisplayJSONBodyCallCount()).To(BeNumerically(">=", 1)) - Expect(fakeOutput.DisplayJSONBodyArgsForCall(0)).To(Equal([]byte("some-error-body"))) - }) - }) - }) - - Context("when an error occures while trying to log the response", func() { - var ( - originalErr error - expectedErr error - ) - - BeforeEach(func() { - originalErr = errors.New("this error should not be overwritten") - fakeConnection.MakeReturns(originalErr) - - expectedErr = errors.New("this should never block the request") - - calledOnce := false - fakeOutput.StartStub = func() error { - if !calledOnce { - calledOnce = true - return nil - } - return expectedErr - } - }) - - It("should display the error and continue on", func() { - Expect(executeErr).To(MatchError(originalErr)) - - Expect(fakeOutput.HandleInternalErrorCallCount()).To(Equal(1)) - Expect(fakeOutput.HandleInternalErrorArgsForCall(0)).To(MatchError(expectedErr)) - }) - }) - - It("starts and stops the output", func() { - Expect(fakeOutput.StartCallCount()).To(Equal(2)) - Expect(fakeOutput.StopCallCount()).To(Equal(2)) - }) - - Context("when displaying the logs have an error", func() { - var expectedErr error - BeforeEach(func() { - expectedErr = errors.New("Display error on request") - fakeOutput.StartReturns(expectedErr) - }) - - It("calls handle internal error", func() { - Expect(executeErr).ToNot(HaveOccurred()) - - Expect(fakeOutput.HandleInternalErrorCallCount()).To(Equal(2)) - Expect(fakeOutput.HandleInternalErrorArgsForCall(0)).To(MatchError(expectedErr)) - Expect(fakeOutput.HandleInternalErrorArgsForCall(1)).To(MatchError(expectedErr)) - }) - }) - }) -}) diff --git a/api/cfnetworking/wrapper/retry_request.go b/api/cfnetworking/wrapper/retry_request.go deleted file mode 100644 index 42981a09b95..00000000000 --- a/api/cfnetworking/wrapper/retry_request.go +++ /dev/null @@ -1,54 +0,0 @@ -package wrapper - -import ( - "net/http" - - "code.cloudfoundry.org/cli/api/cfnetworking" -) - -// RetryRequest is a wrapper that retries failed requests if they contain a 5XX -// status code. -type RetryRequest struct { - maxRetries int - connection cfnetworking.Connection -} - -// NewRetryRequest returns a pointer to a RetryRequest wrapper. -func NewRetryRequest(maxRetries int) *RetryRequest { - return &RetryRequest{ - maxRetries: maxRetries, - } -} - -// Wrap sets the connection in the RetryRequest and returns itself. -func (retry *RetryRequest) Wrap(innerconnection cfnetworking.Connection) cfnetworking.Connection { - retry.connection = innerconnection - return retry -} - -// Make retries the request if it comes back with certain status codes. -func (retry *RetryRequest) Make(request *cfnetworking.Request, passedResponse *cfnetworking.Response) error { - var err error - - for i := 0; i < retry.maxRetries+1; i += 1 { - err = retry.connection.Make(request, passedResponse) - if err == nil { - return nil - } - - if passedResponse.HTTPResponse != nil && - (passedResponse.HTTPResponse.StatusCode == http.StatusBadGateway || - passedResponse.HTTPResponse.StatusCode == http.StatusServiceUnavailable || - passedResponse.HTTPResponse.StatusCode == http.StatusGatewayTimeout || - (passedResponse.HTTPResponse.StatusCode >= 400 && passedResponse.HTTPResponse.StatusCode < 500)) { - break - } - - // Reset the request body prior to the next retry - resetErr := request.ResetBody() - if resetErr != nil { - return resetErr - } - } - return err -} diff --git a/api/cfnetworking/wrapper/retry_request_test.go b/api/cfnetworking/wrapper/retry_request_test.go deleted file mode 100644 index 24601ecfc65..00000000000 --- a/api/cfnetworking/wrapper/retry_request_test.go +++ /dev/null @@ -1,110 +0,0 @@ -package wrapper_test - -import ( - "errors" - "io/ioutil" - "net/http" - "strings" - - "code.cloudfoundry.org/cli/api/cfnetworking" - "code.cloudfoundry.org/cli/api/cfnetworking/cfnetworkingfakes" - "code.cloudfoundry.org/cli/api/cfnetworking/networkerror" - . "code.cloudfoundry.org/cli/api/cfnetworking/wrapper" - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" -) - -var _ = Describe("Retry Request", func() { - DescribeTable("number of retries", - func(requestMethod string, responseStatusCode int, expectedNumberOfRetries int) { - rawRequestBody := "banana pants" - body := strings.NewReader(rawRequestBody) - - req, err := http.NewRequest(requestMethod, "https://foo.bar.com/banana", body) - Expect(err).NotTo(HaveOccurred()) - request := cfnetworking.NewRequest(req, body) - - response := &cfnetworking.Response{ - HTTPResponse: &http.Response{ - StatusCode: responseStatusCode, - }, - } - - fakeConnection := new(cfnetworkingfakes.FakeConnection) - expectedErr := networkerror.RawHTTPStatusError{ - StatusCode: responseStatusCode, - } - fakeConnection.MakeStub = func(req *cfnetworking.Request, passedResponse *cfnetworking.Response) error { - defer req.Body.Close() - body, readBodyErr := ioutil.ReadAll(request.Body) - Expect(readBodyErr).ToNot(HaveOccurred()) - Expect(string(body)).To(Equal(rawRequestBody)) - return expectedErr - } - - wrapper := NewRetryRequest(2).Wrap(fakeConnection) - err = wrapper.Make(request, response) - Expect(err).To(MatchError(expectedErr)) - Expect(fakeConnection.MakeCallCount()).To(Equal(expectedNumberOfRetries)) - }, - - Entry("maxRetries for Non-Post (500) Internal Server Error", http.MethodGet, http.StatusInternalServerError, 3), - Entry("1 for Post (502) Bad Gateway", http.MethodGet, http.StatusBadGateway, 1), - Entry("1 for Post (503) Service Unavailable", http.MethodGet, http.StatusServiceUnavailable, 1), - Entry("1 for Post (504) Gateway Timeout", http.MethodGet, http.StatusGatewayTimeout, 1), - - Entry("1 for 4XX Errors", http.MethodGet, http.StatusNotFound, 1), - ) - - It("does not retry on success", func() { - req, err := http.NewRequest(http.MethodGet, "https://foo.bar.com/banana", nil) - Expect(err).NotTo(HaveOccurred()) - request := cfnetworking.NewRequest(req, nil) - response := &cfnetworking.Response{ - HTTPResponse: &http.Response{ - StatusCode: http.StatusOK, - }, - } - - fakeConnection := new(cfnetworkingfakes.FakeConnection) - wrapper := NewRetryRequest(2).Wrap(fakeConnection) - - err = wrapper.Make(request, response) - Expect(err).ToNot(HaveOccurred()) - Expect(fakeConnection.MakeCallCount()).To(Equal(1)) - }) - - Context("when seeking errors", func() { - var ( - request *cfnetworking.Request - response *cfnetworking.Response - - fakeConnection *cfnetworkingfakes.FakeConnection - wrapper cfnetworking.Connection - ) - - BeforeEach(func() { - fakeReadSeeker := new(cfnetworkingfakes.FakeReadSeeker) - fakeReadSeeker.SeekReturns(0, errors.New("oh noes")) - - req, err := http.NewRequest(http.MethodGet, "https://foo.bar.com/banana", fakeReadSeeker) - Expect(err).NotTo(HaveOccurred()) - request = cfnetworking.NewRequest(req, fakeReadSeeker) - - response = &cfnetworking.Response{ - HTTPResponse: &http.Response{ - StatusCode: http.StatusInternalServerError, - }, - } - fakeConnection = new(cfnetworkingfakes.FakeConnection) - fakeConnection.MakeReturns(errors.New("some error")) - wrapper = NewRetryRequest(3).Wrap(fakeConnection) - }) - - It("sets the err on SeekError", func() { - err := wrapper.Make(request, response) - Expect(err).To(MatchError("oh noes")) - Expect(fakeConnection.MakeCallCount()).To(Equal(1)) - }) - }) -}) diff --git a/api/cfnetworking/wrapper/uaa_authentication.go b/api/cfnetworking/wrapper/uaa_authentication.go deleted file mode 100644 index 876994bb7db..00000000000 --- a/api/cfnetworking/wrapper/uaa_authentication.go +++ /dev/null @@ -1,81 +0,0 @@ -package wrapper - -import ( - "code.cloudfoundry.org/cli/api/cfnetworking" - "code.cloudfoundry.org/cli/api/cfnetworking/networkerror" - "code.cloudfoundry.org/cli/api/uaa" -) - -//go:generate counterfeiter . UAAClient - -// UAAClient is the interface for getting a valid access token -type UAAClient interface { - RefreshAccessToken(refreshToken string) (uaa.RefreshedTokens, error) -} - -//go:generate counterfeiter . TokenCache - -// TokenCache is where the UAA token information is stored. -type TokenCache interface { - AccessToken() string - RefreshToken() string - SetAccessToken(token string) - SetRefreshToken(token string) -} - -// UAAAuthentication wraps connections and adds authentication headers to all -// requests -type UAAAuthentication struct { - connection cfnetworking.Connection - client UAAClient - cache TokenCache -} - -// NewUAAAuthentication returns a pointer to a UAAAuthentication wrapper with -// the client and a token cache. -func NewUAAAuthentication(client UAAClient, cache TokenCache) *UAAAuthentication { - return &UAAAuthentication{ - client: client, - cache: cache, - } -} - -// Wrap sets the connection on the UAAAuthentication and returns itself -func (t *UAAAuthentication) Wrap(innerconnection cfnetworking.Connection) cfnetworking.Connection { - t.connection = innerconnection - return t -} - -// SetClient sets the UAA client that the wrapper will use. -func (t *UAAAuthentication) SetClient(client UAAClient) { - t.client = client -} - -// Make adds authentication headers to the passed in request and then calls the -// wrapped connection's Make. If the client is not set on the wrapper, it will -// not add any header or handle any authentication errors. -func (t *UAAAuthentication) Make(request *cfnetworking.Request, passedResponse *cfnetworking.Response) error { - request.Header.Set("Authorization", t.cache.AccessToken()) - - requestErr := t.connection.Make(request, passedResponse) - if _, ok := requestErr.(networkerror.InvalidAuthTokenError); ok { - tokens, err := t.client.RefreshAccessToken(t.cache.RefreshToken()) - if err != nil { - return err - } - - t.cache.SetAccessToken(tokens.AuthorizationToken()) - t.cache.SetRefreshToken(tokens.RefreshToken) - - if request.Body != nil { - err = request.ResetBody() - if err != nil { - return err - } - } - request.Header.Set("Authorization", t.cache.AccessToken()) - requestErr = t.connection.Make(request, passedResponse) - } - - return requestErr -} diff --git a/api/cfnetworking/wrapper/uaa_authentication_test.go b/api/cfnetworking/wrapper/uaa_authentication_test.go deleted file mode 100644 index 997dbfa3798..00000000000 --- a/api/cfnetworking/wrapper/uaa_authentication_test.go +++ /dev/null @@ -1,174 +0,0 @@ -package wrapper_test - -import ( - "errors" - "io/ioutil" - "net/http" - "strings" - - "code.cloudfoundry.org/cli/api/cfnetworking" - "code.cloudfoundry.org/cli/api/cfnetworking/cfnetworkingfakes" - . "code.cloudfoundry.org/cli/api/cfnetworking/wrapper" - "code.cloudfoundry.org/cli/api/cfnetworking/wrapper/util" - "code.cloudfoundry.org/cli/api/cfnetworking/wrapper/wrapperfakes" - "code.cloudfoundry.org/cli/api/uaa" - - "code.cloudfoundry.org/cli/api/cfnetworking/networkerror" - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" -) - -var _ = Describe("UAA Authentication", func() { - var ( - fakeConnection *cfnetworkingfakes.FakeConnection - fakeClient *wrapperfakes.FakeUAAClient - inMemoryCache *util.InMemoryCache - - wrapper cfnetworking.Connection - request *cfnetworking.Request - inner *UAAAuthentication - ) - - BeforeEach(func() { - fakeConnection = new(cfnetworkingfakes.FakeConnection) - fakeClient = new(wrapperfakes.FakeUAAClient) - inMemoryCache = util.NewInMemoryTokenCache() - inMemoryCache.SetAccessToken("a-ok") - - inner = NewUAAAuthentication(fakeClient, inMemoryCache) - wrapper = inner.Wrap(fakeConnection) - - request = &cfnetworking.Request{ - Request: &http.Request{ - Header: http.Header{}, - }, - } - }) - - Describe("Make", func() { - It("adds authentication headers", func() { - err := wrapper.Make(request, nil) - Expect(err).ToNot(HaveOccurred()) - - Expect(fakeConnection.MakeCallCount()).To(Equal(1)) - authenticatedRequest, _ := fakeConnection.MakeArgsForCall(0) - headers := authenticatedRequest.Header - Expect(headers["Authorization"]).To(ConsistOf([]string{"a-ok"})) - }) - - Context("when the token is valid", func() { - Context("when the request already has headers", func() { - It("preserves existing headers", func() { - request.Header.Add("Existing", "header") - err := wrapper.Make(request, nil) - Expect(err).ToNot(HaveOccurred()) - - Expect(fakeConnection.MakeCallCount()).To(Equal(1)) - authenticatedRequest, _ := fakeConnection.MakeArgsForCall(0) - headers := authenticatedRequest.Header - Expect(headers["Existing"]).To(ConsistOf([]string{"header"})) - }) - }) - - Context("when the wrapped connection returns nil", func() { - It("returns nil", func() { - fakeConnection.MakeReturns(nil) - - err := wrapper.Make(request, nil) - Expect(err).ToNot(HaveOccurred()) - }) - }) - - Context("when the wrapped connection returns an error", func() { - It("returns the error", func() { - innerError := errors.New("inner error") - fakeConnection.MakeReturns(innerError) - - err := wrapper.Make(request, nil) - Expect(err).To(Equal(innerError)) - }) - }) - }) - - Context("when the token is invalid", func() { - var ( - expectedBody string - request *cfnetworking.Request - executeErr error - ) - - BeforeEach(func() { - expectedBody = "this body content should be preserved" - body := strings.NewReader(expectedBody) - request = cfnetworking.NewRequest(&http.Request{ - Header: http.Header{}, - Body: ioutil.NopCloser(body), - }, body) - - makeCount := 0 - fakeConnection.MakeStub = func(request *cfnetworking.Request, response *cfnetworking.Response) error { - body, err := ioutil.ReadAll(request.Body) - Expect(err).NotTo(HaveOccurred()) - Expect(string(body)).To(Equal(expectedBody)) - - if makeCount == 0 { - makeCount += 1 - return networkerror.InvalidAuthTokenError{} - } else { - return nil - } - } - - inMemoryCache.SetAccessToken("what") - - fakeClient.RefreshAccessTokenReturns( - uaa.RefreshedTokens{ - AccessToken: "foobar-2", - RefreshToken: "bananananananana", - Type: "bearer", - }, - nil, - ) - }) - - JustBeforeEach(func() { - executeErr = wrapper.Make(request, nil) - }) - - It("should refresh the token", func() { - Expect(executeErr).ToNot(HaveOccurred()) - Expect(fakeClient.RefreshAccessTokenCallCount()).To(Equal(1)) - }) - - It("should resend the request", func() { - Expect(executeErr).ToNot(HaveOccurred()) - Expect(fakeConnection.MakeCallCount()).To(Equal(2)) - - requestArg, _ := fakeConnection.MakeArgsForCall(1) - Expect(requestArg.Header.Get("Authorization")).To(Equal("bearer foobar-2")) - }) - - It("should save the refresh token", func() { - Expect(executeErr).ToNot(HaveOccurred()) - Expect(inMemoryCache.RefreshToken()).To(Equal("bananananananana")) - }) - - Context("when the reseting the request body fails", func() { - BeforeEach(func() { - fakeConnection.MakeReturnsOnCall(0, networkerror.InvalidAuthTokenError{}) - - fakeReadSeeker := new(cfnetworkingfakes.FakeReadSeeker) - fakeReadSeeker.SeekReturns(0, errors.New("oh noes")) - - req, err := http.NewRequest(http.MethodGet, "https://foo.bar.com/banana", fakeReadSeeker) - Expect(err).NotTo(HaveOccurred()) - request = cfnetworking.NewRequest(req, fakeReadSeeker) - }) - - It("returns error on seek", func() { - Expect(executeErr).To(MatchError("oh noes")) - }) - }) - }) - }) -}) diff --git a/api/cfnetworking/wrapper/util/in_memory_cache.go b/api/cfnetworking/wrapper/util/in_memory_cache.go deleted file mode 100644 index 91ef7af265a..00000000000 --- a/api/cfnetworking/wrapper/util/in_memory_cache.go +++ /dev/null @@ -1,26 +0,0 @@ -package util - -type InMemoryCache struct { - accessToken string - refreshToken string -} - -func (c InMemoryCache) AccessToken() string { - return c.accessToken -} - -func (c InMemoryCache) RefreshToken() string { - return c.refreshToken -} - -func (c *InMemoryCache) SetAccessToken(token string) { - c.accessToken = token -} - -func (c *InMemoryCache) SetRefreshToken(token string) { - c.refreshToken = token -} - -func NewInMemoryTokenCache() *InMemoryCache { - return new(InMemoryCache) -} diff --git a/api/cfnetworking/wrapper/wrapper_suite_test.go b/api/cfnetworking/wrapper/wrapper_suite_test.go deleted file mode 100644 index 2dd0a88f68f..00000000000 --- a/api/cfnetworking/wrapper/wrapper_suite_test.go +++ /dev/null @@ -1,36 +0,0 @@ -package wrapper_test - -import ( - "bytes" - "log" - - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" - . "github.com/onsi/gomega/ghttp" - - "testing" -) - -func TestWrapper(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Wrapper Suite") -} - -var server *Server - -var _ = SynchronizedBeforeSuite(func() []byte { - return []byte{} -}, func(data []byte) { - server = NewTLSServer() - - // Suppresses ginkgo server logs - server.HTTPTestServer.Config.ErrorLog = log.New(&bytes.Buffer{}, "", 0) -}) - -var _ = SynchronizedAfterSuite(func() { - server.Close() -}, func() {}) - -var _ = BeforeEach(func() { - server.Reset() -}) diff --git a/api/cfnetworking/wrapper/wrapperfakes/fake_request_logger_output.go b/api/cfnetworking/wrapper/wrapperfakes/fake_request_logger_output.go deleted file mode 100644 index 6d59ca2daf1..00000000000 --- a/api/cfnetworking/wrapper/wrapperfakes/fake_request_logger_output.go +++ /dev/null @@ -1,613 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package wrapperfakes - -import ( - "sync" - "time" - - "code.cloudfoundry.org/cli/api/cfnetworking/wrapper" -) - -type FakeRequestLoggerOutput struct { - DisplayHeaderStub func(name string, value string) error - displayHeaderMutex sync.RWMutex - displayHeaderArgsForCall []struct { - name string - value string - } - displayHeaderReturns struct { - result1 error - } - displayHeaderReturnsOnCall map[int]struct { - result1 error - } - DisplayHostStub func(name string) error - displayHostMutex sync.RWMutex - displayHostArgsForCall []struct { - name string - } - displayHostReturns struct { - result1 error - } - displayHostReturnsOnCall map[int]struct { - result1 error - } - DisplayJSONBodyStub func(body []byte) error - displayJSONBodyMutex sync.RWMutex - displayJSONBodyArgsForCall []struct { - body []byte - } - displayJSONBodyReturns struct { - result1 error - } - displayJSONBodyReturnsOnCall map[int]struct { - result1 error - } - DisplayMessageStub func(msg string) error - displayMessageMutex sync.RWMutex - displayMessageArgsForCall []struct { - msg string - } - displayMessageReturns struct { - result1 error - } - displayMessageReturnsOnCall map[int]struct { - result1 error - } - DisplayRequestHeaderStub func(method string, uri string, httpProtocol string) error - displayRequestHeaderMutex sync.RWMutex - displayRequestHeaderArgsForCall []struct { - method string - uri string - httpProtocol string - } - displayRequestHeaderReturns struct { - result1 error - } - displayRequestHeaderReturnsOnCall map[int]struct { - result1 error - } - DisplayResponseHeaderStub func(httpProtocol string, status string) error - displayResponseHeaderMutex sync.RWMutex - displayResponseHeaderArgsForCall []struct { - httpProtocol string - status string - } - displayResponseHeaderReturns struct { - result1 error - } - displayResponseHeaderReturnsOnCall map[int]struct { - result1 error - } - DisplayTypeStub func(name string, requestDate time.Time) error - displayTypeMutex sync.RWMutex - displayTypeArgsForCall []struct { - name string - requestDate time.Time - } - displayTypeReturns struct { - result1 error - } - displayTypeReturnsOnCall map[int]struct { - result1 error - } - HandleInternalErrorStub func(err error) - handleInternalErrorMutex sync.RWMutex - handleInternalErrorArgsForCall []struct { - err error - } - StartStub func() error - startMutex sync.RWMutex - startArgsForCall []struct{} - startReturns struct { - result1 error - } - startReturnsOnCall map[int]struct { - result1 error - } - StopStub func() error - stopMutex sync.RWMutex - stopArgsForCall []struct{} - stopReturns struct { - result1 error - } - stopReturnsOnCall map[int]struct { - result1 error - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeRequestLoggerOutput) DisplayHeader(name string, value string) error { - fake.displayHeaderMutex.Lock() - ret, specificReturn := fake.displayHeaderReturnsOnCall[len(fake.displayHeaderArgsForCall)] - fake.displayHeaderArgsForCall = append(fake.displayHeaderArgsForCall, struct { - name string - value string - }{name, value}) - fake.recordInvocation("DisplayHeader", []interface{}{name, value}) - fake.displayHeaderMutex.Unlock() - if fake.DisplayHeaderStub != nil { - return fake.DisplayHeaderStub(name, value) - } - if specificReturn { - return ret.result1 - } - return fake.displayHeaderReturns.result1 -} - -func (fake *FakeRequestLoggerOutput) DisplayHeaderCallCount() int { - fake.displayHeaderMutex.RLock() - defer fake.displayHeaderMutex.RUnlock() - return len(fake.displayHeaderArgsForCall) -} - -func (fake *FakeRequestLoggerOutput) DisplayHeaderArgsForCall(i int) (string, string) { - fake.displayHeaderMutex.RLock() - defer fake.displayHeaderMutex.RUnlock() - return fake.displayHeaderArgsForCall[i].name, fake.displayHeaderArgsForCall[i].value -} - -func (fake *FakeRequestLoggerOutput) DisplayHeaderReturns(result1 error) { - fake.DisplayHeaderStub = nil - fake.displayHeaderReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeRequestLoggerOutput) DisplayHeaderReturnsOnCall(i int, result1 error) { - fake.DisplayHeaderStub = nil - if fake.displayHeaderReturnsOnCall == nil { - fake.displayHeaderReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.displayHeaderReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeRequestLoggerOutput) DisplayHost(name string) error { - fake.displayHostMutex.Lock() - ret, specificReturn := fake.displayHostReturnsOnCall[len(fake.displayHostArgsForCall)] - fake.displayHostArgsForCall = append(fake.displayHostArgsForCall, struct { - name string - }{name}) - fake.recordInvocation("DisplayHost", []interface{}{name}) - fake.displayHostMutex.Unlock() - if fake.DisplayHostStub != nil { - return fake.DisplayHostStub(name) - } - if specificReturn { - return ret.result1 - } - return fake.displayHostReturns.result1 -} - -func (fake *FakeRequestLoggerOutput) DisplayHostCallCount() int { - fake.displayHostMutex.RLock() - defer fake.displayHostMutex.RUnlock() - return len(fake.displayHostArgsForCall) -} - -func (fake *FakeRequestLoggerOutput) DisplayHostArgsForCall(i int) string { - fake.displayHostMutex.RLock() - defer fake.displayHostMutex.RUnlock() - return fake.displayHostArgsForCall[i].name -} - -func (fake *FakeRequestLoggerOutput) DisplayHostReturns(result1 error) { - fake.DisplayHostStub = nil - fake.displayHostReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeRequestLoggerOutput) DisplayHostReturnsOnCall(i int, result1 error) { - fake.DisplayHostStub = nil - if fake.displayHostReturnsOnCall == nil { - fake.displayHostReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.displayHostReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeRequestLoggerOutput) DisplayJSONBody(body []byte) error { - var bodyCopy []byte - if body != nil { - bodyCopy = make([]byte, len(body)) - copy(bodyCopy, body) - } - fake.displayJSONBodyMutex.Lock() - ret, specificReturn := fake.displayJSONBodyReturnsOnCall[len(fake.displayJSONBodyArgsForCall)] - fake.displayJSONBodyArgsForCall = append(fake.displayJSONBodyArgsForCall, struct { - body []byte - }{bodyCopy}) - fake.recordInvocation("DisplayJSONBody", []interface{}{bodyCopy}) - fake.displayJSONBodyMutex.Unlock() - if fake.DisplayJSONBodyStub != nil { - return fake.DisplayJSONBodyStub(body) - } - if specificReturn { - return ret.result1 - } - return fake.displayJSONBodyReturns.result1 -} - -func (fake *FakeRequestLoggerOutput) DisplayJSONBodyCallCount() int { - fake.displayJSONBodyMutex.RLock() - defer fake.displayJSONBodyMutex.RUnlock() - return len(fake.displayJSONBodyArgsForCall) -} - -func (fake *FakeRequestLoggerOutput) DisplayJSONBodyArgsForCall(i int) []byte { - fake.displayJSONBodyMutex.RLock() - defer fake.displayJSONBodyMutex.RUnlock() - return fake.displayJSONBodyArgsForCall[i].body -} - -func (fake *FakeRequestLoggerOutput) DisplayJSONBodyReturns(result1 error) { - fake.DisplayJSONBodyStub = nil - fake.displayJSONBodyReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeRequestLoggerOutput) DisplayJSONBodyReturnsOnCall(i int, result1 error) { - fake.DisplayJSONBodyStub = nil - if fake.displayJSONBodyReturnsOnCall == nil { - fake.displayJSONBodyReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.displayJSONBodyReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeRequestLoggerOutput) DisplayMessage(msg string) error { - fake.displayMessageMutex.Lock() - ret, specificReturn := fake.displayMessageReturnsOnCall[len(fake.displayMessageArgsForCall)] - fake.displayMessageArgsForCall = append(fake.displayMessageArgsForCall, struct { - msg string - }{msg}) - fake.recordInvocation("DisplayMessage", []interface{}{msg}) - fake.displayMessageMutex.Unlock() - if fake.DisplayMessageStub != nil { - return fake.DisplayMessageStub(msg) - } - if specificReturn { - return ret.result1 - } - return fake.displayMessageReturns.result1 -} - -func (fake *FakeRequestLoggerOutput) DisplayMessageCallCount() int { - fake.displayMessageMutex.RLock() - defer fake.displayMessageMutex.RUnlock() - return len(fake.displayMessageArgsForCall) -} - -func (fake *FakeRequestLoggerOutput) DisplayMessageArgsForCall(i int) string { - fake.displayMessageMutex.RLock() - defer fake.displayMessageMutex.RUnlock() - return fake.displayMessageArgsForCall[i].msg -} - -func (fake *FakeRequestLoggerOutput) DisplayMessageReturns(result1 error) { - fake.DisplayMessageStub = nil - fake.displayMessageReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeRequestLoggerOutput) DisplayMessageReturnsOnCall(i int, result1 error) { - fake.DisplayMessageStub = nil - if fake.displayMessageReturnsOnCall == nil { - fake.displayMessageReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.displayMessageReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeRequestLoggerOutput) DisplayRequestHeader(method string, uri string, httpProtocol string) error { - fake.displayRequestHeaderMutex.Lock() - ret, specificReturn := fake.displayRequestHeaderReturnsOnCall[len(fake.displayRequestHeaderArgsForCall)] - fake.displayRequestHeaderArgsForCall = append(fake.displayRequestHeaderArgsForCall, struct { - method string - uri string - httpProtocol string - }{method, uri, httpProtocol}) - fake.recordInvocation("DisplayRequestHeader", []interface{}{method, uri, httpProtocol}) - fake.displayRequestHeaderMutex.Unlock() - if fake.DisplayRequestHeaderStub != nil { - return fake.DisplayRequestHeaderStub(method, uri, httpProtocol) - } - if specificReturn { - return ret.result1 - } - return fake.displayRequestHeaderReturns.result1 -} - -func (fake *FakeRequestLoggerOutput) DisplayRequestHeaderCallCount() int { - fake.displayRequestHeaderMutex.RLock() - defer fake.displayRequestHeaderMutex.RUnlock() - return len(fake.displayRequestHeaderArgsForCall) -} - -func (fake *FakeRequestLoggerOutput) DisplayRequestHeaderArgsForCall(i int) (string, string, string) { - fake.displayRequestHeaderMutex.RLock() - defer fake.displayRequestHeaderMutex.RUnlock() - return fake.displayRequestHeaderArgsForCall[i].method, fake.displayRequestHeaderArgsForCall[i].uri, fake.displayRequestHeaderArgsForCall[i].httpProtocol -} - -func (fake *FakeRequestLoggerOutput) DisplayRequestHeaderReturns(result1 error) { - fake.DisplayRequestHeaderStub = nil - fake.displayRequestHeaderReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeRequestLoggerOutput) DisplayRequestHeaderReturnsOnCall(i int, result1 error) { - fake.DisplayRequestHeaderStub = nil - if fake.displayRequestHeaderReturnsOnCall == nil { - fake.displayRequestHeaderReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.displayRequestHeaderReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeRequestLoggerOutput) DisplayResponseHeader(httpProtocol string, status string) error { - fake.displayResponseHeaderMutex.Lock() - ret, specificReturn := fake.displayResponseHeaderReturnsOnCall[len(fake.displayResponseHeaderArgsForCall)] - fake.displayResponseHeaderArgsForCall = append(fake.displayResponseHeaderArgsForCall, struct { - httpProtocol string - status string - }{httpProtocol, status}) - fake.recordInvocation("DisplayResponseHeader", []interface{}{httpProtocol, status}) - fake.displayResponseHeaderMutex.Unlock() - if fake.DisplayResponseHeaderStub != nil { - return fake.DisplayResponseHeaderStub(httpProtocol, status) - } - if specificReturn { - return ret.result1 - } - return fake.displayResponseHeaderReturns.result1 -} - -func (fake *FakeRequestLoggerOutput) DisplayResponseHeaderCallCount() int { - fake.displayResponseHeaderMutex.RLock() - defer fake.displayResponseHeaderMutex.RUnlock() - return len(fake.displayResponseHeaderArgsForCall) -} - -func (fake *FakeRequestLoggerOutput) DisplayResponseHeaderArgsForCall(i int) (string, string) { - fake.displayResponseHeaderMutex.RLock() - defer fake.displayResponseHeaderMutex.RUnlock() - return fake.displayResponseHeaderArgsForCall[i].httpProtocol, fake.displayResponseHeaderArgsForCall[i].status -} - -func (fake *FakeRequestLoggerOutput) DisplayResponseHeaderReturns(result1 error) { - fake.DisplayResponseHeaderStub = nil - fake.displayResponseHeaderReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeRequestLoggerOutput) DisplayResponseHeaderReturnsOnCall(i int, result1 error) { - fake.DisplayResponseHeaderStub = nil - if fake.displayResponseHeaderReturnsOnCall == nil { - fake.displayResponseHeaderReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.displayResponseHeaderReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeRequestLoggerOutput) DisplayType(name string, requestDate time.Time) error { - fake.displayTypeMutex.Lock() - ret, specificReturn := fake.displayTypeReturnsOnCall[len(fake.displayTypeArgsForCall)] - fake.displayTypeArgsForCall = append(fake.displayTypeArgsForCall, struct { - name string - requestDate time.Time - }{name, requestDate}) - fake.recordInvocation("DisplayType", []interface{}{name, requestDate}) - fake.displayTypeMutex.Unlock() - if fake.DisplayTypeStub != nil { - return fake.DisplayTypeStub(name, requestDate) - } - if specificReturn { - return ret.result1 - } - return fake.displayTypeReturns.result1 -} - -func (fake *FakeRequestLoggerOutput) DisplayTypeCallCount() int { - fake.displayTypeMutex.RLock() - defer fake.displayTypeMutex.RUnlock() - return len(fake.displayTypeArgsForCall) -} - -func (fake *FakeRequestLoggerOutput) DisplayTypeArgsForCall(i int) (string, time.Time) { - fake.displayTypeMutex.RLock() - defer fake.displayTypeMutex.RUnlock() - return fake.displayTypeArgsForCall[i].name, fake.displayTypeArgsForCall[i].requestDate -} - -func (fake *FakeRequestLoggerOutput) DisplayTypeReturns(result1 error) { - fake.DisplayTypeStub = nil - fake.displayTypeReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeRequestLoggerOutput) DisplayTypeReturnsOnCall(i int, result1 error) { - fake.DisplayTypeStub = nil - if fake.displayTypeReturnsOnCall == nil { - fake.displayTypeReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.displayTypeReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeRequestLoggerOutput) HandleInternalError(err error) { - fake.handleInternalErrorMutex.Lock() - fake.handleInternalErrorArgsForCall = append(fake.handleInternalErrorArgsForCall, struct { - err error - }{err}) - fake.recordInvocation("HandleInternalError", []interface{}{err}) - fake.handleInternalErrorMutex.Unlock() - if fake.HandleInternalErrorStub != nil { - fake.HandleInternalErrorStub(err) - } -} - -func (fake *FakeRequestLoggerOutput) HandleInternalErrorCallCount() int { - fake.handleInternalErrorMutex.RLock() - defer fake.handleInternalErrorMutex.RUnlock() - return len(fake.handleInternalErrorArgsForCall) -} - -func (fake *FakeRequestLoggerOutput) HandleInternalErrorArgsForCall(i int) error { - fake.handleInternalErrorMutex.RLock() - defer fake.handleInternalErrorMutex.RUnlock() - return fake.handleInternalErrorArgsForCall[i].err -} - -func (fake *FakeRequestLoggerOutput) Start() error { - fake.startMutex.Lock() - ret, specificReturn := fake.startReturnsOnCall[len(fake.startArgsForCall)] - fake.startArgsForCall = append(fake.startArgsForCall, struct{}{}) - fake.recordInvocation("Start", []interface{}{}) - fake.startMutex.Unlock() - if fake.StartStub != nil { - return fake.StartStub() - } - if specificReturn { - return ret.result1 - } - return fake.startReturns.result1 -} - -func (fake *FakeRequestLoggerOutput) StartCallCount() int { - fake.startMutex.RLock() - defer fake.startMutex.RUnlock() - return len(fake.startArgsForCall) -} - -func (fake *FakeRequestLoggerOutput) StartReturns(result1 error) { - fake.StartStub = nil - fake.startReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeRequestLoggerOutput) StartReturnsOnCall(i int, result1 error) { - fake.StartStub = nil - if fake.startReturnsOnCall == nil { - fake.startReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.startReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeRequestLoggerOutput) Stop() error { - fake.stopMutex.Lock() - ret, specificReturn := fake.stopReturnsOnCall[len(fake.stopArgsForCall)] - fake.stopArgsForCall = append(fake.stopArgsForCall, struct{}{}) - fake.recordInvocation("Stop", []interface{}{}) - fake.stopMutex.Unlock() - if fake.StopStub != nil { - return fake.StopStub() - } - if specificReturn { - return ret.result1 - } - return fake.stopReturns.result1 -} - -func (fake *FakeRequestLoggerOutput) StopCallCount() int { - fake.stopMutex.RLock() - defer fake.stopMutex.RUnlock() - return len(fake.stopArgsForCall) -} - -func (fake *FakeRequestLoggerOutput) StopReturns(result1 error) { - fake.StopStub = nil - fake.stopReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeRequestLoggerOutput) StopReturnsOnCall(i int, result1 error) { - fake.StopStub = nil - if fake.stopReturnsOnCall == nil { - fake.stopReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.stopReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeRequestLoggerOutput) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.displayHeaderMutex.RLock() - defer fake.displayHeaderMutex.RUnlock() - fake.displayHostMutex.RLock() - defer fake.displayHostMutex.RUnlock() - fake.displayJSONBodyMutex.RLock() - defer fake.displayJSONBodyMutex.RUnlock() - fake.displayMessageMutex.RLock() - defer fake.displayMessageMutex.RUnlock() - fake.displayRequestHeaderMutex.RLock() - defer fake.displayRequestHeaderMutex.RUnlock() - fake.displayResponseHeaderMutex.RLock() - defer fake.displayResponseHeaderMutex.RUnlock() - fake.displayTypeMutex.RLock() - defer fake.displayTypeMutex.RUnlock() - fake.handleInternalErrorMutex.RLock() - defer fake.handleInternalErrorMutex.RUnlock() - fake.startMutex.RLock() - defer fake.startMutex.RUnlock() - fake.stopMutex.RLock() - defer fake.stopMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeRequestLoggerOutput) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ wrapper.RequestLoggerOutput = new(FakeRequestLoggerOutput) diff --git a/api/cfnetworking/wrapper/wrapperfakes/fake_token_cache.go b/api/cfnetworking/wrapper/wrapperfakes/fake_token_cache.go deleted file mode 100644 index 7777a3e6a1a..00000000000 --- a/api/cfnetworking/wrapper/wrapperfakes/fake_token_cache.go +++ /dev/null @@ -1,201 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package wrapperfakes - -import ( - "sync" - - "code.cloudfoundry.org/cli/api/cfnetworking/wrapper" -) - -type FakeTokenCache struct { - AccessTokenStub func() string - accessTokenMutex sync.RWMutex - accessTokenArgsForCall []struct{} - accessTokenReturns struct { - result1 string - } - accessTokenReturnsOnCall map[int]struct { - result1 string - } - RefreshTokenStub func() string - refreshTokenMutex sync.RWMutex - refreshTokenArgsForCall []struct{} - refreshTokenReturns struct { - result1 string - } - refreshTokenReturnsOnCall map[int]struct { - result1 string - } - SetAccessTokenStub func(token string) - setAccessTokenMutex sync.RWMutex - setAccessTokenArgsForCall []struct { - token string - } - SetRefreshTokenStub func(token string) - setRefreshTokenMutex sync.RWMutex - setRefreshTokenArgsForCall []struct { - token string - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeTokenCache) AccessToken() string { - fake.accessTokenMutex.Lock() - ret, specificReturn := fake.accessTokenReturnsOnCall[len(fake.accessTokenArgsForCall)] - fake.accessTokenArgsForCall = append(fake.accessTokenArgsForCall, struct{}{}) - fake.recordInvocation("AccessToken", []interface{}{}) - fake.accessTokenMutex.Unlock() - if fake.AccessTokenStub != nil { - return fake.AccessTokenStub() - } - if specificReturn { - return ret.result1 - } - return fake.accessTokenReturns.result1 -} - -func (fake *FakeTokenCache) AccessTokenCallCount() int { - fake.accessTokenMutex.RLock() - defer fake.accessTokenMutex.RUnlock() - return len(fake.accessTokenArgsForCall) -} - -func (fake *FakeTokenCache) AccessTokenReturns(result1 string) { - fake.AccessTokenStub = nil - fake.accessTokenReturns = struct { - result1 string - }{result1} -} - -func (fake *FakeTokenCache) AccessTokenReturnsOnCall(i int, result1 string) { - fake.AccessTokenStub = nil - if fake.accessTokenReturnsOnCall == nil { - fake.accessTokenReturnsOnCall = make(map[int]struct { - result1 string - }) - } - fake.accessTokenReturnsOnCall[i] = struct { - result1 string - }{result1} -} - -func (fake *FakeTokenCache) RefreshToken() string { - fake.refreshTokenMutex.Lock() - ret, specificReturn := fake.refreshTokenReturnsOnCall[len(fake.refreshTokenArgsForCall)] - fake.refreshTokenArgsForCall = append(fake.refreshTokenArgsForCall, struct{}{}) - fake.recordInvocation("RefreshToken", []interface{}{}) - fake.refreshTokenMutex.Unlock() - if fake.RefreshTokenStub != nil { - return fake.RefreshTokenStub() - } - if specificReturn { - return ret.result1 - } - return fake.refreshTokenReturns.result1 -} - -func (fake *FakeTokenCache) RefreshTokenCallCount() int { - fake.refreshTokenMutex.RLock() - defer fake.refreshTokenMutex.RUnlock() - return len(fake.refreshTokenArgsForCall) -} - -func (fake *FakeTokenCache) RefreshTokenReturns(result1 string) { - fake.RefreshTokenStub = nil - fake.refreshTokenReturns = struct { - result1 string - }{result1} -} - -func (fake *FakeTokenCache) RefreshTokenReturnsOnCall(i int, result1 string) { - fake.RefreshTokenStub = nil - if fake.refreshTokenReturnsOnCall == nil { - fake.refreshTokenReturnsOnCall = make(map[int]struct { - result1 string - }) - } - fake.refreshTokenReturnsOnCall[i] = struct { - result1 string - }{result1} -} - -func (fake *FakeTokenCache) SetAccessToken(token string) { - fake.setAccessTokenMutex.Lock() - fake.setAccessTokenArgsForCall = append(fake.setAccessTokenArgsForCall, struct { - token string - }{token}) - fake.recordInvocation("SetAccessToken", []interface{}{token}) - fake.setAccessTokenMutex.Unlock() - if fake.SetAccessTokenStub != nil { - fake.SetAccessTokenStub(token) - } -} - -func (fake *FakeTokenCache) SetAccessTokenCallCount() int { - fake.setAccessTokenMutex.RLock() - defer fake.setAccessTokenMutex.RUnlock() - return len(fake.setAccessTokenArgsForCall) -} - -func (fake *FakeTokenCache) SetAccessTokenArgsForCall(i int) string { - fake.setAccessTokenMutex.RLock() - defer fake.setAccessTokenMutex.RUnlock() - return fake.setAccessTokenArgsForCall[i].token -} - -func (fake *FakeTokenCache) SetRefreshToken(token string) { - fake.setRefreshTokenMutex.Lock() - fake.setRefreshTokenArgsForCall = append(fake.setRefreshTokenArgsForCall, struct { - token string - }{token}) - fake.recordInvocation("SetRefreshToken", []interface{}{token}) - fake.setRefreshTokenMutex.Unlock() - if fake.SetRefreshTokenStub != nil { - fake.SetRefreshTokenStub(token) - } -} - -func (fake *FakeTokenCache) SetRefreshTokenCallCount() int { - fake.setRefreshTokenMutex.RLock() - defer fake.setRefreshTokenMutex.RUnlock() - return len(fake.setRefreshTokenArgsForCall) -} - -func (fake *FakeTokenCache) SetRefreshTokenArgsForCall(i int) string { - fake.setRefreshTokenMutex.RLock() - defer fake.setRefreshTokenMutex.RUnlock() - return fake.setRefreshTokenArgsForCall[i].token -} - -func (fake *FakeTokenCache) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.accessTokenMutex.RLock() - defer fake.accessTokenMutex.RUnlock() - fake.refreshTokenMutex.RLock() - defer fake.refreshTokenMutex.RUnlock() - fake.setAccessTokenMutex.RLock() - defer fake.setAccessTokenMutex.RUnlock() - fake.setRefreshTokenMutex.RLock() - defer fake.setRefreshTokenMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeTokenCache) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ wrapper.TokenCache = new(FakeTokenCache) diff --git a/api/cfnetworking/wrapper/wrapperfakes/fake_uaaclient.go b/api/cfnetworking/wrapper/wrapperfakes/fake_uaaclient.go deleted file mode 100644 index ca453b6aaa0..00000000000 --- a/api/cfnetworking/wrapper/wrapperfakes/fake_uaaclient.go +++ /dev/null @@ -1,104 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package wrapperfakes - -import ( - "sync" - - "code.cloudfoundry.org/cli/api/cfnetworking/wrapper" - "code.cloudfoundry.org/cli/api/uaa" -) - -type FakeUAAClient struct { - RefreshAccessTokenStub func(refreshToken string) (uaa.RefreshedTokens, error) - refreshAccessTokenMutex sync.RWMutex - refreshAccessTokenArgsForCall []struct { - refreshToken string - } - refreshAccessTokenReturns struct { - result1 uaa.RefreshedTokens - result2 error - } - refreshAccessTokenReturnsOnCall map[int]struct { - result1 uaa.RefreshedTokens - result2 error - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeUAAClient) RefreshAccessToken(refreshToken string) (uaa.RefreshedTokens, error) { - fake.refreshAccessTokenMutex.Lock() - ret, specificReturn := fake.refreshAccessTokenReturnsOnCall[len(fake.refreshAccessTokenArgsForCall)] - fake.refreshAccessTokenArgsForCall = append(fake.refreshAccessTokenArgsForCall, struct { - refreshToken string - }{refreshToken}) - fake.recordInvocation("RefreshAccessToken", []interface{}{refreshToken}) - fake.refreshAccessTokenMutex.Unlock() - if fake.RefreshAccessTokenStub != nil { - return fake.RefreshAccessTokenStub(refreshToken) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fake.refreshAccessTokenReturns.result1, fake.refreshAccessTokenReturns.result2 -} - -func (fake *FakeUAAClient) RefreshAccessTokenCallCount() int { - fake.refreshAccessTokenMutex.RLock() - defer fake.refreshAccessTokenMutex.RUnlock() - return len(fake.refreshAccessTokenArgsForCall) -} - -func (fake *FakeUAAClient) RefreshAccessTokenArgsForCall(i int) string { - fake.refreshAccessTokenMutex.RLock() - defer fake.refreshAccessTokenMutex.RUnlock() - return fake.refreshAccessTokenArgsForCall[i].refreshToken -} - -func (fake *FakeUAAClient) RefreshAccessTokenReturns(result1 uaa.RefreshedTokens, result2 error) { - fake.RefreshAccessTokenStub = nil - fake.refreshAccessTokenReturns = struct { - result1 uaa.RefreshedTokens - result2 error - }{result1, result2} -} - -func (fake *FakeUAAClient) RefreshAccessTokenReturnsOnCall(i int, result1 uaa.RefreshedTokens, result2 error) { - fake.RefreshAccessTokenStub = nil - if fake.refreshAccessTokenReturnsOnCall == nil { - fake.refreshAccessTokenReturnsOnCall = make(map[int]struct { - result1 uaa.RefreshedTokens - result2 error - }) - } - fake.refreshAccessTokenReturnsOnCall[i] = struct { - result1 uaa.RefreshedTokens - result2 error - }{result1, result2} -} - -func (fake *FakeUAAClient) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.refreshAccessTokenMutex.RLock() - defer fake.refreshAccessTokenMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeUAAClient) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ wrapper.UAAClient = new(FakeUAAClient) diff --git a/command/v7/shared/new_networking_client.go b/command/v7/shared/new_networking_client.go index e2a48b3a5d8..24057e3df88 100644 --- a/command/v7/shared/new_networking_client.go +++ b/command/v7/shared/new_networking_client.go @@ -1,8 +1,8 @@ package shared import ( - "code.cloudfoundry.org/cli/api/cfnetworking/cfnetv1" - "code.cloudfoundry.org/cli/api/cfnetworking/wrapper" + "code.cloudfoundry.org/cfnetworking-cli-api/cfnetworking/cfnetv1" + "code.cloudfoundry.org/cfnetworking-cli-api/cfnetworking/wrapper" "code.cloudfoundry.org/cli/api/uaa" "code.cloudfoundry.org/cli/command" "code.cloudfoundry.org/cli/command/translatableerror" diff --git a/go.mod b/go.mod index cc38e8ad00b..902709a2b95 100644 --- a/go.mod +++ b/go.mod @@ -4,6 +4,7 @@ go 1.21 require ( code.cloudfoundry.org/bytefmt v0.0.0-20230612151507-41ef4d1f67a4 + code.cloudfoundry.org/cfnetworking-cli-api v0.0.0-20190103195135-4b04f26287a6 code.cloudfoundry.org/cli-plugin-repo v0.0.0-20200304195157-af98c4be9b85 code.cloudfoundry.org/cli/integration/assets/hydrabroker v0.0.0-20201002233634-81722a1144e4 code.cloudfoundry.org/clock v1.1.0 diff --git a/go.sum b/go.sum index d3a304136af..34e1c4d504b 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,7 @@ code.cloudfoundry.org/bytefmt v0.0.0-20230612151507-41ef4d1f67a4 h1:9G5F8zgma5v0GdDvNz6iZwwJp3RS/z0SY/aHGfVwvTo= code.cloudfoundry.org/bytefmt v0.0.0-20230612151507-41ef4d1f67a4/go.mod h1:wYHCXH/gI19ujoFVuMkY48qPpPCoHLKBKXPkn67h/Yc= +code.cloudfoundry.org/cfnetworking-cli-api v0.0.0-20190103195135-4b04f26287a6 h1:Yc9r1p21kEpni9WlG4mwOZw87TB2QlyS9sAEebZ3+ak= +code.cloudfoundry.org/cfnetworking-cli-api v0.0.0-20190103195135-4b04f26287a6/go.mod h1:u5FovqC5GGAEbFPz+IdjycDA+gIjhUwqxnu0vbHwVeM= code.cloudfoundry.org/cli-plugin-repo v0.0.0-20200304195157-af98c4be9b85 h1:jaHWw9opYjKPrDT19uydBBWSxl+g5F4Hv030fqMsalo= code.cloudfoundry.org/cli-plugin-repo v0.0.0-20200304195157-af98c4be9b85/go.mod h1:R1EiyOAr7lW0l/YkZNqItUNZ01Q/dYUfbTn4X4Z+82M= code.cloudfoundry.org/cli/integration/assets/hydrabroker v0.0.0-20201002233634-81722a1144e4 h1:O+j8afQWaDuxzKGcculsjgHGK+biBTn6iMjgFpBf54c= From 4dbc937bb9d0a10edf2c2bd33c7df13157eea1e5 Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Tue, 19 Sep 2023 09:45:39 -0700 Subject: [PATCH 09/15] Replace depracted ginkgo calls with non deprecated calls --- Makefile | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index efda26cae3f..f53a3de16ee 100644 --- a/Makefile +++ b/Makefile @@ -18,11 +18,11 @@ UNAME_S := $(shell uname -s) SLOW_SPEC_THRESHOLD=120 -GINKGO_FLAGS ?= -r -randomizeAllSpecs -requireSuite +GINKGO_FLAGS ?= -r -randomize-all -require-suite GINKGO_INT_FLAGS = $(GINKGO_FLAGS) -slowSpecThreshold $(SLOW_SPEC_THRESHOLD) ginkgo_int = ginkgo $(GINKGO_INT_FLAGS) -GINKGO_UNITS_FLAGS = $(GINKGO_FLAGS) -randomizeSuites -p +GINKGO_UNITS_FLAGS = $(GINKGO_FLAGS) -randomize-suites -p ginkgo_units = ginkgo $(GINKGO_UNITS_FLAGS) GOFLAGS := -mod=mod @@ -138,9 +138,9 @@ integration-full-tests: integration-tests-full integration-tests-full: build integration-cleanup integration-isolated integration-push integration-experimental integration-plugin integration-global integration-selfcontained ## Run all isolated, push, experimental, plugin, selfcontained, and global integration tests integration-tests-full-ci: integration-cleanup - $(ginkgo_int) -nodes $(NODES) -flakeAttempts $(FLAKE_ATTEMPTS) \ + $(ginkgo_int) -nodes $(NODES) -flake-attempts $(FLAKE_ATTEMPTS) \ integration/shared/isolated integration/v7/isolated integration/shared/plugin integration/shared/experimental integration/v7/experimental integration/v7/push - $(ginkgo_int) -flakeAttempts $(FLAKE_ATTEMPTS) integration/shared/global integration/v7/global + $(ginkgo_int) -flake-attempts $(FLAKE_ATTEMPTS) integration/shared/global integration/v7/global lint: custom-lint ## Runs all linters and formatters @echo "Running linters..." @@ -200,22 +200,22 @@ test: units ## (synonym for units) units: units-full ## (synonym for units-full) units-plugin: - CF_HOME=$(CURDIR)/fixtures $(ginkgo_units) -nodes 1 -flakeAttempts 2 -skipPackage integration ./**/plugin* ./plugin + CF_HOME=$(CURDIR)/fixtures $(ginkgo_units) -nodes 1 -flake-attempts 2 -skip-package integration ./**/plugin* ./plugin ifeq ($(OS),Windows_NT) units-non-plugin: @rm -f $(wildcard fixtures/plugins/*.exe) @ginkgo version CF_HOME=$(CURDIR)/fixtures CF_USERNAME="" CF_PASSWORD="" $(ginkgo_units) \ - -skipPackage integration,cf\ssh,plugin,cf\actors\plugin,cf\commands\plugin,cf\actors\plugin,util\randomword - CF_HOME=$(CURDIR)/fixtures $(ginkgo_units) -flakeAttempts 3 cf/ssh + -skip-package integration,cf\ssh,plugin,cf\actors\plugin,cf\commands\plugin,cf\actors\plugin,util\randomword + CF_HOME=$(CURDIR)/fixtures $(ginkgo_units) -flake-attempts 3 cf/ssh else units-non-plugin: @rm -f $(wildcard fixtures/plugins/*.exe) @ginkgo version CF_HOME=$(CURDIR)/fixtures CF_USERNAME="" CF_PASSWORD="" $(ginkgo_units) \ - -skipPackage integration,cf/ssh,plugin,cf/actors/plugin,cf/commands/plugin,cf/actors/plugin,util/randomword - CF_HOME=$(CURDIR)/fixtures $(ginkgo_units) -flakeAttempts 3 cf/ssh + -skip-package integration,cf/ssh,plugin,cf/actors/plugin,cf/commands/plugin,cf/actors/plugin,util/randomword + CF_HOME=$(CURDIR)/fixtures $(ginkgo_units) -flake-attempts 3 cf/ssh endif units-full: build units-plugin units-non-plugin From 79ab485722ff09ec29613b7e2b41a712f3cc3c3f Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Tue, 19 Sep 2023 09:51:22 -0700 Subject: [PATCH 10/15] Update github actions to ginkgo v2 --- .github/workflows/tests-integration-reusable.yml | 4 ++-- .github/workflows/tests-unit.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests-integration-reusable.yml b/.github/workflows/tests-integration-reusable.yml index c7630e73a52..2917ad99c59 100644 --- a/.github/workflows/tests-integration-reusable.yml +++ b/.github/workflows/tests-integration-reusable.yml @@ -240,7 +240,7 @@ jobs: make build - go install github.com/onsi/ginkgo/ginkgo@v1.16.4 + go install github.com/onsi/ginkgo/v2/ginkgo export CF_PASSWORD=${CF_INT_PASSWORD} cf api ${CF_INT_API} --skip-ssl-validation @@ -270,7 +270,7 @@ jobs: make build - go install github.com/onsi/ginkgo/ginkgo@v1.16.4 + go install github.com/onsi/ginkgo/v2/ginkgo export CF_PASSWORD=${CF_INT_PASSWORD} cf api ${CF_INT_API} --skip-ssl-validation diff --git a/.github/workflows/tests-unit.yml b/.github/workflows/tests-unit.yml index dc3bea482ec..07a5ddaaf27 100644 --- a/.github/workflows/tests-unit.yml +++ b/.github/workflows/tests-unit.yml @@ -67,7 +67,7 @@ jobs: - name: Set Up Test run: | - go install github.com/onsi/ginkgo/ginkgo@v1.16.4 + go install github.com/onsi/ginkgo/v2/ginkgo go install github.com/onsi/gomega/matchers - name: Run Units @@ -100,7 +100,7 @@ jobs: - name: Set up Test run: | - go install github.com/onsi/ginkgo/ginkgo@v1.16.4 + go install github.com/onsi/ginkgo/v2/ginkgo go install github.com/onsi/gomega/matchers - name: Get build-time dependencies From 4a81c2c0af0f7ba049ef44bff3f9f7b3702dada2 Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Tue, 19 Sep 2023 14:13:33 -0700 Subject: [PATCH 11/15] Remove ACK_GINKGO_RC - don't need to acknowledge since this moves to ginkgo v2 --- .github/workflows/tests-unit.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/tests-unit.yml b/.github/workflows/tests-unit.yml index 07a5ddaaf27..46f288735a3 100644 --- a/.github/workflows/tests-unit.yml +++ b/.github/workflows/tests-unit.yml @@ -72,8 +72,6 @@ jobs: - name: Run Units run: make units - env: - ACK_GINKGO_RC: true units-windows: name: Units Windows @@ -108,8 +106,6 @@ jobs: choco install --no-progress --limit-output -y make - name: Run Windows Units - env: - ACK_GINKGO_RC: true run: | Get-Command make Get-Item Makefile From fced3a72e1e165c932ed192946f9c971d4f1d5f7 Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Tue, 19 Sep 2023 14:19:40 -0700 Subject: [PATCH 12/15] bump to latest ginkgo v2 --- go.sum | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/go.sum b/go.sum index 34e1c4d504b..93308837ffd 100644 --- a/go.sum +++ b/go.sum @@ -14,10 +14,10 @@ code.cloudfoundry.org/go-log-cache/v2 v2.0.7 h1:yR/JjQ/RscO1n4xVAT9HDYcpx5ET/3Cq code.cloudfoundry.org/go-log-cache/v2 v2.0.7/go.mod h1:6KQe2FeeaqRheD5vCvpyTa80YoJojB/r21E54mT97Mc= code.cloudfoundry.org/go-loggregator/v9 v9.2.0 h1:YNVD654RhMWzG195DZm0gNnrWAJJhEw/gd/cc5Bv28s= code.cloudfoundry.org/go-loggregator/v9 v9.2.0/go.mod h1:AP7PmrWSpyC9ltOQHcwF16BVkAVXS96i8+8gwI4lXRY= -code.cloudfoundry.org/inigo v0.0.0-20230612153013-b300679e6ed6 h1:lhQNfVleRMX7dsZVZViC0gI9r/rwkO+esz06+HDCSu0= -code.cloudfoundry.org/inigo v0.0.0-20230612153013-b300679e6ed6/go.mod h1:1ZB1JCh2FAp+SqX79ve6dc8YREvbsziULEOncAilX4Q= code.cloudfoundry.org/gofileutils v0.0.0-20170111115228-4d0c80011a0f h1:UrKzEwTgeiff9vxdrfdqxibzpWjxLnuXDI5m6z3GJAk= code.cloudfoundry.org/gofileutils v0.0.0-20170111115228-4d0c80011a0f/go.mod h1:sk5LnIjB/nIEU7yP5sDQExVm62wu0pBh3yrElngUisI= +code.cloudfoundry.org/inigo v0.0.0-20230612153013-b300679e6ed6 h1:lhQNfVleRMX7dsZVZViC0gI9r/rwkO+esz06+HDCSu0= +code.cloudfoundry.org/inigo v0.0.0-20230612153013-b300679e6ed6/go.mod h1:1ZB1JCh2FAp+SqX79ve6dc8YREvbsziULEOncAilX4Q= code.cloudfoundry.org/jsonry v1.1.4 h1:P9N7IlH1/4aRCLcXLgLFj1hkcBmV7muijJzY+K6U4hE= code.cloudfoundry.org/jsonry v1.1.4/go.mod h1:6aKilShQP7w/Ez76h1El2/n9y2OkHuU56nKSBB9Gp0A= code.cloudfoundry.org/lager v1.1.1-0.20191008172124-a9afc05ee5be/go.mod h1:O2sS7gKP3HM2iemG+EnwvyNQK7pTSC6Foi4QiMp9sSk= From f3a176bfa5bb2e270ba5da839549bcaed0d12b87 Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Wed, 15 Nov 2023 16:53:20 -0800 Subject: [PATCH 13/15] Desperate attempt at resolving output issue by using serial decorator and using non deprecated pty Since the issue seems related to running in parallel, we'll force the ssh_test to run in serial --- cf/ssh/ssh_test.go | 2 +- go.mod | 4 ++-- util/clissh/ssh_test.go | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cf/ssh/ssh_test.go b/cf/ssh/ssh_test.go index 69b9c0cbd38..f356f215f77 100644 --- a/cf/ssh/ssh_test.go +++ b/cf/ssh/ssh_test.go @@ -29,7 +29,7 @@ import ( "code.cloudfoundry.org/diego-ssh/test_helpers/fake_net" "code.cloudfoundry.org/diego-ssh/test_helpers/fake_ssh" "code.cloudfoundry.org/lager/v3/lagertest" - "github.com/kr/pty" + "github.com/creack/pty" "github.com/moby/term" "golang.org/x/crypto/ssh" diff --git a/go.mod b/go.mod index 902709a2b95..01e76a6e4a9 100644 --- a/go.mod +++ b/go.mod @@ -19,12 +19,12 @@ require ( github.com/SermoDigital/jose v0.9.2-0.20161205224733-f6df55f235c2 github.com/blang/semver/v4 v4.0.0 github.com/cloudfoundry/bosh-cli v6.4.1+incompatible + github.com/creack/pty v1.1.18 github.com/cyphar/filepath-securejoin v0.2.4 github.com/docker/distribution v2.8.3+incompatible github.com/fatih/color v1.16.0 github.com/google/go-querystring v1.1.0 github.com/jessevdk/go-flags v1.5.0 - github.com/kr/pty v1.1.8 github.com/lunixbochs/vtclean v1.0.0 github.com/mattn/go-colorable v0.1.13 github.com/mattn/go-runewidth v0.0.15 @@ -56,7 +56,6 @@ require ( github.com/charlievieth/fs v0.0.3 // indirect github.com/cloudfoundry/bosh-utils v0.0.397 // indirect github.com/cppforlife/go-patch v0.1.0 // indirect - github.com/creack/pty v1.1.18 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/distribution/reference v0.5.0 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect @@ -70,6 +69,7 @@ require ( github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 // indirect github.com/imdario/mergo v0.3.6 // indirect github.com/json-iterator/go v1.1.12 // indirect + github.com/kr/pty v1.1.8 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect diff --git a/util/clissh/ssh_test.go b/util/clissh/ssh_test.go index d87a223676b..55970d15be1 100644 --- a/util/clissh/ssh_test.go +++ b/util/clissh/ssh_test.go @@ -27,7 +27,7 @@ import ( "code.cloudfoundry.org/diego-ssh/test_helpers/fake_net" "code.cloudfoundry.org/diego-ssh/test_helpers/fake_ssh" "code.cloudfoundry.org/lager/v3/lagertest" - "github.com/kr/pty" + "github.com/creack/pty" "github.com/moby/term" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" @@ -50,7 +50,7 @@ func BlockAcceptOnClose(fake *fake_net.FakeListener) { } } -var _ = Describe("CLI SSH", func() { +var _ = Describe("CLI SSH", Serial, func() { var ( fakeSecureDialer *clisshfakes.FakeSecureDialer fakeSecureClient *clisshfakes.FakeSecureClient From cff41f88df68076b0d1497e96d3e324549cfc845 Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Thu, 16 Nov 2023 16:45:40 -0800 Subject: [PATCH 14/15] Even moar serial to ssh_test --- util/clissh/ssh_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/util/clissh/ssh_test.go b/util/clissh/ssh_test.go index 55970d15be1..18d07e0577d 100644 --- a/util/clissh/ssh_test.go +++ b/util/clissh/ssh_test.go @@ -125,7 +125,7 @@ var _ = Describe("CLI SSH", Serial, func() { ) }) - Describe("Connect", func() { + Describe("Connect", Serial, func() { var connectErr error JustBeforeEach(func() { @@ -175,7 +175,7 @@ var _ = Describe("CLI SSH", Serial, func() { }) }) - Describe("InteractiveSession", func() { + Describe("InteractiveSession", Serial, func() { var ( stdin *fake_io.FakeReadCloser stdout, stderr *fake_io.FakeWriter @@ -820,7 +820,7 @@ var _ = Describe("CLI SSH", Serial, func() { }) }) - Describe("LocalPortForward", func() { + Describe("LocalPortForward", Serial, func() { var ( forwardErr error @@ -1149,7 +1149,7 @@ var _ = Describe("CLI SSH", Serial, func() { }) }) - Describe("Wait", func() { + Describe("Wait", Serial, func() { var waitErr error JustBeforeEach(func() { @@ -1203,7 +1203,7 @@ var _ = Describe("CLI SSH", Serial, func() { }) }) - Describe("Close", func() { + Describe("Close", Serial, func() { JustBeforeEach(func() { connectErr := secureShell.Connect(username, passcode, sshEndpoint, sshEndpointFingerprint, skipHostValidation) Expect(connectErr).NotTo(HaveOccurred()) From b4a86fa3e3ec95e3a1b421562e773ef8e4d34d87 Mon Sep 17 00:00:00 2001 From: Al Berez Date: Thu, 1 Feb 2024 11:28:16 -0800 Subject: [PATCH 15/15] Turn off Gingkno v2 parallel mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cristhian Peña --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f53a3de16ee..efcea5fdfeb 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ GINKGO_FLAGS ?= -r -randomize-all -require-suite GINKGO_INT_FLAGS = $(GINKGO_FLAGS) -slowSpecThreshold $(SLOW_SPEC_THRESHOLD) ginkgo_int = ginkgo $(GINKGO_INT_FLAGS) -GINKGO_UNITS_FLAGS = $(GINKGO_FLAGS) -randomize-suites -p +GINKGO_UNITS_FLAGS = $(GINKGO_FLAGS) -randomize-suites ginkgo_units = ginkgo $(GINKGO_UNITS_FLAGS) GOFLAGS := -mod=mod