client/pkg/sources/v1alpha2
Navid Shaikh cc1b68e068
List inbuilt sources if CRD access is restricted (#948)
* List inbuilt sources if CRD access is restricted

 Fixes #947
 - Identify restricted access error
 - If server returns restricted access error, fallback to listing
   only eventing inbuilt sources using their GVKs.
 - List any inbuilt source (ApiServerSource) object and read the error
   to know if eventing is installed for `kn source list-types`.

* Fix golint warnings

* Remove unused imports

* Verify each built in source before listing source types

* Improve the check if sources are not installed in the cluster

* Update finding forbidden error

* Update finding errors

* Add unit tests for IsForbiddenError util

* Add unit tests

* Add tests for dynamic pkg library

* Add unit tests for case when no sources are installed

* Update test name
2020-08-04 04:42:28 -07:00
..
apiserver_client.go List inbuilt sources if CRD access is restricted (#948) 2020-08-04 04:42:28 -07:00
apiserver_client_mock.go chore: Update to Knative serving/eventing 0.14.0 (#810) 2020-04-16 14:27:48 -07:00
apiserver_client_mock_test.go chore: Update to Knative serving/eventing 0.14.0 (#810) 2020-04-16 14:27:48 -07:00
apiserver_client_test.go Add --ce-override flag for apiserver and ping sources (#865) 2020-06-01 02:39:03 -07:00
binding_client.go Add --ce-override flag for apiserver and ping sources (#865) 2020-06-01 02:39:03 -07:00
binding_client_mock.go refactor(source): Update to Knative eventing 0.13.0 (#705) 2020-03-06 13:47:27 -08:00
binding_client_mock_test.go refactor(source): Update to Knative eventing 0.13.0 (#705) 2020-03-06 13:47:27 -08:00
binding_client_test.go Add --ce-override flag for apiserver and ping sources (#865) 2020-06-01 02:39:03 -07:00
client.go List inbuilt sources if CRD access is restricted (#948) 2020-08-04 04:42:28 -07:00
client_test.go List inbuilt sources if CRD access is restricted (#948) 2020-08-04 04:42:28 -07:00
ping_client.go Add --ce-override flag for apiserver and ping sources (#865) 2020-06-01 02:39:03 -07:00
ping_client_mock.go refactor(source): Update to Knative eventing 0.13.0 (#705) 2020-03-06 13:47:27 -08:00
ping_client_mock_test.go refactor(source): Update to Knative eventing 0.13.0 (#705) 2020-03-06 13:47:27 -08:00
ping_client_test.go Add --ce-override flag for apiserver and ping sources (#865) 2020-06-01 02:39:03 -07:00