knative-extensions / kn-plugin-admin

Kn plugin for managing a Kubernetes based Knative installation.
Apache License 2.0
7 stars 18 forks source link

UT issue with GO 1.15 #26

Closed zhi-gang-sun closed 3 years ago

zhi-gang-sun commented 3 years ago

there is one UT case failed when build with 1.15 version.

owen@owens-mbp-2 kn-plugin-admin % hack/build.sh :fire_engine: Update go: downloading k8s.io/client-go v0.17.4 go: downloading k8s.io/apimachinery v0.17.4 go: downloading github.com/spf13/cobra v0.0.6 go: downloading gotest.tools v2.2.0+incompatible go: downloading knative.dev/client v0.14.0 go: downloading knative.dev/serving v0.14.0 go: downloading k8s.io/api v0.17.4 go: downloading github.com/stretchr/testify v1.4.0 go: downloading github.com/spf13/viper v1.6.2 go: downloading github.com/mitchellh/go-homedir v1.1.0 go: downloading github.com/google/go-cmp v0.3.1 go: downloading knative.dev/eventing v0.14.1 go: downloading github.com/hashicorp/hcl v1.0.0 go: downloading sigs.k8s.io/yaml v1.1.0 go: downloading golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 go: downloading github.com/pmezard/go-difflib v1.0.0 go: downloading github.com/spf13/jwalterweatherman v1.0.0 go: downloading github.com/evanphx/json-patch v4.5.0+incompatible go: downloading golang.org/x/net v0.0.0-20191004110552-13f9640d40b9 go: downloading knative.dev/pkg v0.0.0-20200414233146-0eed424fa4ee go: downloading k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a go: downloading github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d go: downloading github.com/googleapis/gnostic v0.2.2 go: downloading github.com/subosito/gotenv v1.2.0 go: downloading cloud.google.com/go v0.45.1 go: downloading github.com/pkg/errors v0.8.1 go: downloading github.com/spf13/cast v1.3.0 go: downloading github.com/pelletier/go-toml v1.2.0 go: downloading google.golang.org/appengine v1.6.2 go: downloading github.com/magiconair/properties v1.8.1 go: downloading github.com/davecgh/go-spew v1.1.1 go: downloading github.com/mitchellh/mapstructure v1.1.2 go: downloading gopkg.in/inf.v0 v0.9.1 go: downloading github.com/robfig/cron v1.2.0 go: downloading golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975 go: downloading github.com/golang/protobuf v1.3.2 go: downloading github.com/spf13/pflag v1.0.5 go: downloading k8s.io/utils v0.0.0-20191114184206-e782cd3c129f go: downloading k8s.io/klog v1.0.0 go: downloading github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96 go: downloading github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e go: downloading github.com/ghodss/yaml v1.0.0 go: downloading gopkg.in/yaml.v2 v2.2.8 go: downloading github.com/google/uuid v1.1.1 go: downloading github.com/inconshreveable/mousetrap v1.0.0 go: downloading github.com/google/go-containerregistry v0.0.0-20200413145205-82d30a103c0a go: downloading github.com/maximilien/kn-source-pkg v0.4.8 go: downloading github.com/spf13/afero v1.2.2 go: downloading github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 go: downloading github.com/fsnotify/fsnotify v1.4.7 go: downloading github.com/onsi/ginkgo v1.10.1 go: downloading gopkg.in/ini.v1 v1.51.0 go: downloading github.com/imdario/mergo v0.3.5 go: downloading github.com/google/gofuzz v1.0.0 go: downloading go.uber.org/zap v1.10.0 go: downloading github.com/onsi/gomega v1.7.0 go: downloading gomodules.xyz/jsonpatch/v2 v2.1.0 go: downloading go.opencensus.io v0.22.1 go: downloading github.com/json-iterator/go v1.1.8 go: downloading golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e go: downloading contrib.go.opencensus.io/exporter/prometheus v0.1.0 go: downloading go.uber.org/multierr v1.1.0 go: downloading github.com/modern-go/reflect2 v1.0.1 go: downloading google.golang.org/api v0.10.0 go: downloading gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 go: downloading golang.org/x/text v0.3.2 go: downloading golang.org/x/sys v0.0.0-20191010194322-b09406accb47 go: downloading k8s.io/cli-runtime v0.17.0 go: downloading github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd go: downloading go.uber.org/atomic v1.4.0 go: downloading golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 go: downloading github.com/go-logr/logr v0.1.0 go: downloading github.com/openzipkin/zipkin-go v0.2.2 go: downloading contrib.go.opencensus.io/exporter/stackdriver v0.13.1 go: downloading contrib.go.opencensus.io/exporter/ocagent v0.6.0 go: downloading github.com/BurntSushi/toml v0.3.1 go: downloading github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 go: downloading github.com/prometheus/client_golang v1.0.0 go: downloading google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51 go: downloading github.com/census-instrumentation/opencensus-proto v0.2.1 go: downloading github.com/peterbourgon/diskv v2.0.1+incompatible go: downloading github.com/smartystreets/goconvey v1.6.4 go: downloading github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 go: downloading github.com/hashicorp/golang-lru v0.5.3 go: downloading github.com/google/btree v1.0.0 go: downloading github.com/prometheus/common v0.4.1 go: downloading github.com/prometheus/procfs v0.0.2 go: downloading google.golang.org/grpc v1.24.0 go: downloading github.com/grpc-ecosystem/grpc-gateway v1.9.5 go: downloading github.com/aws/aws-sdk-go v1.27.1 go: downloading github.com/jtolds/gls v4.20.0+incompatible go: downloading github.com/kr/pretty v0.1.0 go: downloading github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d go: downloading github.com/googleapis/gax-go/v2 v2.0.5 go: downloading github.com/matttproud/golang_protobuf_extensions v1.0.1 go: downloading github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 go: downloading github.com/hpcloud/tail v1.0.0 go: downloading github.com/kr/text v0.1.0 go: downloading github.com/beorn7/perks v1.0.0 go: downloading sigs.k8s.io/kustomize v2.0.3+incompatible go: downloading github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b go: downloading gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 go: downloading github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de go: downloading gopkg.in/fsnotify.v1 v1.4.7 go: downloading github.com/go-openapi/spec v0.19.3 go: downloading github.com/emicklei/go-restful v2.9.5+incompatible go: downloading github.com/go-openapi/jsonreference v0.19.3 go: downloading github.com/go-openapi/swag v0.19.5 go: downloading github.com/go-openapi/jsonpointer v0.19.3 go: downloading github.com/PuerkitoBio/purell v1.1.1 go: downloading github.com/mailru/easyjson v0.7.0 go: downloading github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 go: downloading github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af :hand: No ‘goimports’ found. Please use :hand: go install golang.org/x/tools/cmd/goimports :hand: to enable import cleanup. Import cleanup skipped. 🧹 Format :scales: License :construction: Compile 🧪 Test :fire: Failure === RUN TestAdminParams_installationMethod === RUN TestAdminParams_installationMethod/managed_by_KnativeOperator === RUN TestAdminParams_installationMethod/Installed_by_standalone_mode --- PASS: TestAdminParams_installationMethod (0.00s) --- PASS: TestAdminParams_installationMethod/managed_by_KnativeOperator (0.00s) --- PASS: TestAdminParams_installationMethod/Installed_by_standalone_mode (0.00s) === RUN TestAdminParams_EnsureInstallMethodStandalone === RUN TestAdminParams_EnsureInstallMethodStandalone/Installation_method_unknown === RUN TestAdminParams_EnsureInstallMethodStandalone/Installation_method_operator === RUN TestAdminParams_EnsureInstallMethodStandalone/Installation_method_standalone --- PASS: TestAdminParams_EnsureInstallMethodStandalone (0.00s) --- PASS: TestAdminParams_EnsureInstallMethodStandalone/Installation_method_unknown (0.00s) --- PASS: TestAdminParams_EnsureInstallMethodStandalone/Installation_method_operator (0.00s) --- PASS: TestAdminParams_EnsureInstallMethodStandalone/Installation_method_standalone (0.00s) PASS ok knative.dev/kn-plugin-admin/pkg (cached) === RUN TestVersionOutput --- PASS: TestVersionOutput (0.00s) PASS ok knative.dev/kn-plugin-admin/pkg/command (cached) === RUN TestNewAsUpdateSetCommand === RUN TestNewAsUpdateSetCommand/no_flags === RUN TestNewAsUpdateSetCommand/operator_mode_should_not_be_supported === RUN TestNewAsUpdateSetCommand/config_map_not_exist === RUN TestNewAsUpdateSetCommand/enable_scale-to-zero_successfully === RUN TestNewAsUpdateSetCommand/disable_scale-to-zero_successfully === RUN TestNewAsUpdateSetCommand/enable_scale-to-zero_but_it’s_already_enabled === RUN TestNewAsUpdateSetCommand/update_container-concurrency-target-percentage_successfully === RUN TestNewAsUpdateSetCommand/update_stable-window_successfully debug stable-window 120s === RUN TestNewAsUpdateSetCommand/return_error_if_set_stable-window_less_than_6s === RUN TestNewAsUpdateSetCommand/return_error_if_set_max-scale-up-rate_less_than_1.0 === RUN TestNewAsUpdateSetCommand/return_error_if_set_max-scale-down-rate_less_than_1.0 === RUN TestNewAsUpdateSetCommand/return_error_if_set_scale-to-zero-grace-period_less_than_6s === RUN TestNewAsUpdateSetCommand/return_error_if_scale-to-zero-grace-period_is_not_time_duration

****update_test.go:242: assertion failed: expected error to contain “missing unit in duration 60”, got “invalid argument \“60\” for \“--scale-to-zero-grace-period\” flag: time: missing unit in duration \“60\“”: invalid argument “60" for “--scale-to-zero-grace-period” flag: time: missing unit in duration “60"****

=== RUN TestNewAsUpdateSetCommand/update_scale-to-zero-pod-retention-period_successfully === RUN TestNewAsUpdateSetCommand/return_error_target-burst-capacity_if_setto-5 === RUN TestNewAsUpdateSetCommand/update_pod-autoscaler-class_successfully === RUN TestNewAsUpdateSetCommand/return_error_if_set_activator-capacity_to_less_than_1 FAIL: TestNewAsUpdateSetCommand (0.01s) --- PASS: TestNewAsUpdateSetCommand/no_flags (0.00s) --- PASS: TestNewAsUpdateSetCommand/operator_mode_should_not_be_supported (0.00s) --- PASS: TestNewAsUpdateSetCommand/config_map_not_exist (0.00s) --- PASS: TestNewAsUpdateSetCommand/enable_scale-to-zero_successfully (0.00s) --- PASS: TestNewAsUpdateSetCommand/disable_scale-to-zero_successfully (0.00s) --- PASS: TestNewAsUpdateSetCommand/enable_scale-to-zero_but_it’s_already_enabled (0.00s) --- PASS: TestNewAsUpdateSetCommand/update_container-concurrency-target-percentage_successfully (0.00s) --- PASS: TestNewAsUpdateSetCommand/update_stable-window_successfully (0.00s) --- PASS: TestNewAsUpdateSetCommand/return_error_if_set_stable-window_less_than_6s (0.00s) --- PASS: TestNewAsUpdateSetCommand/return_error_if_set_max-scale-up-rate_less_than_1.0 (0.00s) --- PASS: TestNewAsUpdateSetCommand/return_error_if_set_max-scale-down-rate_less_than_1.0 (0.00s) --- PASS: TestNewAsUpdateSetCommand/return_error_if_set_scale-to-zero-grace-period_less_than_6s (0.00s) FAIL: TestNewAsUpdateSetCommand/return_error_if_scale-to-zero-grace-period_is_not_time_duration (0.00s) --- PASS: TestNewAsUpdateSetCommand/update_scale-to-zero-pod-retention-period_successfully (0.00s) --- PASS: TestNewAsUpdateSetCommand/return_error_target-burst-capacity_if_setto-5 (0.00s) --- PASS: TestNewAsUpdateSetCommand/update_pod-autoscaler-class_successfully (0.00s) --- PASS: TestNewAsUpdateSetCommand/return_error_if_set_activator-capacity_to_less_than_1 (0.00s) FAIL FAIL knative.dev/kn-plugin-admin/pkg/command/autoscaling 0.861s === RUN TestNewDomainCmd --- PASS: TestNewDomainCmd (0.00s) === RUN Test_formatSelectorForPrint === RUN Test_formatSelectorForPrint/normal_case_with_one_selector_key_value === RUN Test_formatSelectorForPrint/normal_case_with_two_selector_key_value === RUN Test_formatSelectorForPrint/invalid_input_no_selector === RUN Test_formatSelectorForPrint/invalid_input_no_selector_value === RUN Test_formatSelectorForPrint/invalid_input_wrong_selector_value === RUN Test_formatSelectorForPrint/invalid_input_wrong_selector_values === RUN Test_formatSelectorForPrint/empty_selector --- PASS: Test_formatSelectorForPrint (0.00s) --- PASS: Test_formatSelectorForPrint/normal_case_with_one_selector_key_value (0.00s) --- PASS: Test_formatSelectorForPrint/normal_case_with_two_selector_key_value (0.00s) --- PASS: Test_formatSelectorForPrint/invalid_input_no_selector (0.00s) --- PASS: Test_formatSelectorForPrint/invalid_input_no_selector_value (0.00s) --- PASS: Test_formatSelectorForPrint/invalid_input_wrong_selector_value (0.00s) --- PASS: Test_formatSelectorForPrint/invalid_input_wrong_selector_values (0.00s) --- PASS: Test_formatSelectorForPrint/empty_selector (0.00s) === RUN TestDomainListEmpty === RUN TestDomainListEmpty/list_domain --- PASS: TestDomainListEmpty (0.00s) --- PASS: TestDomainListEmpty/list_domain (0.00s) === RUN TestDomainListCommand === RUN TestDomainListCommand/list_domain --- PASS: TestDomainListCommand (0.00s) --- PASS: TestDomainListCommand/list_domain (0.00s) === RUN TestDomainListCommandNoHeader === RUN TestDomainListCommandNoHeader/list_domain --- PASS: TestDomainListCommandNoHeader (0.00s) --- PASS: TestDomainListCommandNoHeader/list_domain (0.00s) === RUN TestNewDomainSetCommand === RUN TestNewDomainSetCommand/incompleted_args === RUN TestNewDomainSetCommand/operator_mode_should_not_be_supported === RUN TestNewDomainSetCommand/config_map_not_exist === RUN TestNewDomainSetCommand/setting_domain_config_without_selector === RUN TestNewDomainSetCommand/setting_domain_config_with_unchanged_value === RUN TestNewDomainSetCommand/adding_domain_config_without_selector_with_existing_domain_configuration === RUN TestNewDomainSetCommand/adding_domain_config_with_selector === RUN TestNewDomainSetCommand/adding_domain_config_with_invalid_selector --- PASS: TestNewDomainSetCommand (0.00s) --- PASS: TestNewDomainSetCommand/incompleted_args (0.00s) --- PASS: TestNewDomainSetCommand/operator_mode_should_not_be_supported (0.00s) --- PASS: TestNewDomainSetCommand/config_map_not_exist (0.00s) --- PASS: TestNewDomainSetCommand/setting_domain_config_without_selector (0.00s) --- PASS: TestNewDomainSetCommand/setting_domain_config_with_unchanged_value (0.00s) --- PASS: TestNewDomainSetCommand/adding_domain_config_without_selector_with_existing_domain_configuration (0.00s) --- PASS: TestNewDomainSetCommand/adding_domain_config_with_selector (0.00s) --- PASS: TestNewDomainSetCommand/adding_domain_config_with_invalid_selector (0.00s) === RUN Test_splitByEqualSign === RUN Test_splitByEqualSign/normal_case === RUN Test_splitByEqualSign/normal_case_with_spaces === RUN Test_splitByEqualSign/empty_key_and_value === RUN Test_splitByEqualSign/space_key_and_value === RUN Test_splitByEqualSign/empty_key_1 === RUN Test_splitByEqualSign/empty_key_2 === RUN Test_splitByEqualSign/empty_value_1 === RUN Test_splitByEqualSign/empty_value_2 === RUN Test_splitByEqualSign/invalid_input_1 === RUN Test_splitByEqualSign/invalid_input_2 --- PASS: Test_splitByEqualSign (0.00s) --- PASS: Test_splitByEqualSign/normal_case (0.00s) --- PASS: Test_splitByEqualSign/normal_case_with_spaces (0.00s) --- PASS: Test_splitByEqualSign/empty_key_and_value (0.00s) --- PASS: Test_splitByEqualSign/space_key_and_value (0.00s) --- PASS: Test_splitByEqualSign/empty_key_1 (0.00s) --- PASS: Test_splitByEqualSign/empty_key_2 (0.00s) --- PASS: Test_splitByEqualSign/empty_value_1 (0.00s) --- PASS: Test_splitByEqualSign/empty_value_2 (0.00s) --- PASS: Test_splitByEqualSign/invalid_input_1 (0.00s) --- PASS: Test_splitByEqualSign/invalid_input_2 (0.00s) === RUN TestNewDomainUnSetCommand === RUN TestNewDomainUnSetCommand/incompleted_args === RUN TestNewDomainUnSetCommand/config_map_not_exist === RUN TestNewDomainUnSetCommand/route_domain_not_found === RUN TestNewDomainUnSetCommand/unset_domain --- PASS: TestNewDomainUnSetCommand (0.00s) --- PASS: TestNewDomainUnSetCommand/incompleted_args (0.00s) --- PASS: TestNewDomainUnSetCommand/config_map_not_exist (0.00s) --- PASS: TestNewDomainUnSetCommand/route_domain_not_found (0.00s) --- PASS: TestNewDomainUnSetCommand/unset_domain (0.00s) PASS ok knative.dev/kn-plugin-admin/pkg/command/domain (cached) === RUN TestProfileDownloader_connect === RUN TestProfileDownloader_connect/connect_success === RUN TestProfileDownloader_connect/dial_error --- PASS: TestProfileDownloader_connect (0.00s) --- PASS: TestProfileDownloader_connect/connect_success (0.00s) --- PASS: TestProfileDownloader_connect/dial_error (0.00s) === RUN TestProfileDownload === RUN TestProfileDownload/download_heap_profile_success === RUN TestProfileDownload/download_error_caused_by_response_code === RUN TestProfileDownload/unsupported_profile_type === RUN TestProfileDownload/error_occoured_while_download_is_not_started === RUN TestProfileDownload/request_canceled_while_download_is_started 2020/12/02 15:34:46 httptest.Server blocked in Close after 5 seconds, waiting for connections: *net.TCPConn 0xc000010020 127.0.0.1:56113 in state active --- PASS: TestProfileDownload (16.03s) --- PASS: TestProfileDownload/download_heap_profile_success (0.00s) --- PASS: TestProfileDownload/download_error_caused_by_response_code (0.00s) --- PASS: TestProfileDownload/unsupported_profile_type (0.00s) --- PASS: TestProfileDownload/error_occoured_while_download_is_not_started (0.00s) --- PASS: TestProfileDownload/request_canceled_while_download_is_started (16.03s) === RUN TestOptionProfilingTime === RUN TestOptionProfilingTime/setting_to_30s === RUN TestOptionProfilingTime/setting_to_10_min === RUN TestOptionProfilingTime/setting_to_0_seconds === RUN TestOptionProfilingTime/setting_to_10_millseconds --- PASS: TestOptionProfilingTime (0.00s) --- PASS: TestOptionProfilingTime/setting_to_30s (0.00s) --- PASS: TestOptionProfilingTime/setting_to_10_min (0.00s) --- PASS: TestOptionProfilingTime/setting_to_0_seconds (0.00s) --- PASS: TestOptionProfilingTime/setting_to_10_millseconds (0.00s) === RUN TestNewProfilingCommand === RUN TestNewProfilingCommand/runs_profiling_without_args === RUN TestNewProfilingCommand/runs_profiling_with_conflict_args === RUN TestNewProfilingCommand/parses_invalid_duration === RUN TestNewProfilingCommand/parses_valid_duration === RUN TestNewProfilingCommand/describes_duration === RUN TestNewProfilingCommand/failed_to_enable_profiling === RUN TestNewProfilingCommand/failed_to_disable_profiling === RUN TestNewProfilingCommand/successfully_enabled_profiling === RUN TestNewProfilingCommand/successfully_disabled_profiling === RUN TestNewProfilingCommand/save_path_folder_does_not_exist === RUN TestNewProfilingCommand/save_path_is_not_a_folder === RUN TestNewProfilingCommand/profiling_is_not_enabled_when_download_data === RUN TestNewProfilingCommand/failed_to_get_target === RUN TestNewProfilingCommand/target_is_not_found === RUN TestNewProfilingCommand/failed_to_get_downloader === RUN TestNewProfilingCommand/failed_to_download_data === RUN TestNewProfilingCommand/successfully_downloaded_profiling_data_for_a_specific_pod_target === RUN TestNewProfilingCommand/successfully_downloaded_profiling_data_for_a_knative_component === RUN TestNewProfilingCommand/successfully_downloaded_multiple_profiling_types_data === RUN TestNewProfilingCommand/successfully_downloaded_all_profiling_types_data --- PASS: TestNewProfilingCommand (0.02s) --- PASS: TestNewProfilingCommand/runs_profiling_without_args (0.00s) --- PASS: TestNewProfilingCommand/runs_profiling_with_conflict_args (0.02s) --- PASS: TestNewProfilingCommand/parses_invalid_duration (0.00s) --- PASS: TestNewProfilingCommand/parses_valid_duration (0.00s) --- PASS: TestNewProfilingCommand/describes_duration (0.00s) --- PASS: TestNewProfilingCommand/failed_to_enable_profiling (0.00s) --- PASS: TestNewProfilingCommand/failed_to_disable_profiling (0.00s) --- PASS: TestNewProfilingCommand/successfully_enabled_profiling (0.00s) --- PASS: TestNewProfilingCommand/successfully_disabled_profiling (0.00s) --- PASS: TestNewProfilingCommand/save_path_folder_does_not_exist (0.00s) --- PASS: TestNewProfilingCommand/save_path_is_not_a_folder (0.00s) --- PASS: TestNewProfilingCommand/profiling_is_not_enabled_when_download_data (0.00s) --- PASS: TestNewProfilingCommand/failed_to_get_target (0.00s) --- PASS: TestNewProfilingCommand/target_is_not_found (0.00s) --- PASS: TestNewProfilingCommand/failed_to_get_downloader (0.00s) --- PASS: TestNewProfilingCommand/failed_to_download_data (0.00s) --- PASS: TestNewProfilingCommand/successfully_downloaded_profiling_data_for_a_specific_pod_target (0.00s) --- PASS: TestNewProfilingCommand/successfully_downloaded_profiling_data_for_a_knative_component (0.00s) --- PASS: TestNewProfilingCommand/successfully_downloaded_multiple_profiling_types_data (0.00s) --- PASS: TestNewProfilingCommand/successfully_downloaded_all_profiling_types_data (0.00s) PASS ok knative.dev/kn-plugin-admin/pkg/command/profiling (cached) === RUN TestNewRegistryAddCommand === RUN TestNewRegistryAddCommand/incompleted_args_for_registry_add === RUN TestNewRegistryAddCommand/missing_default_serviceaccount === RUN TestNewRegistryAddCommand/adding_registry_secret_success_in_default_namespace_using_default_serviceaccount === RUN TestNewRegistryAddCommand/adding_registry_secret_success_in_custom_namespace_using_custom_serviceaccount === RUN TestNewRegistryAddCommand/adding_registry_secret_for_service_account_that_already_has_imagePullSecrets --- PASS: TestNewRegistryAddCommand (0.00s) --- PASS: TestNewRegistryAddCommand/incompleted_args_for_registry_add (0.00s) --- PASS: TestNewRegistryAddCommand/missing_default_serviceaccount (0.00s) --- PASS: TestNewRegistryAddCommand/adding_registry_secret_success_in_default_namespace_using_default_serviceaccount (0.00s) --- PASS: TestNewRegistryAddCommand/adding_registry_secret_success_in_custom_namespace_using_custom_serviceaccount (0.00s) --- PASS: TestNewRegistryAddCommand/adding_registry_secret_for_service_account_that_already_has_imagePullSecrets (0.00s) === RUN TestNewRegistryListCommand === RUN TestNewRegistryListCommand/list_registries_with_service_account_only_but_no_namespace_specified === RUN TestNewRegistryListCommand/list_registries_with_service_account_and_namespace_specified === RUN TestNewRegistryListCommand/list_registries_with_namespace_specified_only === RUN TestNewRegistryListCommand/list_all_registries_in_all_namespaces_and_service_accounts --- PASS: TestNewRegistryListCommand (0.00s) --- PASS: TestNewRegistryListCommand/list_registries_with_service_account_only_but_no_namespace_specified (0.00s) --- PASS: TestNewRegistryListCommand/list_registries_with_service_account_and_namespace_specified (0.00s) --- PASS: TestNewRegistryListCommand/list_registries_with_namespace_specified_only (0.00s) --- PASS: TestNewRegistryListCommand/list_all_registries_in_all_namespaces_and_service_accounts (0.00s) === RUN TestNewPrivateRegistryCmd --- PASS: TestNewPrivateRegistryCmd (0.00s) === RUN TestNewRegistryRmCommand === RUN TestNewRegistryRmCommand/incompleted_args_for_registry_remove === RUN TestNewRegistryRmCommand/registry_not_found === RUN TestNewRegistryRmCommand/registry_removed_successfully_in_default_namespace_using_default_serviceaccount === RUN TestNewRegistryRmCommand/registry_removed_successfully_in_custom_namespace_using_custom_serviceaccount --- PASS: TestNewRegistryRmCommand (0.00s) --- PASS: TestNewRegistryRmCommand/incompleted_args_for_registry_remove (0.00s) --- PASS: TestNewRegistryRmCommand/registry_not_found (0.00s) --- PASS: TestNewRegistryRmCommand/registry_removed_successfully_in_default_namespace_using_default_serviceaccount (0.00s) --- PASS: TestNewRegistryRmCommand/registry_removed_successfully_in_custom_namespace_using_custom_serviceaccount (0.00s) PASS ok knative.dev/kn-plugin-admin/pkg/command/registry (cached) === RUN TestUtils === RUN TestUtils/report_error_if_ConfigMap_not_found === RUN TestUtils/update_ConfigMap_successfully === RUN TestUtils/ConfigMap_not_changed_if_desired_one_is_equal_to_the_existed_one --- PASS: TestUtils (0.00s) --- PASS: TestUtils/report_error_if_ConfigMap_not_found (0.00s) --- PASS: TestUtils/update_ConfigMap_successfully (0.00s) --- PASS: TestUtils/ConfigMap_not_changed_if_desired_one_is_equal_to_the_existed_one (0.00s) PASS ok knative.dev/kn-plugin-admin/pkg/command/utils (cached) ? knative.dev/kn-plugin-admin/pkg/testutil [no test files] FAIL owen@owens-mbp-2 kn-plugin-admin %

zhanggbj commented 3 years ago

/assign

This is a issue introduced by go1.15.x

navidshaikh commented 3 years ago

I suspected that and tried running go test using go 1.14.x here https://github.com/knative-sandbox/kn-plugin-admin/pull/28/commits/03cd935c946a09804fc84a7a543dffeb84e31fba in the other PR, it works as expected.

zhanggbj commented 3 years ago

Fixed by https://github.com/knative-sandbox/kn-plugin-admin/pull/42. @zhi-gang-sun would you please help to close it! Thanks!