Repository: knative-sandbox/eventing-kafka-broker
Pull request #245 (2020-10-01 13:44:37)

[Automated] Upgrade to latest dependencies
Produced via:
```shell
./hack/update-deps.sh --upgrade
./hack/update-codegen.sh
```
/cc slinkydeveloper
/assign slinkydeveloper

knative-prow-robot: [APPROVALNOTIFIER] This PR is **APPROVED**

This pull-request has been approved by: *<a href="https://github.com/knative-sandbox/eventing-kafka-broker/pull/245#" title="Author self-approved">mattmoor</a>*

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=knative-sandbox%2Feventing-kafka-broker).

The pull request process is described [here](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process)

<details >
Needs approval from an approver in each of these files:

- ~~[OWNERS](https://github.com/knative-sandbox/eventing-kafka-broker/blob/master/OWNERS)~~ [mattmoor]

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":[]} -->
codecov[bot]: # [Codecov](https://codecov.io/gh/knative-sandbox/eventing-kafka-broker/pull/245?src=pr&el=h1) Report
> Merging [#245](https://codecov.io/gh/knative-sandbox/eventing-kafka-broker/pull/245?src=pr&el=desc) into [master](https://codecov.io/gh/knative-sandbox/eventing-kafka-broker/commit/5ee8e80d34c22d24465f0db0099c9bd77009144c?el=desc) will **decrease** coverage by `0.25%`.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/knative-sandbox/eventing-kafka-broker/pull/245/graphs/tree.svg?width=650&height=150&src=pr&token=xyPIgGOiwy)](https://codecov.io/gh/knative-sandbox/eventing-kafka-broker/pull/245?src=pr&el=tree)

```diff
@@             Coverage Diff              @@
##             master     #245      +/-   ##
============================================
- Coverage     76.30%   76.05%   -0.26%     
  Complexity      170      170              
============================================
  Files            49       27      -22     
  Lines          1435      714     -721     
  Branches         46       46              
============================================
- Hits           1095      543     -552     
+ Misses          271      149     -122     
+ Partials         69       22      -47     
```

| Flag | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| #java-unittests | `76.05% <ø> (ø)` | `170.00 <ø> (ø)` | |
| #unittests | `?` | `?` | |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.

| [Impacted Files](https://codecov.io/gh/knative-sandbox/eventing-kafka-broker/pull/245?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [control-plane/pkg/core/config/utils.go](https://codecov.io/gh/knative-sandbox/eventing-kafka-broker/pull/245/diff?src=pr&el=tree#diff-Y29udHJvbC1wbGFuZS9wa2cvY29yZS9jb25maWcvdXRpbHMuZ28=) | | | |
| [...ntrol-plane/pkg/reconciler/broker/broker\_config.go](https://codecov.io/gh/knative-sandbox/eventing-kafka-broker/pull/245/diff?src=pr&el=tree#diff-Y29udHJvbC1wbGFuZS9wa2cvcmVjb25jaWxlci9icm9rZXIvYnJva2VyX2NvbmZpZy5nbw==) | | | |
| [control-plane/pkg/reconciler/kafka/broker\_class.go](https://codecov.io/gh/knative-sandbox/eventing-kafka-broker/pull/245/diff?src=pr&el=tree#diff-Y29udHJvbC1wbGFuZS9wa2cvcmVjb25jaWxlci9rYWZrYS9icm9rZXJfY2xhc3MuZ28=) | | | |
| [.../pkg/apis/eventing/v1alpha1/kafka\_sink\_defaults.go](https://codecov.io/gh/knative-sandbox/eventing-kafka-broker/pull/245/diff?src=pr&el=tree#diff-Y29udHJvbC1wbGFuZS9wa2cvYXBpcy9ldmVudGluZy92MWFscGhhMS9rYWZrYV9zaW5rX2RlZmF1bHRzLmdv) | | | |
| [control-plane/pkg/reconciler/broker/broker.go](https://codecov.io/gh/knative-sandbox/eventing-kafka-broker/pull/245/diff?src=pr&el=tree#diff-Y29udHJvbC1wbGFuZS9wa2cvcmVjb25jaWxlci9icm9rZXIvYnJva2VyLmdv) | | | |
| [control-plane/pkg/core/config/egress.go](https://codecov.io/gh/knative-sandbox/eventing-kafka-broker/pull/245/diff?src=pr&el=tree#diff-Y29udHJvbC1wbGFuZS9wa2cvY29yZS9jb25maWcvZWdyZXNzLmdv) | | | |
| [...kg/apis/eventing/v1alpha1/kafka\_sink\_conversion.go](https://codecov.io/gh/knative-sandbox/eventing-kafka-broker/pull/245/diff?src=pr&el=tree#diff-Y29udHJvbC1wbGFuZS9wa2cvYXBpcy9ldmVudGluZy92MWFscGhhMS9rYWZrYV9zaW5rX2NvbnZlcnNpb24uZ28=) | | | |
| [...-plane/pkg/reconciler/trigger/trigger\_lifecycle.go](https://codecov.io/gh/knative-sandbox/eventing-kafka-broker/pull/245/diff?src=pr&el=tree#diff-Y29udHJvbC1wbGFuZS9wa2cvcmVjb25jaWxlci90cmlnZ2VyL3RyaWdnZXJfbGlmZWN5Y2xlLmdv) | | | |
| [control-plane/pkg/reconciler/trigger/trigger.go](https://codecov.io/gh/knative-sandbox/eventing-kafka-broker/pull/245/diff?src=pr&el=tree#diff-Y29udHJvbC1wbGFuZS9wa2cvcmVjb25jaWxlci90cmlnZ2VyL3RyaWdnZXIuZ28=) | | | |
| [control-plane/pkg/config/env\_config.go](https://codecov.io/gh/knative-sandbox/eventing-kafka-broker/pull/245/diff?src=pr&el=tree#diff-Y29udHJvbC1wbGFuZS9wa2cvY29uZmlnL2Vudl9jb25maWcuZ28=) | | | |
| ... and [12 more](https://codecov.io/gh/knative-sandbox/eventing-kafka-broker/pull/245/diff?src=pr&el=tree-more) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/knative-sandbox/eventing-kafka-broker/pull/245?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/knative-sandbox/eventing-kafka-broker/pull/245?src=pr&el=footer). Last update [5ee8e80...f51fb00](https://codecov.io/gh/knative-sandbox/eventing-kafka-broker/pull/245?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

knative-prow-robot: [APPROVALNOTIFIER] This PR is **APPROVED**

This pull-request has been approved by: *<a href="https://github.com/knative-sandbox/eventing-kafka-broker/pull/245#" title="Author self-approved">mattmoor</a>*, *<a href="https://github.com/knative-sandbox/eventing-kafka-broker/pull/245#pullrequestreview-500371914" title="LGTM">pierDipi</a>*

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=knative-sandbox%2Feventing-kafka-broker).

The pull request process is described [here](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process)

<details >
Needs approval from an approver in each of these files:

- ~~[OWNERS](https://github.com/knative-sandbox/eventing-kafka-broker/blob/master/OWNERS)~~ [mattmoor,pierDipi]

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":[]} -->

Patch:
diff --git a/go.mod b/go.mod
index e4f7b0551..daea60fbe 100644
--- a/go.mod
+++ b/go.mod
@@ -20,8 +20,8 @@ require (
 	k8s.io/client-go v11.0.1-0.20190805182717-6502b5e7b1b5+incompatible
 	k8s.io/kubernetes v1.14.7
 	k8s.io/utils v0.0.0-20200603063816-c1c6865ac451
-	knative.dev/eventing v0.18.1-0.20201001001229-aa7a3b7b2508
-	knative.dev/pkg v0.0.0-20200930201529-29e3385d1b8e
+	knative.dev/eventing v0.18.1-0.20201001100729-e5dbab9956fe
+	knative.dev/pkg v0.0.0-20201001022229-7c082ac1c01d
 	knative.dev/test-infra v0.0.0-20200930161929-242b7529399e
 )
 
diff --git a/go.sum b/go.sum
index 42d5e61c9..75be07ad3 100644
--- a/go.sum
+++ b/go.sum
@@ -1897,8 +1897,8 @@ k8s.io/utils v0.0.0-20200603063816-c1c6865ac451 h1:v8ud2Up6QK1lNOKFgiIVrZdMg7Mpm
 k8s.io/utils v0.0.0-20200603063816-c1c6865ac451/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
 knative.dev/caching v0.0.0-20190719140829-2032732871ff/go.mod h1:dHXFU6CGlLlbzaWc32g80cR92iuBSpsslDNBWI8C7eg=
 knative.dev/caching v0.0.0-20200116200605-67bca2c83dfa/go.mod h1:dHXFU6CGlLlbzaWc32g80cR92iuBSpsslDNBWI8C7eg=
-knative.dev/eventing v0.18.1-0.20201001001229-aa7a3b7b2508 h1:NuGzyArl0BUDlpoWsWNgiGu45ZR0ORh+TZPjSuSLvlY=
-knative.dev/eventing v0.18.1-0.20201001001229-aa7a3b7b2508/go.mod h1:ZrsO9pJUnC3xplMl8/s4akn4KAjTIwqibqEsUD+Ycxc=
+knative.dev/eventing v0.18.1-0.20201001100729-e5dbab9956fe h1:hnnMgbgl/BA8qyLW55OBHFXBTz2ptAhDoLKPpf9P2pc=
+knative.dev/eventing v0.18.1-0.20201001100729-e5dbab9956fe/go.mod h1:ZrsO9pJUnC3xplMl8/s4akn4KAjTIwqibqEsUD+Ycxc=
 knative.dev/eventing-contrib v0.6.1-0.20190723221543-5ce18048c08b/go.mod h1:SnXZgSGgMSMLNFTwTnpaOH7hXDzTFtw0J8OmHflNx3g=
 knative.dev/eventing-contrib v0.11.2/go.mod h1:SnXZgSGgMSMLNFTwTnpaOH7hXDzTFtw0J8OmHflNx3g=
 knative.dev/pkg v0.0.0-20191101194912-56c2594e4f11/go.mod h1:pgODObA1dTyhNoFxPZTTjNWfx6F0aKsKzn+vaT9XO/Q=
@@ -1911,6 +1911,8 @@ knative.dev/pkg v0.0.0-20200528142800-1c6815d7e4c9/go.mod h1:QgNZTxnwpB/oSpNcfnL
 knative.dev/pkg v0.0.0-20200711004937-22502028e31a/go.mod h1:AqAJV6rYi8IGikDjJ/9ZQd9qKdkXVlesVnVjwx62YB8=
 knative.dev/pkg v0.0.0-20200930201529-29e3385d1b8e h1:p1emGg+WPlDgSW7b+o2jan1uKKHHD9h3qvI0gCFxoFw=
 knative.dev/pkg v0.0.0-20200930201529-29e3385d1b8e/go.mod h1:/HM1zJbhqiicYwpkfA3GvhO3EoIXb2bNZOsb9zi2WEk=
+knative.dev/pkg v0.0.0-20201001022229-7c082ac1c01d h1:7ZjWakTUUrpM1wtjBpAGMan1lNIv2r07sWVF8XrBGuQ=
+knative.dev/pkg v0.0.0-20201001022229-7c082ac1c01d/go.mod h1:ONz9ufOS3IdWdlIUqhd4Dd2aUdG2a29W7Cg0mCS4hcE=
 knative.dev/test-infra v0.0.0-20200407185800-1b88cb3b45a5/go.mod h1:xcdUkMJrLlBswIZqL5zCuBFOC22WIPMQoVX1L35i0vQ=
 knative.dev/test-infra v0.0.0-20200505052144-5ea2f705bb55/go.mod h1:WqF1Azka+FxPZ20keR2zCNtiQA1MP9ZB4BH4HuI+SIU=
 knative.dev/test-infra v0.0.0-20200513011557-d03429a76034/go.mod h1:aMif0KXL4g19YCYwsy4Ocjjz5xgPlseYV+B95Oo4JGE=
diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1/customresourcedefinition.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1/customresourcedefinition.go
new file mode 100644
index 000000000..683ce9498
--- /dev/null
+++ b/vendor/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1/customresourcedefinition.go
@@ -0,0 +1,65 @@
+/*
+Copyright The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by lister-gen. DO NOT EDIT.
+
+package v1
+
+import (
+	v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
+	"k8s.io/apimachinery/pkg/api/errors"
+	"k8s.io/apimachinery/pkg/labels"
+	"k8s.io/client-go/tools/cache"
+)
+
+// CustomResourceDefinitionLister helps list CustomResourceDefinitions.
+type CustomResourceDefinitionLister interface {
+	// List lists all CustomResourceDefinitions in the indexer.
+	List(selector labels.Selector) (ret []*v1.CustomResourceDefinition, err error)
+	// Get retrieves the CustomResourceDefinition from the index for a given name.
+	Get(name string) (*v1.CustomResourceDefinition, error)
+	CustomResourceDefinitionListerExpansion
+}
+
+// customResourceDefinitionLister implements the CustomResourceDefinitionLister interface.
+type customResourceDefinitionLister struct {
+	indexer cache.Indexer
+}
+
+// NewCustomResourceDefinitionLister returns a new CustomResourceDefinitionLister.
+func NewCustomResourceDefinitionLister(indexer cache.Indexer) CustomResourceDefinitionLister {
+	return &customResourceDefinitionLister{indexer: indexer}
+}
+
+// List lists all CustomResourceDefinitions in the indexer.
+func (s *customResourceDefinitionLister) List(selector labels.Selector) (ret []*v1.CustomResourceDefinition, err error) {
+	err = cache.ListAll(s.indexer, selector, func(m interface{}) {
+		ret = append(ret, m.(*v1.CustomResourceDefinition))
+	})
+	return ret, err
+}
+
+// Get retrieves the CustomResourceDefinition from the index for a given name.
+func (s *customResourceDefinitionLister) Get(name string) (*v1.CustomResourceDefinition, error) {
+	obj, exists, err := s.indexer.GetByKey(name)
+	if err != nil {
+		return nil, err
+	}
+	if !exists {
+		return nil, errors.NewNotFound(v1.Resource("customresourcedefinition"), name)
+	}
+	return obj.(*v1.CustomResourceDefinition), nil
+}
diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1/expansion_generated.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1/expansion_generated.go
new file mode 100644
index 000000000..609d86be3
--- /dev/null
+++ b/vendor/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1/expansion_generated.go
@@ -0,0 +1,23 @@
+/*
+Copyright The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by lister-gen. DO NOT EDIT.
+
+package v1
+
+// CustomResourceDefinitionListerExpansion allows custom methods to be added to
+// CustomResourceDefinitionLister.
+type CustomResourceDefinitionListerExpansion interface{}
diff --git a/vendor/knative.dev/eventing/pkg/reconciler/names/names.go b/vendor/knative.dev/eventing/pkg/reconciler/names/names.go
index 9a0b01cc8..8af20ca82 100644
--- a/vendor/knative.dev/eventing/pkg/reconciler/names/names.go
+++ b/vendor/knative.dev/eventing/pkg/reconciler/names/names.go
@@ -19,10 +19,10 @@ package names
 import (
 	"fmt"
 
-	"knative.dev/eventing/pkg/utils"
+	"knative.dev/pkg/network"
 )
 
 // ServiceHostName creates the hostname for a Kubernetes Service.
 func ServiceHostName(serviceName, namespace string) string {
-	return fmt.Sprintf("%s.%s.svc.%s", serviceName, namespace, utils.GetClusterDomainName())
+	return fmt.Sprintf("%s.%s.svc.%s", serviceName, namespace, network.GetClusterDomainName())
 }
diff --git a/vendor/knative.dev/eventing/pkg/utils/utils.go b/vendor/knative.dev/eventing/pkg/utils/utils.go
index 5a5eda38f..94e10b2ee 100644
--- a/vendor/knative.dev/eventing/pkg/utils/utils.go
+++ b/vendor/knative.dev/eventing/pkg/utils/utils.go
@@ -17,12 +17,8 @@ limitations under the License.
 package utils
 
 import (
-	"bufio"
-	"io"
-	"os"
 	"regexp"
 	"strings"
-	"sync"
 
 	"k8s.io/apimachinery/pkg/util/validation"
 
@@ -32,56 +28,16 @@ import (
 )
 
 const (
-	resolverFileName  = "/etc/resolv.conf"
-	defaultDomainName = "cluster.local"
-
 	// Number of characters to keep available just in case the prefix used in generateName
 	// exceeds the maximum allowed for k8s names.
 	generateNameSafety = 10
 )
 
 var (
-	domainName string
-	once       sync.Once
-
 	// Only allow alphanumeric, '-' or '.'.
 	validChars = regexp.MustCompile(`[^-\.a-z0-9]+`)
 )
 
-// GetClusterDomainName returns cluster's domain name or an error
-// Closes issue: https://github.com/knative/eventing/issues/714
-func GetClusterDomainName() string {
-	once.Do(func() {
-		f, err := os.Open(resolverFileName)
-		if err == nil {
-			defer f.Close()
-			domainName = getClusterDomainName(f)
-
-		} else {
-			domainName = defaultDomainName
-		}
-	})
-
-	return domainName
-}
-
-func getClusterDomainName(r io.Reader) string {
-	scanner := bufio.NewScanner(r)
-	for scanner.Scan() {
-		elements := strings.Split(scanner.Text(), " ")
-		if elements[0] != "search" {
-			continue
-		}
-		for i := 1; i < len(elements)-1; i++ {
-			if strings.HasPrefix(elements[i], "svc.") {
-				return elements[i][4:]
-			}
-		}
-	}
-	// For all abnormal cases return default domain name
-	return defaultDomainName
-}
-
 func ObjectRef(obj metav1.Object, gvk schema.GroupVersionKind) corev1.ObjectReference {
 	// We can't always rely on the TypeMeta being populated.
 	// See: https://github.com/knative/serving/issues/2372
diff --git a/vendor/knative.dev/pkg/client/injection/apiextensions/client/client.go b/vendor/knative.dev/pkg/client/injection/apiextensions/client/client.go
new file mode 100644
index 000000000..0881e8704
--- /dev/null
+++ b/vendor/knative.dev/pkg/client/injection/apiextensions/client/client.go
@@ -0,0 +1,49 @@
+/*
+Copyright 2020 The Knative Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by injection-gen. DO NOT EDIT.
+
+package client
+
+import (
+	context "context"
+
+	clientset "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset"
+	rest "k8s.io/client-go/rest"
+	injection "knative.dev/pkg/injection"
+	logging "knative.dev/pkg/logging"
+)
+
+func init() {
+	injection.Default.RegisterClient(withClient)
+}
+
+// Key is used as the key for associating information with a context.Context.
+type Key struct{}
+
+func withClient(ctx context.Context, cfg *rest.Config) context.Context {
+	return context.WithValue(ctx, Key{}, clientset.NewForConfigOrDie(cfg))
+}
+
+// Get extracts the clientset.Interface client from the context.
+func Get(ctx context.Context) clientset.Interface {
+	untyped := ctx.Value(Key{})
+	if untyped == nil {
+		logging.FromContext(ctx).Panic(
+			"Unable to fetch k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset.Interface from context.")
+	}
+	return untyped.(clientset.Interface)
+}
diff --git a/vendor/knative.dev/pkg/client/injection/apiextensions/client/fake/fake.go b/vendor/knative.dev/pkg/client/injection/apiextensions/client/fake/fake.go
new file mode 100644
index 000000000..1ed129871
--- /dev/null
+++ b/vendor/knative.dev/pkg/client/injection/apiextensions/client/fake/fake.go
@@ -0,0 +1,54 @@
+/*
+Copyright 2020 The Knative Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by injection-gen. DO NOT EDIT.
+
+package fake
+
+import (
+	context "context"
+
+	fake "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake"
+	runtime "k8s.io/apimachinery/pkg/runtime"
+	rest "k8s.io/client-go/rest"
+	client "knative.dev/pkg/client/injection/apiextensions/client"
+	injection "knative.dev/pkg/injection"
+	logging "knative.dev/pkg/logging"
+)
+
+func init() {
+	injection.Fake.RegisterClient(withClient)
+}
+
+func withClient(ctx context.Context, cfg *rest.Config) context.Context {
+	ctx, _ = With(ctx)
+	return ctx
+}
+
+func With(ctx context.Context, objects ...runtime.Object) (context.Context, *fake.Clientset) {
+	cs := fake.NewSimpleClientset(objects...)
+	return context.WithValue(ctx, client.Key{}, cs), cs
+}
+
+// Get extracts the Kubernetes client from the context.
+func Get(ctx context.Context) *fake.Clientset {
+	untyped := ctx.Value(client.Key{})
+	if untyped == nil {
+		logging.FromContext(ctx).Panic(
+			"Unable to fetch k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake.Clientset from context.")
+	}
+	return untyped.(*fake.Clientset)
+}
diff --git a/vendor/modules.txt b/vendor/modules.txt
index e27dfeb7e..82db24630 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -704,6 +704,7 @@ k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextension
 k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/fake
 k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1
 k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/fake
+k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1
 k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1beta1
 # k8s.io/apimachinery v0.18.8 => k8s.io/apimachinery v0.18.8
 ## explicit
@@ -1038,7 +1039,7 @@ k8s.io/utils/buffer
 k8s.io/utils/integer
 k8s.io/utils/pointer
 k8s.io/utils/trace
-# knative.dev/eventing v0.18.1-0.20201001001229-aa7a3b7b2508
+# knative.dev/eventing v0.18.1-0.20201001100729-e5dbab9956fe
 ## explicit
 knative.dev/eventing/pkg/apis/config
 knative.dev/eventing/pkg/apis/configs
@@ -1134,6 +1135,7 @@ knative.dev/eventing/pkg/kncloudevents
 knative.dev/eventing/pkg/logconfig
 knative.dev/eventing/pkg/reconciler/names
 knative.dev/eventing/pkg/reconciler/sugar
+knative.dev/eventing/pkg/reconciler/testing
 knative.dev/eventing/pkg/reconciler/testing/v1
 knative.dev/eventing/pkg/reconciler/testing/v1beta1
 knative.dev/eventing/pkg/tracing
@@ -1165,7 +1167,7 @@ knative.dev/eventing/test/test_images/recordevents
 knative.dev/eventing/test/test_images/request-sender
 knative.dev/eventing/test/test_images/sequencestepper
 knative.dev/eventing/test/test_images/transformevents
-# knative.dev/pkg v0.0.0-20200930201529-29e3385d1b8e
+# knative.dev/pkg v0.0.0-20201001022229-7c082ac1c01d
 ## explicit
 knative.dev/pkg/apis
 knative.dev/pkg/apis/duck
@@ -1175,6 +1177,8 @@ knative.dev/pkg/apis/duck/v1alpha1
 knative.dev/pkg/apis/duck/v1beta1
 knative.dev/pkg/apis/testing/fuzzer
 knative.dev/pkg/changeset
+knative.dev/pkg/client/injection/apiextensions/client
+knative.dev/pkg/client/injection/apiextensions/client/fake
 knative.dev/pkg/client/injection/ducks/duck/v1/addressable
 knative.dev/pkg/client/injection/ducks/duck/v1/addressable/fake
 knative.dev/pkg/client/injection/kube/client
@@ -1210,6 +1214,7 @@ knative.dev/pkg/logging/logkey
 knative.dev/pkg/logging/testing
 knative.dev/pkg/metrics
 knative.dev/pkg/metrics/metricskey
+knative.dev/pkg/metrics/testing
 knative.dev/pkg/network
 knative.dev/pkg/network/handlers
 knative.dev/pkg/profiling


Test patch:
diff --git a/vendor/knative.dev/eventing/pkg/reconciler/testing/builder.go b/vendor/knative.dev/eventing/pkg/reconciler/testing/builder.go
new file mode 100644
index 000000000..a4c4823ed
--- /dev/null
+++ b/vendor/knative.dev/eventing/pkg/reconciler/testing/builder.go
@@ -0,0 +1,26 @@
+/*
+Copyright 2018 The Knative Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package testing
+
+import "k8s.io/apimachinery/pkg/runtime"
+
+// Buildable allows test fixtures to use the builder pattern. The table
+// test runner will call Build() on any Buildable objects and use the result
+// as the test fixture.
+type Buildable interface {
+	Build() runtime.Object
+}
diff --git a/vendor/knative.dev/eventing/pkg/reconciler/testing/configmap.go b/vendor/knative.dev/eventing/pkg/reconciler/testing/configmap.go
new file mode 100644
index 000000000..df942d38f
--- /dev/null
+++ b/vendor/knative.dev/eventing/pkg/reconciler/testing/configmap.go
@@ -0,0 +1,63 @@
+/*
+Copyright 2020 The Knative Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package testing
+
+import (
+	v1 "k8s.io/api/core/v1"
+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
+	"knative.dev/eventing/pkg/apis/configs/v1alpha1"
+	"knative.dev/pkg/kmeta"
+)
+
+// ConfigMapOption enables further configuration of a ConfigMap.
+type ConfigMapOption func(*v1.ConfigMap)
+
+// NewConfigMap creates a new ConfigMap.
+func NewConfigMap(name, namespace string, o ...ConfigMapOption) *v1.ConfigMap {
+	cm := &v1.ConfigMap{
+		ObjectMeta: metav1.ObjectMeta{
+			Namespace: namespace,
+			Name:      name,
+		},
+	}
+	for _, opt := range o {
+		opt(cm)
+	}
+	return cm
+}
+
+func WithConfigMapLabels(labels metav1.LabelSelector) ConfigMapOption {
+	return func(cm *v1.ConfigMap) {
+		cm.ObjectMeta.Labels = labels.MatchLabels
+	}
+}
+
+func WithConfigMapOwnerReference(ConfigMapPropagation *v1alpha1.ConfigMapPropagation) ConfigMapOption {
+	return func(cm *v1.ConfigMap) {
+		if cm.ObjectMeta.OwnerReferences == nil {
+			cm.ObjectMeta.OwnerReferences = []metav1.OwnerReference{}
+		}
+		cm.ObjectMeta.OwnerReferences = append(cm.ObjectMeta.OwnerReferences, *kmeta.NewControllerRef(ConfigMapPropagation))
+	}
+}
+
+func WithConfigMapData(data map[string]string) ConfigMapOption {
+	return func(cm *v1.ConfigMap) {
+		cm.Data = data
+	}
+}
diff --git a/vendor/knative.dev/eventing/pkg/reconciler/testing/configmappropagation.go b/vendor/knative.dev/eventing/pkg/reconciler/testing/configmappropagation.go
new file mode 100644
index 000000000..97e9399db
--- /dev/null
+++ b/vendor/knative.dev/eventing/pkg/reconciler/testing/configmappropagation.go
@@ -0,0 +1,108 @@
+/*
+Copyright 2020 The Knative Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package testing
+
+import (
+	"context"
+	"time"
+
+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+	"k8s.io/apimachinery/pkg/types"
+
+	"knative.dev/eventing/pkg/apis/configs/v1alpha1"
+)
+
+// ConfigMapPropagationOption enables further configuration of a ConfigMapPropagation.
+type ConfigMapPropagationOption func(*v1alpha1.ConfigMapPropagation)
+
+// NewConfigMapPropagation creates a ConfigMapPropagation.
+func NewConfigMapPropagation(name, namespace string, o ...ConfigMapPropagationOption) *v1alpha1.ConfigMapPropagation {
+	cmp := &v1alpha1.ConfigMapPropagation{
+		ObjectMeta: metav1.ObjectMeta{
+			Namespace: namespace,
+			Name:      name,
+		},
+	}
+	for _, opt := range o {
+		opt(cmp)
+	}
+	cmp.SetDefaults(context.Background())
+	cmp.Spec.OriginalNamespace = "knative-eventing"
+	return cmp
+}
+
+// WithInitConfigMapPropagationConditions initializes the ConfigMapPropagation's conditions.
+func WithInitConfigMapPropagationConditions(cmp *v1alpha1.ConfigMapPropagation) {
+	cmp.Status.InitializeConditions()
+}
+
+func WithInitConfigMapStatus() ConfigMapPropagationOption {
+	return func(cmp *v1alpha1.ConfigMapPropagation) {
+		cmp.Status.CopyConfigMaps = []v1alpha1.ConfigMapPropagationStatusCopyConfigMap{}
+	}
+}
+
+func WithCopyConfigMapStatus(name, source, operation, ready, reason string) ConfigMapPropagationOption {
+	return func(cmp *v1alpha1.ConfigMapPropagation) {
+		cmp.Status.CopyConfigMaps = append(cmp.Status.CopyConfigMaps, v1alpha1.ConfigMapPropagationStatusCopyConfigMap{
+			Name:      name,
+			Source:    source,
+			Operation: operation,
+			Ready:     ready,
+			Reason:    reason,
+		})
+	}
+}
+
+func WithConfigMapPropagationDeletionTimestamp(cmp *v1alpha1.ConfigMapPropagation) {
+	t := metav1.NewTime(time.Unix(1e9, 0))
+	cmp.ObjectMeta.SetDeletionTimestamp(&t)
+}
+
+func WithConfigMapPropagationSelector(selector metav1.LabelSelector) ConfigMapPropagationOption {
+	return func(cmp *v1alpha1.ConfigMapPropagation) {
+		cmp.Spec.Selector = &selector
+	}
+}
+
+func WithConfigMapPropagationGeneration(gen int64) ConfigMapPropagationOption {
+	return func(cmp *v1alpha1.ConfigMapPropagation) {
+		cmp.Generation = gen
+	}
+}
+
+func WithConfigMapPropagationStatusObservedGeneration(gen int64) ConfigMapPropagationOption {
+	return func(cmp *v1alpha1.ConfigMapPropagation) {
+		cmp.Status.ObservedGeneration = gen
+	}
+}
+
+func WithConfigMapPropagationUID(uid string) ConfigMapPropagationOption {
+	return func(cmp *v1alpha1.ConfigMapPropagation) {
+		cmp.UID = types.UID(uid)
+	}
+}
+
+// WithConfigMapPropagationPropagated calls .Status.MarkConfigMapPropagationPropagated on the ConfigMapPropagation.
+func WithConfigMapPropagationPropagated(cmp *v1alpha1.ConfigMapPropagation) {
+	cmp.Status.MarkPropagated()
+}
+
+// WithConfigMapPropagationNotPropagated calls .Status.MarkConfigMapPropagationNotPropagated on the ConfigMapPropagation.
+func WithConfigMapPropagationNotPropagated(cmp *v1alpha1.ConfigMapPropagation) {
+	cmp.Status.MarkNotPropagated()
+}
diff --git a/vendor/knative.dev/eventing/pkg/reconciler/testing/containersource.go b/vendor/knative.dev/eventing/pkg/reconciler/testing/containersource.go
new file mode 100644
index 000000000..7690bcd60
--- /dev/null
+++ b/vendor/knative.dev/eventing/pkg/reconciler/testing/containersource.go
@@ -0,0 +1,138 @@
+/*
+Copyright 2020 The Knative Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package testing
+
+import (
+	"context"
+	"time"
+
+	sourcesv1alpha2 "knative.dev/eventing/pkg/apis/sources/v1alpha2"
+
+	sourcesv1beta1 "knative.dev/eventing/pkg/apis/sources/v1beta1"
+
+	appsv1 "k8s.io/api/apps/v1"
+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+	"k8s.io/apimachinery/pkg/types"
+)
+
+// ContainerSourceV1Alpha2Option enables further configuration of a ContainerSource.
+type ContainerSourceV1Alpha2Option func(*sourcesv1alpha2.ContainerSource)
+
+// ContainerSourceV1Beta1Option enables further configuration of a ContainerSource.
+type ContainerSourceV1Beta1Option func(*sourcesv1beta1.ContainerSource)
+
+// NewContainerSource creates a v1alpha2 ContainerSource with ContainerSourceOptions
+func NewContainerSourceV1Alpha2(name, namespace string, o ...ContainerSourceV1Alpha2Option) *sourcesv1alpha2.ContainerSource {
+	c := &sourcesv1alpha2.ContainerSource{
+		ObjectMeta: metav1.ObjectMeta{
+			Name:      name,
+			Namespace: namespace,
+		},
+	}
+	for _, opt := range o {
+		opt(c)
+	}
+	c.SetDefaults(context.Background())
+	return c
+}
+
+// NewContainerSource creates a v1beta1 ContainerSource with ContainerSourceOptions
+func NewContainerSourceV1Beta1(name, namespace string, o ...ContainerSourceV1Beta1Option) *sourcesv1beta1.ContainerSource {
+	c := &sourcesv1beta1.ContainerSource{
+		ObjectMeta: metav1.ObjectMeta{
+			Name:      name,
+			Namespace: namespace,
+		},
+	}
+	for _, opt := range o {
+		opt(c)
+	}
+	c.SetDefaults(context.Background())
+	return c
+}
+
+func WithContainerSourceUIDV1B1(uid types.UID) ContainerSourceV1Beta1Option {
+	return func(s *sourcesv1beta1.ContainerSource) {
+		s.UID = uid
+	}
+}
+
+// WithInitContainerSourceConditions initializes the ContainerSource's conditions.
+func WithInitContainerSourceConditionsV1B1(s *sourcesv1beta1.ContainerSource) {
+	s.Status.InitializeConditions()
+}
+
+func WithContainerSourcePropagateReceiveAdapterStatusV1B1(d *appsv1.Deployment) ContainerSourceV1Beta1Option {
+	return func(s *sourcesv1beta1.ContainerSource) {
+		s.Status.PropagateReceiveAdapterStatus(d)
+	}
+}
+
+func WithContainerSourcePropagateSinkbindingStatusV1B1(status *sourcesv1beta1.SinkBindingStatus) ContainerSourceV1Beta1Option {
+	return func(s *sourcesv1beta1.ContainerSource) {
+		s.Status.PropagateSinkBindingStatus(status)
+	}
+}
+
+func WithContainerSourceDeleted(c *sourcesv1beta1.ContainerSource) {
+	t := metav1.NewTime(time.Unix(1e9, 0))
+	c.ObjectMeta.SetDeletionTimestamp(&t)
+}
+
+func WithContainerSourceSpecV1A2(spec sourcesv1alpha2.ContainerSourceSpec) ContainerSourceV1Alpha2Option {
+	return func(c *sourcesv1alpha2.ContainerSource) {
+		c.Spec = spec
+	}
+}
+
+func WithContainerSourceSpecV1B1(spec sourcesv1beta1.ContainerSourceSpec) ContainerSourceV1Beta1Option {
+	return func(c *sourcesv1beta1.ContainerSource) {
+		c.Spec = spec
+	}
+}
+
+func WithContainerSourceLabelsV1B1(labels map[string]string) ContainerSourceV1Beta1Option {
+	return func(c *sourcesv1beta1.ContainerSource) {
+		c.Labels = labels
+	}
+}
+
+func WithContainerSourceAnnotationsV1B1(annotations map[string]string) ContainerSourceV1Beta1Option {
+	return func(c *sourcesv1beta1.ContainerSource) {
+		c.Annotations = annotations
+	}
+}
+
+func WithContainerSourceStatusObservedGenerationV1B1(generation int64) ContainerSourceV1Beta1Option {
+	return func(c *sourcesv1beta1.ContainerSource) {
+		c.Status.ObservedGeneration = generation
+	}
+}
+
+func WithContainerSourceObjectMetaGenerationV1B1(generation int64) ContainerSourceV1Beta1Option {
+	return func(c *sourcesv1beta1.ContainerSource) {
+		c.ObjectMeta.Generation = generation
+	}
+}
+
+func WithContainerUnobservedGenerationV1B1() ContainerSourceV1Beta1Option {
+	return func(c *sourcesv1beta1.ContainerSource) {
+		condSet := c.GetConditionSet()
+		condSet.Manage(&c.Status).MarkUnknown(
+			condSet.GetTopLevelConditionType(), "NewObservedGenFailure", "unsuccessfully observed a new generation")
+	}
+}
diff --git a/vendor/knative.dev/eventing/pkg/reconciler/testing/customresourcedefinition.go b/vendor/knative.dev/eventing/pkg/reconciler/testing/customresourcedefinition.go
new file mode 100644
index 000000000..57623aa62
--- /dev/null
+++ b/vendor/knative.dev/eventing/pkg/reconciler/testing/customresourcedefinition.go
@@ -0,0 +1,63 @@
+/*
+Copyright 2019 The Knative Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package testing
+
+import (
+	apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// CustomResourceDefinitionOption enables further configuration of a CustomResourceDefinition.
+type CustomResourceDefinitionOption func(*apiextensionsv1.CustomResourceDefinition)
+
+// NewCustomResourceDefinition creates a CustomResourceDefinition with CustomResourceDefinitionOption.
+func NewCustomResourceDefinition(name string, o ...CustomResourceDefinitionOption) *apiextensionsv1.CustomResourceDefinition {
+	crd := &apiextensionsv1.CustomResourceDefinition{
+		ObjectMeta: metav1.ObjectMeta{
+			Name: name,
+		},
+	}
+	for _, opt := range o {
+		opt(crd)
+	}
+	return crd
+}
+
+// WithCustomResourceDefinitionLabels sets the CRD's labels.
+func WithCustomResourceDefinitionLabels(labels map[string]string) CustomResourceDefinitionOption {
+	return func(crd *apiextensionsv1.CustomResourceDefinition) {
+		crd.Labels = labels
+	}
+}
+
+func WithCustomResourceDefinitionVersions(versions []apiextensionsv1.CustomResourceDefinitionVersion) CustomResourceDefinitionOption {
+	return func(crd *apiextensionsv1.CustomResourceDefinition) {
+		crd.Spec.Versions = versions
+	}
+}
+
+func WithCustomResourceDefinitionGroup(group string) CustomResourceDefinitionOption {
+	return func(crd *apiextensionsv1.CustomResourceDefinition) {
+		crd.Spec.Group = group
+	}
+}
+
+func WithCustomResourceDefinitionNames(names apiextensionsv1.CustomResourceDefinitionNames) CustomResourceDefinitionOption {
+	return func(crd *apiextensionsv1.CustomResourceDefinition) {
+		crd.Spec.Names = names
+	}
+}
diff --git a/vendor/knative.dev/eventing/pkg/reconciler/testing/deployment.go b/vendor/knative.dev/eventing/pkg/reconciler/testing/deployment.go
new file mode 100644
index 000000000..8a7e6b463
--- /dev/null
+++ b/vendor/knative.dev/eventing/pkg/reconciler/testing/deployment.go
@@ -0,0 +1,98 @@
+/*
+Copyright 2019 The Knative Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package testing
+
+import (
+	appsv1 "k8s.io/api/apps/v1"
+	corev1 "k8s.io/api/core/v1"
+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// DeploymentOption enables further configuration of a Deployment.
+type DeploymentOption func(*appsv1.Deployment)
+
+// NewDeployment creates a Deployment with DeploymentOptions.
+func NewDeployment(name, namespace string, do ...DeploymentOption) *appsv1.Deployment {
+	d := &appsv1.Deployment{
+		ObjectMeta: metav1.ObjectMeta{
+			Namespace: namespace,
+			Name:      name,
+		},
+		Spec: appsv1.DeploymentSpec{
+			Template: corev1.PodTemplateSpec{
+				Spec: corev1.PodSpec{
+					Containers: []corev1.Container{{}},
+				},
+			},
+		},
+	}
+	for _, opt := range do {
+		opt(d)
+	}
+	return d
+}
+
+func WithDeploymentLabels(labels map[string]string) DeploymentOption {
+	return func(d *appsv1.Deployment) {
+		d.ObjectMeta.Labels = labels
+		d.Spec.Selector = &metav1.LabelSelector{
+			MatchLabels: labels,
+		}
+		d.Spec.Template.Labels = labels
+	}
+}
+
+func WithDeploymentOwnerReferences(ownerReferences []metav1.OwnerReference) DeploymentOption {
+	return func(d *appsv1.Deployment) {
+		d.OwnerReferences = ownerReferences
+	}
+}
+
+func WithDeploymentAnnotations(annotations map[string]string) DeploymentOption {
+	return func(d *appsv1.Deployment) {
+		d.Spec.Template.Annotations = annotations
+	}
+}
+
+func WithDeploymentServiceAccount(serviceAccountName string) DeploymentOption {
+	return func(d *appsv1.Deployment) {
+		d.Spec.Template.Spec.ServiceAccountName = serviceAccountName
+	}
+}
+
+func WithDeploymentContainer(name, image string, liveness *corev1.Probe, readiness *corev1.Probe, envVars []corev1.EnvVar, containerPorts []corev1.ContainerPort) DeploymentOption {
+	return func(d *appsv1.Deployment) {
+		d.Spec.Template.Spec.Containers[0].Name = name
+		d.Spec.Template.Spec.Containers[0].Image = image
+		d.Spec.Template.Spec.Containers[0].LivenessProbe = liveness
+		d.Spec.Template.Spec.Containers[0].ReadinessProbe = readiness
+		d.Spec.Template.Spec.Containers[0].Env = envVars
+		d.Spec.Template.Spec.Containers[0].Ports = containerPorts
+	}
+}
+
+// WithDeploymentAvailable marks the Deployment as available.
+func WithDeploymentAvailable() DeploymentOption {
+	return func(d *appsv1.Deployment) {
+		d.Status.Conditions = []appsv1.DeploymentCondition{
+			{
+				Type:   appsv1.DeploymentAvailable,
+				Status: corev1.ConditionTrue,
+			},
+		}
+	}
+}
diff --git a/vendor/knative.dev/eventing/pkg/reconciler/testing/endpoints.go b/vendor/knative.dev/eventing/pkg/reconciler/testing/endpoints.go
new file mode 100644
index 000000000..c593a3617
--- /dev/null
+++ b/vendor/knative.dev/eventing/pkg/reconciler/testing/endpoints.go
@@ -0,0 +1,67 @@
+/*
+Copyright 2020 The Knative Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package testing
+
+import (
+	corev1 "k8s.io/api/core/v1"
+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// EndpointsOption enables further configuration of a Endpoints.
+type EndpointsOption func(*corev1.Endpoints)
+
+// NewEndpoints creates a Endpoints with EndpointsOptions
+func NewEndpoints(name, namespace string, so ...EndpointsOption) *corev1.Endpoints {
+	s := &corev1.Endpoints{
+		ObjectMeta: metav1.ObjectMeta{
+			Name:      name,
+			Namespace: namespace,
+		},
+	}
+	for _, opt := range so {
+		opt(s)
+	}
+	return s
+}
+
+func WithEndpointsLabels(labels map[string]string) EndpointsOption {
+	return func(s *corev1.Endpoints) {
+		s.ObjectMeta.Labels = labels
+	}
+}
+
+func WithEndpointsAddresses(addrs ...corev1.EndpointAddress) EndpointsOption {
+	return func(s *corev1.Endpoints) {
+		s.Subsets = []corev1.EndpointSubset{{
+			Addresses: addrs,
+		}}
+	}
+}
+
+func WithEndpointsNotReadyAddresses(addrs ...corev1.EndpointAddress) EndpointsOption {
+	return func(s *corev1.Endpoints) {
+		s.Subsets = []corev1.EndpointSubset{{
+			NotReadyAddresses: addrs,
+		}}
+	}
+}
+
+func WithEndpointsAnnotations(annotations map[string]string) EndpointsOption {
+	return func(s *corev1.Endpoints) {
+		s.ObjectMeta.Annotations = annotations
+	}
+}
diff --git a/vendor/knative.dev/eventing/pkg/reconciler/testing/eventtype.go b/vendor/knative.dev/eventing/pkg/reconciler/testing/eventtype.go
new file mode 100644
index 000000000..7cb941d85
--- /dev/null
+++ b/vendor/knative.dev/eventing/pkg/reconciler/testing/eventtype.go
@@ -0,0 +1,119 @@
+/*
+Copyright 2019 The Knative Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package testing
+
+import (
+	"context"
+	"time"
+
+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+	"knative.dev/eventing/pkg/apis/eventing/v1beta1"
+	"knative.dev/pkg/apis"
+)
+
+// EventTypeOption enables further configuration of an EventType.
+type EventTypeOption func(*v1beta1.EventType)
+
+// NewEventType creates a EventType with EventTypeOptions.
+func NewEventType(name, namespace string, o ...EventTypeOption) *v1beta1.EventType {
+	et := &v1beta1.EventType{
+		ObjectMeta: metav1.ObjectMeta{
+			Namespace: namespace,
+			Name:      name,
+		},
+	}
+	for _, opt := range o {
+		opt(et)
+	}
+	et.SetDefaults(context.Background())
+	return et
+}
+
+// WithInitEventTypeConditions initializes the EventType's conditions.
+func WithInitEventTypeConditions(et *v1beta1.EventType) {
+	et.Status.InitializeConditions()
+}
+
+func WithEventTypeSource(source *apis.URL) EventTypeOption {
+	return func(et *v1beta1.EventType) {
+		et.Spec.Source = source
+	}
+}
+
+func WithEventTypeType(t string) EventTypeOption {
+	return func(et *v1beta1.EventType) {
+		et.Spec.Type = t
+	}
+}
+
+func WithEventTypeBroker(broker string) EventTypeOption {
+	return func(et *v1beta1.EventType) {
+		et.Spec.Broker = broker
+	}
+}
+
+func WithEventTypeDescription(description string) EventTypeOption {
+	return func(et *v1beta1.EventType) {
+		et.Spec.Description = description
+	}
+}
+
+func WithEventTypeLabels(labels map[string]string) EventTypeOption {
+	return func(et *v1beta1.EventType) {
+		et.ObjectMeta.Labels = labels
+	}
+}
+
+func WithEventTypeOwnerReference(ownerRef metav1.OwnerReference) EventTypeOption {
+	return func(et *v1beta1.EventType) {
+		et.ObjectMeta.OwnerReferences = []metav1.OwnerReference{
+			ownerRef,
+		}
+	}
+}
+
+func WithEventTypeDeletionTimestamp(et *v1beta1.EventType) {
+	t := metav1.NewTime(time.Unix(1e9, 0))
+	et.ObjectMeta.SetDeletionTimestamp(&t)
+}
+
+// WithEventTypeBrokerNotFound calls .Status.MarkFilterFailed on the EventType.
+func WithEventTypeBrokerDoesNotExist(et *v1beta1.EventType) {
+	et.Status.MarkBrokerDoesNotExist()
+}
+
+// WithEventTypeBrokerExists calls .Status.MarkBrokerExists on the EventType.
+func WithEventTypeBrokerExists(et *v1beta1.EventType) {
+	et.Status.MarkBrokerExists()
+}
+
+func WithEventTypeBrokerFailed(reason, message string) EventTypeOption {
+	return func(et *v1beta1.EventType) {
+		et.Status.MarkBrokerFailed(reason, message)
+	}
+}
+
+func WithEventTypeBrokerUnknown(reason, message string) EventTypeOption {
+	return func(et *v1beta1.EventType) {
+		et.Status.MarkBrokerUnknown(reason, message)
+	}
+}
+
+// WithEventTypeBrokerReady calls .Status.MarkBrokerReady on the EventType.
+func WithEventTypeBrokerReady(et *v1beta1.EventType) {
+	et.Status.MarkBrokerReady()
+}
diff --git a/vendor/knative.dev/eventing/pkg/reconciler/testing/factory.go b/vendor/knative.dev/eventing/pkg/reconciler/testing/factory.go
new file mode 100644
index 000000000..9a91362d0
--- /dev/null
+++ b/vendor/knative.dev/eventing/pkg/reconciler/testing/factory.go
@@ -0,0 +1,159 @@
+/*
+Copyright 2018 The Knative Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package testing
+
+import (
+	"context"
+	"encoding/json"
+	"testing"
+
+	corev1 "k8s.io/api/core/v1"
+	"knative.dev/pkg/configmap"
+	"knative.dev/pkg/logging"
+
+	"k8s.io/apimachinery/pkg/api/meta"
+	"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
+	"k8s.io/apimachinery/pkg/runtime"
+	"k8s.io/apimachinery/pkg/types"
+
+	"k8s.io/client-go/tools/record"
+
+	"go.uber.org/zap"
+	ktesting "k8s.io/client-go/testing"
+	"knative.dev/pkg/controller"
+	"knative.dev/pkg/reconciler"
+
+	fakeeventingclient "knative.dev/eventing/pkg/client/injection/client/fake"
+	fakeapiextclient "knative.dev/pkg/client/injection/apiextensions/client/fake"
+	fakekubeclient "knative.dev/pkg/client/injection/kube/client/fake"
+	fakedynamicclient "knative.dev/pkg/injection/clients/dynamicclient/fake"
+
+	_ "knative.dev/pkg/metrics/testing"
+	. "knative.dev/pkg/reconciler/testing"
+)
+
+const (
+	// maxEventBufferSize is the estimated max number of event notifications that
+	// can be buffered during reconciliation.
+	maxEventBufferSize = 10
+)
+
+// Ctor functions create a k8s controller with given params.
+type Ctor func(context.Context, *Listers, configmap.Watcher) controller.Reconciler
+
+// MakeFactory creates a reconciler factory with fake clients and controller created by `ctor`.
+func MakeFactory(ctor Ctor, unstructured bool, logger *zap.SugaredLogger) Factory {
+	return func(t *testing.T, r *TableRow) (controller.Reconciler, ActionRecorderList, EventList) {
+		ls := NewListers(r.Objects)
+
+		ctx := context.Background()
+		ctx = logging.WithLogger(ctx, logger)
+
+		ctx, kubeClient := fakekubeclient.With(ctx, ls.GetKubeObjects()...)
+		ctx, client := fakeeventingclient.With(ctx, ls.GetEventingObjects()...)
+		ctx, apiextclient := fakeapiextclient.With(ctx, ls.GetAPIExtentionsObjects()...)
+		ctx, dynamicClient := fakedynamicclient.With(ctx,
+			NewScheme(), ToUnstructured(t, r.Objects)...)
+
+		dynamicScheme := runtime.NewScheme()
+		for _, addTo := range clientSetSchemes {
+			addTo(dynamicScheme)
+		}
+
+		// The dynamic client's support for patching is BS.  Implement it
+		// here via PrependReactor (this can be overridden below by the
+		// provided reactors).
+		dynamicClient.PrependReactor("patch", "*",
+			func(action ktesting.Action) (bool, runtime.Object, error) {
+				return true, nil, nil
+			})
+
+		eventRecorder := record.NewFakeRecorder(maxEventBufferSize)
+		ctx = controller.WithEventRecorder(ctx, eventRecorder)
+
+		// Configure the ConfigMap static watcher
+		configMaps := []*corev1.ConfigMap{}
+		for _, obj := range r.Objects {
+			if cm, ok := obj.(*corev1.ConfigMap); ok {
+				configMaps = append(configMaps, cm)
+			}
+		}
+		cmw := configmap.NewStaticWatcher(configMaps...)
+
+		// Set up our Controller from the fakes.
+		c := ctor(ctx, &ls, cmw)
+
+		// If the reconcilers is leader aware, then promote it.
+		if la, ok := c.(reconciler.LeaderAware); ok {
+			la.Promote(reconciler.UniversalBucket(), func(reconciler.Bucket, types.NamespacedName) {})
+		}
+
+		for _, reactor := range r.WithReactors {
+			kubeClient.PrependReactor("*", "*", reactor)
+			client.PrependReactor("*", "*", reactor)
+			apiextclient.PrependReactor("*", "*", reactor)
+			dynamicClient.PrependReactor("*", "*", reactor)
+		}
+
+		// Validate all Create operations through the eventing client.
+		client.PrependReactor("create", "*", func(action ktesting.Action) (handled bool, ret runtime.Object, err error) {
+			return ValidateCreates(ctx, action)
+		})
+		client.PrependReactor("update", "*", func(action ktesting.Action) (handled bool, ret runtime.Object, err error) {
+			return ValidateUpdates(ctx, action)
+		})
+
+		actionRecorderList := ActionRecorderList{dynamicClient, client, apiextclient, kubeClient}
+		eventList := EventList{Recorder: eventRecorder}
+
+		return c, actionRecorderList, eventList
+	}
+}
+
+// ToUnstructured takes a list of k8s resources and converts them to
+// Unstructured objects.
+// We must pass objects as Unstructured to the dynamic client fake, or it
+// won't handle them properly.
+func ToUnstructured(t *testing.T, objs []runtime.Object) (us []runtime.Object) {
+	sch := NewScheme()
+	for _, obj := range objs {
+		obj = obj.DeepCopyObject() // Don't mess with the primary copy
+		// Determine and set the TypeMeta for this object based on our test scheme.
+		gvks, _, err := sch.ObjectKinds(obj)
+		if err != nil {
+			t.Fatalf("Unable to determine kind for type: %v", err)
+		}
+		apiv, k := gvks[0].ToAPIVersionAndKind()
+		ta, err := meta.TypeAccessor(obj)
+		if err != nil {
+			t.Fatalf("Unable to create type accessor: %v", err)
+		}
+		ta.SetAPIVersion(apiv)
+		ta.SetKind(k)
+
+		b, err := json.Marshal(obj)
+		if err != nil {
+			t.Fatalf("Unable to marshal: %v", err)
+		}
+		u := &unstructured.Unstructured{}
+		if err := json.Unmarshal(b, u); err != nil {
+			t.Fatalf("Unable to unmarshal: %v", err)
+		}
+		us = append(us, u)
+	}
+	return
+}
diff --git a/vendor/knative.dev/eventing/pkg/reconciler/testing/listers.go b/vendor/knative.dev/eventing/pkg/reconciler/testing/listers.go
new file mode 100644
index 000000000..e993e4fc2
--- /dev/null
+++ b/vendor/knative.dev/eventing/pkg/reconciler/testing/listers.go
@@ -0,0 +1,233 @@
+/*
+Copyright 2018 The Knative Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package testing
+
+import (
+	appsv1 "k8s.io/api/apps/v1"
+	corev1 "k8s.io/api/core/v1"
+	rbacv1 "k8s.io/api/rbac/v1"
+	apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
+	fakeapiextensionsclientset "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake"
+	apiextensionsv1listers "k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1"
+	"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
+	"k8s.io/apimachinery/pkg/runtime"
+	"k8s.io/apimachinery/pkg/runtime/schema"
+	fakekubeclientset "k8s.io/client-go/kubernetes/fake"
+	appsv1listers "k8s.io/client-go/listers/apps/v1"
+	corev1listers "k8s.io/client-go/listers/core/v1"
+	rbacv1listers "k8s.io/client-go/listers/rbac/v1"
+	"k8s.io/client-go/tools/cache"
+	configsv1alpha1 "knative.dev/eventing/pkg/apis/configs/v1alpha1"
+	eventingv1beta1 "knative.dev/eventing/pkg/apis/eventing/v1beta1"
+	flowsv1beta1 "knative.dev/eventing/pkg/apis/flows/v1beta1"
+	messagingv1beta1 "knative.dev/eventing/pkg/apis/messaging/v1beta1"
+	sourcesv1alpha1 "knative.dev/eventing/pkg/apis/sources/v1alpha1"
+	sourcesv1alpha2 "knative.dev/eventing/pkg/apis/sources/v1alpha2"
+	sourcesv1beta1 "knative.dev/eventing/pkg/apis/sources/v1beta1"
+	fakeeventingclientset "knative.dev/eventing/pkg/client/clientset/versioned/fake"
+	configslisters "knative.dev/eventing/pkg/client/listers/configs/v1alpha1"
+	eventingv1beta1listers "knative.dev/eventing/pkg/client/listers/eventing/v1beta1"
+	flowslisters "knative.dev/eventing/pkg/client/listers/flows/v1beta1"
+	messaginglistersv1beta1 "knative.dev/eventing/pkg/client/listers/messaging/v1beta1"
+	sourcelisters "knative.dev/eventing/pkg/client/listers/sources/v1alpha1"
+	sourcev1alpha2listers "knative.dev/eventing/pkg/client/listers/sources/v1alpha2"
+	sourcev1beta1listers "knative.dev/eventing/pkg/client/listers/sources/v1beta1"
+	duckv1 "knative.dev/pkg/apis/duck/v1"
+	"knative.dev/pkg/reconciler/testing"
+)
+
+var subscriberAddToScheme = func(scheme *runtime.Scheme) error {
+	scheme.AddKnownTypeWithName(schema.GroupVersionKind{Group: "testing.eventing.knative.dev", Version: "v1alpha1", Kind: "Subscriber"}, &unstructured.Unstructured{})
+	return nil
+}
+
+var sourceAddToScheme = func(scheme *runtime.Scheme) error {
+	scheme.AddKnownTypeWithName(schema.GroupVersionKind{Group: "testing.sources.knative.dev", Version: "v1alpha1", Kind: "TestSource"}, &duckv1.Source{})
+	return nil
+}
+
+var clientSetSchemes = []func(*runtime.Scheme) error{
+	fakekubeclientset.AddToScheme,
+	fakeeventingclientset.AddToScheme,
+	fakeapiextensionsclientset.AddToScheme,
+	subscriberAddToScheme,
+	sourceAddToScheme,
+}
+
+type Listers struct {
+	sorter testing.ObjectSorter
+}
+
+func NewScheme() *runtime.Scheme {
+	scheme := runtime.NewScheme()
+
+	for _, addTo := range clientSetSchemes {
+		addTo(scheme)
+	}
+	return scheme
+}
+
+func NewListers(objs []runtime.Object) Listers {
+	scheme := runtime.NewScheme()
+
+	for _, addTo := range clientSetSchemes {
+		addTo(scheme)
+	}
+
+	ls := Listers{
+		sorter: testing.NewObjectSorter(scheme),
+	}
+
+	ls.sorter.AddObjects(objs...)
+
+	return ls
+}
+
+func (l *Listers) indexerFor(obj runtime.Object) cache.Indexer {
+	return l.sorter.IndexerForObjectType(obj)
+}
+
+func (l *Listers) GetKubeObjects() []runtime.Object {
+	return l.sorter.ObjectsForSchemeFunc(fakekubeclientset.AddToScheme)
+}
+
+func (l *Listers) GetEventingObjects() []runtime.Object {
+	return l.sorter.ObjectsForSchemeFunc(fakeeventingclientset.AddToScheme)
+}
+
+func (l *Listers) GetAPIExtentionsObjects() []runtime.Object {
+	return l.sorter.ObjectsForSchemeFunc(fakeapiextensionsclientset.AddToScheme)
+}
+
+func (l *Listers) GetSubscriberObjects() []runtime.Object {
+	return l.sorter.ObjectsForSchemeFunc(subscriberAddToScheme)
+}
+
+func (l *Listers) GetAllObjects() []runtime.Object {
+	all := l.GetSubscriberObjects()
+	all = append(all, l.GetEventingObjects()...)
+	all = append(all, l.GetKubeObjects()...)
+	return all
+}
+
+func (l *Listers) GetV1Beta1SubscriptionLister() messaginglistersv1beta1.SubscriptionLister {
+	return messaginglistersv1beta1.NewSubscriptionLister(l.indexerFor(&messagingv1beta1.Subscription{}))
+}
+
+func (l *Listers) GetFlowsSequenceLister() flowslisters.SequenceLister {
+	return flowslisters.NewSequenceLister(l.indexerFor(&flowsv1beta1.Sequence{}))
+}
+
+func (l *Listers) GetV1Beta1TriggerLister() eventingv1beta1listers.TriggerLister {
+	return eventingv1beta1listers.NewTriggerLister(l.indexerFor(&eventingv1beta1.Trigger{}))
+}
+
+func (l *Listers) GetV1Beta1BrokerLister() eventingv1beta1listers.BrokerLister {
+	return eventingv1beta1listers.NewBrokerLister(l.indexerFor(&eventingv1beta1.Broker{}))
+}
+
+func (l *Listers) GetV1Beta1EventTypeLister() eventingv1beta1listers.EventTypeLister {
+	return eventingv1beta1listers.NewEventTypeLister(l.indexerFor(&eventingv1beta1.EventType{}))
+}
+
+func (l *Listers) GetV1Beta1InMemoryChannelLister() messaginglistersv1beta1.InMemoryChannelLister {
+	return messaginglistersv1beta1.NewInMemoryChannelLister(l.indexerFor(&messagingv1beta1.InMemoryChannel{}))
+}
+
+func (l *Listers) GetV1Beta1MessagingChannelLister() messaginglistersv1beta1.ChannelLister {
+	return messaginglistersv1beta1.NewChannelLister(l.indexerFor(&messagingv1beta1.Channel{}))
+}
+
+func (l *Listers) GetFlowsParallelLister() flowslisters.ParallelLister {
+	return flowslisters.NewParallelLister(l.indexerFor(&flowsv1beta1.Parallel{}))
+}
+
+func (l *Listers) GetApiServerSourceLister() sourcelisters.ApiServerSourceLister {
+	return sourcelisters.NewApiServerSourceLister(l.indexerFor(&sourcesv1alpha1.ApiServerSource{}))
+}
+
+func (l *Listers) GetSinkBindingLister() sourcelisters.SinkBindingLister {
+	return sourcelisters.NewSinkBindingLister(l.indexerFor(&sourcesv1alpha1.SinkBinding{}))
+}
+
+func (l *Listers) GetPingSourceV1beta1Lister() sourcev1beta1listers.PingSourceLister {
+	return sourcev1beta1listers.NewPingSourceLister(l.indexerFor(&sourcesv1beta1.PingSource{}))
+}
+
+func (l *Listers) GetContainerSourceV1alpha2Lister() sourcev1alpha2listers.ContainerSourceLister {
+	return sourcev1alpha2listers.NewContainerSourceLister(l.indexerFor(&sourcesv1alpha2.ContainerSource{}))
+}
+
+func (l *Listers) GetContainerSourceV1beta1Lister() sourcev1beta1listers.ContainerSourceLister {
+	return sourcev1beta1listers.NewContainerSourceLister(l.indexerFor(&sourcesv1beta1.ContainerSource{}))
+}
+
+func (l *Listers) GetSinkBindingV1alpha2Lister() sourcev1alpha2listers.SinkBindingLister {
+	return sourcev1alpha2listers.NewSinkBindingLister(l.indexerFor(&sourcesv1alpha2.SinkBinding{}))
+}
+
+func (l *Listers) GetSinkBindingV1beta1Lister() sourcev1beta1listers.SinkBindingLister {
+	return sourcev1beta1listers.NewSinkBindingLister(l.indexerFor(&sourcesv1beta1.SinkBinding{}))
+}
+
+func (l *Listers) GetApiServerSourceV1alpha2Lister() sourcev1alpha2listers.ApiServerSourceLister {
+	return sourcev1alpha2listers.NewApiServerSourceLister(l.indexerFor(&sourcesv1alpha2.ApiServerSource{}))
+}
+
+func (l *Listers) GetDeploymentLister() appsv1listers.DeploymentLister {
+	return appsv1listers.NewDeploymentLister(l.indexerFor(&appsv1.Deployment{}))
+}
+
+func (l *Listers) GetK8sServiceLister() corev1listers.ServiceLister {
+	return corev1listers.NewServiceLister(l.indexerFor(&corev1.Service{}))
+}
+
+func (l *Listers) GetSecretLister() corev1listers.SecretLister {
+	return corev1listers.NewSecretLister(l.indexerFor(&corev1.Secret{}))
+}
+
+func (l *Listers) GetNamespaceLister() corev1listers.NamespaceLister {
+	return corev1listers.NewNamespaceLister(l.indexerFor(&corev1.Namespace{}))
+}
+
+func (l *Listers) GetServiceAccountLister() corev1listers.ServiceAccountLister {
+	return corev1listers.NewServiceAccountLister(l.indexerFor(&corev1.ServiceAccount{}))
+}
+
+func (l *Listers) GetServiceLister() corev1listers.ServiceLister {
+	return corev1listers.NewServiceLister(l.indexerFor(&corev1.Service{}))
+}
+
+func (l *Listers) GetRoleBindingLister() rbacv1listers.RoleBindingLister {
+	return rbacv1listers.NewRoleBindingLister(l.indexerFor(&rbacv1.RoleBinding{}))
+}
+
+func (l *Listers) GetEndpointsLister() corev1listers.EndpointsLister {
+	return corev1listers.NewEndpointsLister(l.indexerFor(&corev1.Endpoints{}))
+}
+
+func (l *Listers) GetConfigMapLister() corev1listers.ConfigMapLister {
+	return corev1listers.NewConfigMapLister(l.indexerFor(&corev1.ConfigMap{}))
+}
+
+func (l *Listers) GetCustomResourceDefinitionLister() apiextensionsv1listers.CustomResourceDefinitionLister {
+	return apiextensionsv1listers.NewCustomResourceDefinitionLister(l.indexerFor(&apiextensionsv1.CustomResourceDefinition{}))
+}
+
+func (l *Listers) GetConfigMapPropagationLister() configslisters.ConfigMapPropagationLister {
+	return configslisters.NewConfigMapPropagationLister(l.indexerFor(&configsv1alpha1.ConfigMapPropagation{}))
+}
diff --git a/vendor/knative.dev/eventing/pkg/reconciler/testing/mock_dynamic_client.go b/vendor/knative.dev/eventing/pkg/reconciler/testing/mock_dynamic_client.go
new file mode 100644
index 000000000..ec8f92da5
--- /dev/null
+++ b/vendor/knative.dev/eventing/pkg/reconciler/testing/mock_dynamic_client.go
@@ -0,0 +1,268 @@
+/*
+Copyright 2019 The Knative Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package testing
+
+import (
+	"context"
+
+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+	"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
+	"k8s.io/apimachinery/pkg/runtime/schema"
+	"k8s.io/apimachinery/pkg/types"
+	"k8s.io/apimachinery/pkg/watch"
+	"k8s.io/client-go/dynamic"
+)
+
+type MockHandled int
+
+const (
+	// This mock has handled the function call, no further mocks nor the real client should be
+	// called.
+	Handled MockHandled = iota
+	// This mock has not handled the function call, subsequent mocks or the real client should be
+	// called.
+	Unhandled
+)
+
+// All of the functions in dynamic.Interface get mocked equivalents.
+type MockDynamicResource func(innerInterface dynamic.Interface, resource schema.GroupVersionResource) (MockHandled, dynamic.NamespaceableResourceInterface)
+
+// All of the functions in dynamic.Resource get mocked equivalents. For the function
+// dynamic.Resource.Foo(), the mocked equivalent will be:
+// MockDynamicFoo func(ctx *MockDynamicContext[, Foo's arguments]) (MockHandled[, Foo's returns])
+type MockDynamicCreate func(ctx *MockDynamicContext, obj *unstructured.Unstructured, options metav1.CreateOptions, subresources ...string) (MockHandled, *unstructured.Unstructured, error)
+type MockDynamicUpdate func(ctx *MockDynamicContext, obj *unstructured.Unstructured, options metav1.UpdateOptions, subresources ...string) (MockHandled, *unstructured.Unstructured, error)
+type MockDynamicUpdateStatus func(ctx *MockDynamicContext, obj *unstructured.Unstructured, options metav1.UpdateOptions) (MockHandled, *unstructured.Unstructured, error)
+type MockDynamicDelete func(ctx *MockDynamicContext, name string, options metav1.DeleteOptions, subresources ...string) (MockHandled, error)
+type MockDynamicDeleteCollection func(ctx *MockDynamicContext, options metav1.DeleteOptions, listOptions metav1.ListOptions) (MockHandled, error)
+type MockDynamicGet func(ctx *MockDynamicContext, name string, options metav1.GetOptions, subresources ...string) (MockHandled, *unstructured.Unstructured, error)
+type MockDynamicList func(ctx *MockDynamicContext, opts metav1.ListOptions) (MockHandled, *unstructured.UnstructuredList, error)
+type MockDynamicWatch func(ctx *MockDynamicContext, opts metav1.ListOptions) (MockHandled, watch.Interface, error)
+type MockDynamicPatch func(ctx *MockDynamicContext, name string, pt types.PatchType, data []byte, options metav1.PatchOptions, subresources ...string) (MockHandled, *unstructured.Unstructured, error)
+
+type MockDynamicInterface struct {
+	innerInterface dynamic.Interface
+	mocks          DynamicMocks
+}
+
+var _ dynamic.Interface = (*MockDynamicInterface)(nil)
+
+func NewMockDynamicInterface(innerInterface dynamic.Interface, mocks DynamicMocks) *MockDynamicInterface {
+	return &MockDynamicInterface{
+		innerInterface: innerInterface,
+		mocks:          mocks,
+	}
+}
+
+func (m MockDynamicInterface) Resource(resource schema.GroupVersionResource) dynamic.NamespaceableResourceInterface {
+	for i, mockResource := range m.mocks.MockResources {
+		handled, err := mockResource(m.innerInterface, resource)
+		if handled == Handled {
+			if len(m.mocks.MockResources) > 1 {
+				m.mocks.MockResources = append(m.mocks.MockResources[:i], m.mocks.MockResources[i+1:]...)
+			}
+			return err
+		}
+	}
+
+	// We want to wrap the returned value in a mockDynamicResourceInterface, so that it the rest of
+	// the dynamic mocks still apply.
+	return &mockDynamicResourceInterface{
+		ctx: &MockDynamicContext{
+			InnerInterface: m.innerInterface.Resource(resource),
+			Resource:       resource,
+		},
+		mocks: m.mocks,
+	}
+}
+
+// mockDynamicResourceInterface is a dynamic.ResourceInterface that allows mock responses to be
+// returned, instead of calling the inner dynamic.ResourceInterface.
+type mockDynamicResourceInterface struct {
+	ctx   *MockDynamicContext
+	mocks DynamicMocks
+}
+
+type MockDynamicContext struct {
+	InnerInterface dynamic.ResourceInterface
+	Resource       schema.GroupVersionResource
+	Namespace      string
+}
+
+var _ dynamic.NamespaceableResourceInterface = (*mockDynamicResourceInterface)(nil)
+
+// The mocks to run on each function type. Each function will run through the mocks in its list
+// until one responds with 'Handled'. If there is more than one mock in the list, then the one that
+// responds 'Handled' will be removed and not run on subsequent calls to the function. If no mocks
+// respond 'Handled', then the real underlying client is called.
+type DynamicMocks struct {
+	// MockResources corresponds to dynamic.Interface.
+	MockResources []MockDynamicResource
+
+	// All other fields correspond to their dynamic.ResourceInterface equivalents.
+	MockCreates           []MockDynamicCreate
+	MockUpdates           []MockDynamicUpdate
+	MockUpdateStatuses    []MockDynamicUpdateStatus
+	MockDeletes           []MockDynamicDelete
+	MockDeleteCollections []MockDynamicDeleteCollection
+	MockGets              []MockDynamicGet
+	MockLists             []MockDynamicList
+	MockWatches           []MockDynamicWatch
+	MockPatches           []MockDynamicPatch
+}
+
+func (m *mockDynamicResourceInterface) Namespace(ns string) dynamic.ResourceInterface {
+	// We are being a little lazy. We reuse the same mockDynamicResourceInterface for both the
+	// dynamic.NamespaceableResourceInterface and dynamic.ResourceInterface. Once a namespace is
+	// set, it can't be set again. So we panic here. I don't expect this to occur in any 'normal'
+	// code, because the compiler should not allow the second call to Namespace.
+	if i, ok := m.ctx.InnerInterface.(dynamic.NamespaceableResourceInterface); ok {
+		return &mockDynamicResourceInterface{
+			ctx: &MockDynamicContext{
+				InnerInterface: i.Namespace(ns),
+				Resource:       m.ctx.Resource,
+				Namespace:      ns,
+			},
+			mocks: m.mocks,
+		}
+	}
+	panic("mockDynamicResourceInterface.Namespace() called when the inner interface is not a NamespaceableResourceInterface")
+}
+
+// All of the functions are handled almost identically:
+// 1. Run through the mocks in order:
+//   a. If the mock handled the request, then:
+//      i. If there is at least one other mock in the list, remove this mock.
+//      ii. Return the response from the mock.
+// 2. No mock handled the request, so call the inner client.
+
+func (m *mockDynamicResourceInterface) Create(ctx context.Context, obj *unstructured.Unstructured, options metav1.CreateOptions, subresources ...string) (*unstructured.Unstructured, error) {
+	for i, mockCreate := range m.mocks.MockCreates {
+		handled, u, err := mockCreate(m.ctx, obj, options, subresources...)
+		if handled == Handled {
+			if len(m.mocks.MockCreates) > 1 {
+				m.mocks.MockCreates = append(m.mocks.MockCreates[:i], m.mocks.MockCreates[i+1:]...)
+			}
+			return u, err
+		}
+	}
+	return m.ctx.InnerInterface.Create(ctx, obj, options, subresources...)
+}
+
+func (m *mockDynamicResourceInterface) Update(ctx context.Context, obj *unstructured.Unstructured, options metav1.UpdateOptions, subresources ...string) (*unstructured.Unstructured, error) {
+	for i, mockUpdate := range m.mocks.MockUpdates {
+		handled, u, err := mockUpdate(m.ctx, obj, options, subresources...)
+		if handled == Handled {
+			if len(m.mocks.MockUpdates) > 1 {
+				m.mocks.MockUpdates = append(m.mocks.MockUpdates[:i], m.mocks.MockUpdates[i+1:]...)
+			}
+			return u, err
+		}
+	}
+	return m.ctx.InnerInterface.Update(ctx, obj, options, subresources...)
+}
+
+func (m *mockDynamicResourceInterface) UpdateStatus(ctx context.Context, obj *unstructured.Unstructured, options metav1.UpdateOptions) (*unstructured.Unstructured, error) {
+	for i, mockUpdateStatus := range m.mocks.MockUpdateStatuses {
+		handled, u, err := mockUpdateStatus(m.ctx, obj, options)
+		if handled == Handled {
+			if len(m.mocks.MockUpdateStatuses) > 1 {
+				m.mocks.MockUpdateStatuses = append(m.mocks.MockUpdateStatuses[:i], m.mocks.MockUpdateStatuses[i+1:]...)
+			}
+			return u, err
+		}
+	}
+	return m.ctx.InnerInterface.UpdateStatus(ctx, obj, options)
+}
+
+func (m *mockDynamicResourceInterface) Delete(ctx context.Context, name string, options metav1.DeleteOptions, subresources ...string) error {
+	for i, mockDelete := range m.mocks.MockDeletes {
+		handled, err := mockDelete(m.ctx, name, options, subresources...)
+		if handled == Handled {
+			if len(m.mocks.MockDeletes) > 1 {
+				m.mocks.MockDeletes = append(m.mocks.MockDeletes[:i], m.mocks.MockDeletes[i+1:]...)
+			}
+			return err
+		}
+	}
+	return m.ctx.InnerInterface.Delete(ctx, name, options, subresources...)
+}
+
+func (m *mockDynamicResourceInterface) DeleteCollection(ctx context.Context, options metav1.DeleteOptions, listOptions metav1.ListOptions) error {
+	for i, mockDeleteCollection := range m.mocks.MockDeleteCollections {
+		handled, err := mockDeleteCollection(m.ctx, options, listOptions)
+		if handled == Handled {
+			if len(m.mocks.MockDeleteCollections) > 1 {
+				m.mocks.MockDeleteCollections = append(m.mocks.MockDeleteCollections[:i], m.mocks.MockDeleteCollections[i+1:]...)
+			}
+			return err
+		}
+	}
+	return m.ctx.InnerInterface.DeleteCollection(ctx, options, listOptions)
+}
+
+func (m *mockDynamicResourceInterface) Get(ctx context.Context, name string, options metav1.GetOptions, subresources ...string) (*unstructured.Unstructured, error) {
+	for i, mockGet := range m.mocks.MockGets {
+		handled, u, err := mockGet(m.ctx, name, options, subresources...)
+		if handled == Handled {
+			if len(m.mocks.MockGets) > 1 {
+				m.mocks.MockGets = append(m.mocks.MockGets[:i], m.mocks.MockGets[i+1:]...)
+			}
+			return u, err
+		}
+	}
+	return m.ctx.InnerInterface.Get(ctx, name, options, subresources...)
+}
+
+func (m *mockDynamicResourceInterface) List(ctx context.Context, opts metav1.ListOptions) (*unstructured.UnstructuredList, error) {
+	for i, mockList := range m.mocks.MockLists {
+		handled, u, err := mockList(m.ctx, opts)
+		if handled == Handled {
+			if len(m.mocks.MockLists) > 1 {
+				m.mocks.MockLists = append(m.mocks.MockLists[:i], m.mocks.MockLists[i+1:]...)
+			}
+			return u, err
+		}
+	}
+	return m.ctx.InnerInterface.List(ctx, opts)
+}
+
+func (m *mockDynamicResourceInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
+	for i, mockWatch := range m.mocks.MockWatches {
+		handled, w, err := mockWatch(m.ctx, opts)
+		if handled == Handled {
+			if len(m.mocks.MockWatches) > 1 {
+				m.mocks.MockWatches = append(m.mocks.MockWatches[:i], m.mocks.MockWatches[i+1:]...)
+			}
+			return w, err
+		}
+	}
+	return m.ctx.InnerInterface.Watch(ctx, opts)
+}
+
+func (m *mockDynamicResourceInterface) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, options metav1.PatchOptions, subresources ...string) (*unstructured.Unstructured, error) {
+	for i, mockPatch := range m.mocks.MockPatches {
+		handled, u, err := mockPatch(m.ctx, name, pt, data, options, subresources...)
+		if handled == Handled {
+			if len(m.mocks.MockPatches) > 1 {
+				m.mocks.MockPatches = append(m.mocks.MockPatches[:i], m.mocks.MockPatches[i+1:]...)
+			}
+			return u, err
+		}
+	}
+	return m.ctx.InnerInterface.Patch(ctx, name, pt, data, options, subresources...)
+}
diff --git a/vendor/knative.dev/eventing/pkg/reconciler/testing/mock_event_recorder.go b/vendor/knative.dev/eventing/pkg/reconciler/testing/mock_event_recorder.go
new file mode 100644
index 000000000..793d8f56f
--- /dev/null
+++ b/vendor/knative.dev/eventing/pkg/reconciler/testing/mock_event_recorder.go
@@ -0,0 +1,59 @@
+/*
+Copyright 2018 The Knative Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package testing
+
+import (
+	corev1 "k8s.io/api/core/v1"
+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+	"k8s.io/apimachinery/pkg/runtime"
+)
+
+// MockEventRecorder is a recorder.EventRecorder that saves emitted v1 Events.
+type MockEventRecorder struct {
+	events []corev1.Event
+}
+
+func NewEventRecorder() *MockEventRecorder {
+	return &MockEventRecorder{}
+}
+
+func (m *MockEventRecorder) Eventf(object runtime.Object, eventtype, reason, messageFmt string, args ...interface{}) {
+	appendEvent(eventtype, reason, m)
+}
+
+func (m *MockEventRecorder) Event(object runtime.Object, eventtype, reason, message string) {
+	appendEvent(eventtype, reason, m)
+}
+
+func (m *MockEventRecorder) PastEventf(object runtime.Object, timestamp metav1.Time, eventtype, reason, messageFmt string, args ...interface{}) {
+	appendEvent(eventtype, reason, m)
+}
+
+func (m *MockEventRecorder) AnnotatedEventf(object runtime.Object, annotations map[string]string, eventtype, reason, messageFmt string, args ...interface{}) {
+	appendEvent(eventtype, reason, m)
+}
+
+// Helper function to append an event type and reason to the MockEventRecorder
+// Only interested in type and reason of Events for now. If we are planning on verifying other fields in
+// the test cases, we need to include them here.
+func appendEvent(eventtype, reason string, m *MockEventRecorder) {
+	event := corev1.Event{
+		Reason: reason,
+		Type:   eventtype,
+	}
+	m.events = append(m.events, event)
+}
diff --git a/vendor/knative.dev/eventing/pkg/reconciler/testing/namespace.go b/vendor/knative.dev/eventing/pkg/reconciler/testing/namespace.go
new file mode 100644
index 000000000..d15036a5d
--- /dev/null
+++ b/vendor/knative.dev/eventing/pkg/reconciler/testing/namespace.go
@@ -0,0 +1,51 @@
+/*
+Copyright 2019 The Knative Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package testing
+
+import (
+	"time"
+
+	corev1 "k8s.io/api/core/v1"
+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// NamespaceOption enables further configuration of a Namespace.
+type NamespaceOption func(*corev1.Namespace)
+
+// NewNamespace creates a Namespace with NamespaceOptions
+func NewNamespace(name string, o ...NamespaceOption) *corev1.Namespace {
+	s := &corev1.Namespace{
+		ObjectMeta: metav1.ObjectMeta{
+			Name: name,
+		},
+	}
+	for _, opt := range o {
+		opt(s)
+	}
+	return s
+}
+
+func WithNamespaceDeleted(n *corev1.Namespace) {
+	t := metav1.NewTime(time.Unix(1e9, 0))
+	n.ObjectMeta.SetDeletionTimestamp(&t)
+}
+
+func WithNamespaceLabeled(labels map[string]string) NamespaceOption {
+	return func(n *corev1.Namespace) {
+		n.Labels = labels
+	}
+}
diff --git a/vendor/knative.dev/eventing/pkg/reconciler/testing/pingsource.go b/vendor/knative.dev/eventing/pkg/reconciler/testing/pingsource.go
new file mode 100644
index 000000000..dec22bf5c
--- /dev/null
+++ b/vendor/knative.dev/eventing/pkg/reconciler/testing/pingsource.go
@@ -0,0 +1,206 @@
+/*
+Copyright 2020 The Knative Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package testing
+
+import (
+	"context"
+	"time"
+
+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+	"k8s.io/apimachinery/pkg/types"
+	"knative.dev/pkg/apis"
+	duckv1 "knative.dev/pkg/apis/duck/v1"
+
+	"knative.dev/eventing/pkg/apis/sources/v1alpha2"
+	"knative.dev/eventing/pkg/apis/sources/v1beta1"
+)
+
+// PingSourceV1A2Option enables further configuration of a CronJob.
+type PingSourceV1A2Option func(*v1alpha2.PingSource)
+
+// PingSourceV1B1Option enables further configuration of a CronJob.
+type PingSourceV1B1Option func(*v1beta1.PingSource)
+
+// NewPingSourceV1Alpha2 creates a PingSource with PingSourceOption.
+func NewPingSourceV1Alpha2(name, namespace string, o ...PingSourceV1A2Option) *v1alpha2.PingSource {
+	c := &v1alpha2.PingSource{
+		ObjectMeta: metav1.ObjectMeta{
+			Name:      name,
+			Namespace: namespace,
+		},
+	}
+	for _, opt := range o {
+		opt(c)
+	}
+	c.SetDefaults(context.Background()) // TODO: We should add defaults and validation.
+	return c
+}
+
+// NewPingSourceV1Beta1 creates a PingSource with PingSourceOption.
+func NewPingSourceV1Beta1(name, namespace string, o ...PingSourceV1B1Option) *v1beta1.PingSource {
+	c := &v1beta1.PingSource{
+		ObjectMeta: metav1.ObjectMeta{
+			Name:      name,
+			Namespace: namespace,
+		},
+	}
+	for _, opt := range o {
+		opt(c)
+	}
+	c.SetDefaults(context.Background()) // TODO: We should add defaults and validation.
+	return c
+}
+
+func WithPingSourceV1A2UID(uid string) PingSourceV1A2Option {
+	return func(c *v1alpha2.PingSource) {
+		c.UID = types.UID(uid)
+	}
+}
+
+func WithInitPingSourceV1A2Conditions(s *v1alpha2.PingSource) {
+	s.Status.InitializeConditions()
+}
+
+func WithValidPingSourceV1A2Schedule(s *v1alpha2.PingSource) {
+	s.Status.MarkSchedule()
+}
+
+func WithPingSourceV1A2SinkNotFound(s *v1alpha2.PingSource) {
+	s.Status.MarkNoSink("NotFound", "")
+}
+
+func WithPingSourceV1A2Sink(uri *apis.URL) PingSourceV1A2Option {
+	return func(s *v1alpha2.PingSource) {
+		s.Status.MarkSink(uri)
+	}
+}
+
+func WithPingSourceV1A2NotDeployed(name string) PingSourceV1A2Option {
+	return func(s *v1alpha2.PingSource) {
+		s.Status.PropagateDeploymentAvailability(NewDeployment(name, "any"))
+	}
+}
+
+func WithPingSourceV1A2Deployed(s *v1alpha2.PingSource) {
+	s.Status.PropagateDeploymentAvailability(NewDeployment("any", "any", WithDeploymentAvailable()))
+}
+
+func WithPingSourceV1A2CloudEventAttributes(s *v1alpha2.PingSource) {
+	s.Status.CloudEventAttributes = []duckv1.CloudEventAttributes{{
+		Type:   v1alpha2.PingSourceEventType,
+		Source: v1alpha2.PingSourceSource(s.Namespace, s.Name),
+	}}
+}
+
+func WithValidPingSourceV1A2Resources(s *v1alpha2.PingSource) {
+	s.Status.MarkResourcesCorrect()
+}
+
+func WithPingSourceV1A2Spec(spec v1alpha2.PingSourceSpec) PingSourceV1A2Option {
+	return func(c *v1alpha2.PingSource) {
+		c.Spec = spec
+	}
+}
+
+func WithPingSourceV1A2StatusObservedGeneration(generation int64) PingSourceV1A2Option {
+	return func(c *v1alpha2.PingSource) {
+		c.Status.ObservedGeneration = generation
+	}
+}
+
+func WithPingSourceV1A2ObjectMetaGeneration(generation int64) PingSourceV1A2Option {
+	return func(c *v1alpha2.PingSource) {
+		c.ObjectMeta.Generation = generation
+	}
+}
+
+func WithPingSourceV1A2Finalizers(finalizers ...string) PingSourceV1A2Option {
+	return func(c *v1alpha2.PingSource) {
+		c.Finalizers = finalizers
+	}
+}
+
+func WithPingSourceV1A2Deleted(c *v1alpha2.PingSource) {
+	t := metav1.NewTime(time.Unix(1e9, 0))
+	c.SetDeletionTimestamp(&t)
+}
+
+func WithPingSourceV1B1UID(uid string) PingSourceV1B1Option {
+	return func(c *v1beta1.PingSource) {
+		c.UID = types.UID(uid)
+	}
+}
+
+func WithInitPingSourceV1B1Conditions(s *v1beta1.PingSource) {
+	s.Status.InitializeConditions()
+}
+
+func WithPingSourceV1B1SinkNotFound(s *v1beta1.PingSource) {
+	s.Status.MarkNoSink("NotFound", "")
+}
+
+func WithPingSourceV1B1Sink(uri *apis.URL) PingSourceV1B1Option {
+	return func(s *v1beta1.PingSource) {
+		s.Status.MarkSink(uri)
+	}
+}
+
+func WithPingSourceV1B1NotDeployed(name string) PingSourceV1B1Option {
+	return func(s *v1beta1.PingSource) {
+		s.Status.PropagateDeploymentAvailability(NewDeployment(name, "any"))
+	}
+}
+
+func WithPingSourceV1B1Deployed(s *v1beta1.PingSource) {
+	s.Status.PropagateDeploymentAvailability(NewDeployment("any", "any", WithDeploymentAvailable()))
+}
+
+func WithPingSourceV1B1CloudEventAttributes(s *v1beta1.PingSource) {
+	s.Status.CloudEventAttributes = []duckv1.CloudEventAttributes{{
+		Type:   v1beta1.PingSourceEventType,
+		Source: v1beta1.PingSourceSource(s.Namespace, s.Name),
+	}}
+}
+
+func WithPingSourceV1B1Spec(spec v1beta1.PingSourceSpec) PingSourceV1B1Option {
+	return func(c *v1beta1.PingSource) {
+		c.Spec = spec
+	}
+}
+
+func WithPingSourceV1B1StatusObservedGeneration(generation int64) PingSourceV1B1Option {
+	return func(c *v1beta1.PingSource) {
+		c.Status.ObservedGeneration = generation
+	}
+}
+
+func WithPingSourceV1B1ObjectMetaGeneration(generation int64) PingSourceV1B1Option {
+	return func(c *v1beta1.PingSource) {
+		c.ObjectMeta.Generation = generation
+	}
+}
+
+func WithPingSourceV1B1Finalizers(finalizers ...string) PingSourceV1B1Option {
+	return func(c *v1beta1.PingSource) {
+		c.Finalizers = finalizers
+	}
+}
+
+func WithPingSourceV1B1Deleted(c *v1beta1.PingSource) {
+	t := metav1.NewTime(time.Unix(1e9, 0))
+	c.SetDeletionTimestamp(&t)
+}
diff --git a/vendor/knative.dev/eventing/pkg/reconciler/testing/service.go b/vendor/knative.dev/eventing/pkg/reconciler/testing/service.go
new file mode 100644
index 000000000..b6e5dc77f
--- /dev/null
+++ b/vendor/knative.dev/eventing/pkg/reconciler/testing/service.go
@@ -0,0 +1,65 @@
+/*
+Copyright 2019 The Knative Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package testing
+
+import (
+	corev1 "k8s.io/api/core/v1"
+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// ServiceOption enables further configuration of a Service.
+type ServiceOption func(*corev1.Service)
+
+// NewService creates a Service with ServiceOptions
+func NewService(name, namespace string, so ...ServiceOption) *corev1.Service {
+	s := &corev1.Service{
+		ObjectMeta: metav1.ObjectMeta{
+			Name:      name,
+			Namespace: namespace,
+		},
+		Spec: corev1.ServiceSpec{},
+	}
+	for _, opt := range so {
+		opt(s)
+	}
+	return s
+}
+
+func WithServiceOwnerReferences(ownerReferences []metav1.OwnerReference) ServiceOption {
+	return func(s *corev1.Service) {
+		s.OwnerReferences = ownerReferences
+	}
+}
+
+func WithServiceLabels(labels map[string]string) ServiceOption {
+	return func(s *corev1.Service) {
+		s.ObjectMeta.Labels = labels
+		s.Spec.Selector = labels
+	}
+}
+
+func WithServicePorts(ports []corev1.ServicePort) ServiceOption {
+	return func(s *corev1.Service) {
+		s.Spec.Ports = ports
+	}
+}
+
+func WithServiceAnnotations(annotations map[string]string) ServiceOption {
+	return func(s *corev1.Service) {
+		s.ObjectMeta.Annotations = annotations
+	}
+}
diff --git a/vendor/knative.dev/eventing/pkg/reconciler/testing/sinkbinding.go b/vendor/knative.dev/eventing/pkg/reconciler/testing/sinkbinding.go
new file mode 100644
index 000000000..4b14b62a8
--- /dev/null
+++ b/vendor/knative.dev/eventing/pkg/reconciler/testing/sinkbinding.go
@@ -0,0 +1,144 @@
+/*
+Copyright 2020 The Knative Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package testing
+
+import (
+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
+	sourcesv1alpha1 "knative.dev/eventing/pkg/apis/sources/v1alpha1"
+	sourcesv1alpha2 "knative.dev/eventing/pkg/apis/sources/v1alpha2"
+	sourcesv1beta1 "knative.dev/eventing/pkg/apis/sources/v1beta1"
+	duckv1 "knative.dev/pkg/apis/duck/v1"
+	"knative.dev/pkg/tracker"
+)
+
+// SinkBindingV1Alpha1Option enables further configuration of a SinkBinding.
+type SinkBindingV1Alpha1Option func(*sourcesv1alpha1.SinkBinding)
+
+// SinkBindingV1Alpha2Option enables further configuration of a SinkBinding.
+type SinkBindingV1Alpha2Option func(*sourcesv1alpha2.SinkBinding)
+
+// SinkBindingV1Beta1Option enables further configuration of a SinkBinding.
+type SinkBindingV1Beta1Option func(*sourcesv1beta1.SinkBinding)
+
+// NewSinkBindingV1Alpha1 creates a SinkBinding with SinkBindingOptions
+func NewSinkBindingV1Alpha1(name, namespace string, o ...SinkBindingV1Alpha1Option) *sourcesv1alpha1.SinkBinding {
+	c := &sourcesv1alpha1.SinkBinding{
+		ObjectMeta: metav1.ObjectMeta{
+			Name:      name,
+			Namespace: namespace,
+		},
+	}
+	for _, opt := range o {
+		opt(c)
+	}
+	//c.SetDefaults(context.Background()) // TODO: We should add defaults and validation.
+	return c
+}
+
+// NewSinkBindingV1Alpha2 creates a SinkBinding with SinkBindingOptions
+func NewSinkBindingV1Alpha2(name, namespace string, o ...SinkBindingV1Alpha2Option) *sourcesv1alpha2.SinkBinding {
+	c := &sourcesv1alpha2.SinkBinding{
+		ObjectMeta: metav1.ObjectMeta{
+			Name:      name,
+			Namespace: namespace,
+		},
+	}
+	for _, opt := range o {
+		opt(c)
+	}
+	//c.SetDefaults(context.Background()) // TODO: We should add defaults and validation.
+	return c
+}
+
+// NewSinkBindingV1Beta1 creates a SinkBinding with SinkBindingOptions
+func NewSinkBindingV1Beta1(name, namespace string, o ...SinkBindingV1Beta1Option) *sourcesv1beta1.SinkBinding {
+	c := &sourcesv1beta1.SinkBinding{
+		ObjectMeta: metav1.ObjectMeta{
+			Name:      name,
+			Namespace: namespace,
+		},
+	}
+	for _, opt := range o {
+		opt(c)
+	}
+	//c.SetDefaults(context.Background()) // TODO: We should add defaults and validation.
+	return c
+}
+
+// WithSubjectV1A1 assigns the subject of the SinkBinding.
+func WithSubjectV1A1(subject tracker.Reference) SinkBindingV1Alpha1Option {
+	return func(sb *sourcesv1alpha1.SinkBinding) {
+		sb.Spec.Subject = subject
+	}
+}
+
+// WithSinkV1A1 assigns the sink of the SinkBinding.
+func WithSinkV1A1(sink duckv1.Destination) SinkBindingV1Alpha1Option {
+	return func(sb *sourcesv1alpha1.SinkBinding) {
+		sb.Spec.Sink = sink
+	}
+}
+
+// WithCloudEventOverridesV1A1 assigns the CloudEventsOverrides of the SinkBinding.
+func WithCloudEventOverridesV1A1(overrides duckv1.CloudEventOverrides) SinkBindingV1Alpha1Option {
+	return func(sb *sourcesv1alpha1.SinkBinding) {
+		sb.Spec.CloudEventOverrides = &overrides
+	}
+}
+
+// WithSubjectV1A2 assigns the subject of the SinkBinding.
+func WithSubjectV1A2(subject tracker.Reference) SinkBindingV1Alpha2Option {
+	return func(sb *sourcesv1alpha2.SinkBinding) {
+		sb.Spec.Subject = subject
+	}
+}
+
+// WithSinkV1A2 assigns the sink of the SinkBinding.
+func WithSinkV1A2(sink duckv1.Destination) SinkBindingV1Alpha2Option {
+	return func(sb *sourcesv1alpha2.SinkBinding) {
+		sb.Spec.Sink = sink
+	}
+}
+
+// WithCloudEventOverridesV1A1 assigns the CloudEventsOverrides of the SinkBinding.
+func WithCloudEventOverridesV1A2(overrides duckv1.CloudEventOverrides) SinkBindingV1Alpha2Option {
+	return func(sb *sourcesv1alpha2.SinkBinding) {
+		sb.Spec.CloudEventOverrides = &overrides
+	}
+}
+
+// WithSubjectV1B1 assigns the subject of the SinkBinding.
+func WithSubjectV1B1(subject tracker.Reference) SinkBindingV1Beta1Option {
+	return func(sb *sourcesv1beta1.SinkBinding) {
+		sb.Spec.Subject = subject
+	}
+}
+
+// WithSinkV1B1 assigns the sink of the SinkBinding.
+func WithSinkV1B1(sink duckv1.Destination) SinkBindingV1Beta1Option {
+	return func(sb *sourcesv1beta1.SinkBinding) {
+		sb.Spec.Sink = sink
+	}
+}
+
+// WithCloudEventOverridesV1B1 assigns the CloudEventsOverrides of the SinkBinding.
+func WithCloudEventOverridesV1B1(overrides duckv1.CloudEventOverrides) SinkBindingV1Beta1Option {
+	return func(sb *sourcesv1beta1.SinkBinding) {
+		sb.Spec.CloudEventOverrides = &overrides
+	}
+}
diff --git a/vendor/knative.dev/eventing/pkg/reconciler/testing/unstructured.go b/vendor/knative.dev/eventing/pkg/reconciler/testing/unstructured.go
new file mode 100644
index 000000000..a51e646ee
--- /dev/null
+++ b/vendor/knative.dev/eventing/pkg/reconciler/testing/unstructured.go
@@ -0,0 +1,68 @@
+/*
+Copyright 2019 The Knative Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package testing
+
+import (
+	"fmt"
+
+	"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
+
+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// UnstructuredOption enables further configuration of a Unstructured.
+type UnstructuredOption func(*unstructured.Unstructured)
+
+// NewUnstructured creates a unstructured.Unstructured with UnstructuredOption
+func NewUnstructured(gvk metav1.GroupVersionKind, name, namespace string, uo ...UnstructuredOption) *unstructured.Unstructured {
+	u := &unstructured.Unstructured{
+		Object: map[string]interface{}{
+			"apiVersion": apiVersion(gvk),
+			"kind":       gvk.Kind,
+			"metadata": map[string]interface{}{
+				"namespace": namespace,
+				"name":      name,
+			},
+			"spec":   map[string]interface{}{},
+			"status": map[string]interface{}{},
+		},
+	}
+	for _, opt := range uo {
+		opt(u)
+	}
+	return u
+}
+
+func WithUnstructuredAddressable(hostname string) UnstructuredOption {
+	return func(u *unstructured.Unstructured) {
+		status, ok := u.Object["status"].(map[string]interface{})
+		if ok {
+			status["address"] = map[string]interface{}{
+				"hostname": hostname,
+				"url":      fmt.Sprintf("http://%s", hostname),
+			}
+		}
+	}
+}
+
+func apiVersion(gvk metav1.GroupVersionKind) string {
+	groupVersion := gvk.Version
+	if gvk.Group != "" {
+		groupVersion = gvk.Group + "/" + gvk.Version
+	}
+	return groupVersion
+}
diff --git a/vendor/knative.dev/eventing/pkg/reconciler/testing/v1/apiserversouce.go b/vendor/knative.dev/eventing/pkg/reconciler/testing/v1/apiserversouce.go
new file mode 100644
index 000000000..57eb09a1b
--- /dev/null
+++ b/vendor/knative.dev/eventing/pkg/reconciler/testing/v1/apiserversouce.go
@@ -0,0 +1,125 @@
+/*
+Copyright 2020 The Knative Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package testing
+
+import (
+	"context"
+	"fmt"
+	"time"
+
+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+	"k8s.io/apimachinery/pkg/types"
+	apisources "knative.dev/eventing/pkg/apis/sources"
+	v1 "knative.dev/eventing/pkg/apis/sources/v1"
+	"knative.dev/eventing/pkg/reconciler/testing"
+	"knative.dev/pkg/apis"
+	duckv1 "knative.dev/pkg/apis/duck/v1"
+	"knative.dev/pkg/kmeta"
+)
+
+// ApiServerSourceOption enables further configuration of a v1 ApiServer.
+type ApiServerSourceOption func(*v1.ApiServerSource)
+
+// NewApiServerSource creates a v1 ApiServer with ApiServerOptions
+func NewApiServerSource(name, namespace string, o ...ApiServerSourceOption) *v1.ApiServerSource {
+	c := &v1.ApiServerSource{
+		ObjectMeta: metav1.ObjectMeta{
+			Name:      name,
+			Namespace: namespace,
+		},
+	}
+	for _, opt := range o {
+		opt(c)
+	}
+	//c.SetDefaults(context.Background()) // TODO: We should add defaults and validation.
+	return c
+}
+
+func WithApiServerSourceUID(uid string) ApiServerSourceOption {
+	return func(a *v1.ApiServerSource) {
+		a.UID = types.UID(uid)
+	}
+}
+
+// WithInitApiServerSourceConditions initializes the v1 ApiServerSource's conditions.
+func WithInitApiServerSourceConditions(s *v1.ApiServerSource) {
+	s.Status.InitializeConditions()
+}
+
+func WithApiServerSourceSinkNotFound(s *v1.ApiServerSource) {
+	s.Status.MarkNoSink("NotFound", "")
+}
+
+func WithApiServerSourceSink(uri *apis.URL) ApiServerSourceOption {
+	return func(s *v1.ApiServerSource) {
+		s.Status.MarkSink(uri)
+	}
+}
+
+func WithApiServerSourceDeploymentUnavailable(s *v1.ApiServerSource) {
+	// The Deployment uses GenerateName, so its name is empty.
+	name := kmeta.ChildName(fmt.Sprintf("apiserversource-%s-", s.Name), string(s.GetUID()))
+	s.Status.PropagateDeploymentAvailability(testing.NewDeployment(name, "any"))
+}
+
+func WithApiServerSourceDeployed(s *v1.ApiServerSource) {
+	s.Status.PropagateDeploymentAvailability(testing.NewDeployment("any", "any", testing.WithDeploymentAvailable()))
+}
+
+func WithApiServerSourceEventTypes(source string) ApiServerSourceOption {
+	return func(s *v1.ApiServerSource) {
+		ceAttributes := make([]duckv1.CloudEventAttributes, 0, len(apisources.ApiServerSourceEventTypes))
+		for _, apiServerSourceType := range apisources.ApiServerSourceEventTypes {
+			ceAttributes = append(ceAttributes, duckv1.CloudEventAttributes{
+				Type:   apiServerSourceType,
+				Source: source,
+			})
+		}
+		s.Status.CloudEventAttributes = ceAttributes
+	}
+}
+
+func WithApiServerSourceSufficientPermissions(s *v1.ApiServerSource) {
+	s.Status.MarkSufficientPermissions()
+}
+
+func WithApiServerSourceNoSufficientPermissions(s *v1.ApiServerSource) {
+	s.Status.MarkNoSufficientPermissions("", `User system:serviceaccount:testnamespace:default cannot get, list, watch resource "namespaces" in API group ""`)
+}
+
+func WithApiServerSourceDeleted(c *v1.ApiServerSource) {
+	t := metav1.NewTime(time.Unix(1e9, 0))
+	c.ObjectMeta.SetDeletionTimestamp(&t)
+}
+func WithApiServerSourceSpec(spec v1.ApiServerSourceSpec) ApiServerSourceOption {
+	return func(c *v1.ApiServerSource) {
+		c.Spec = spec
+		c.Spec.SetDefaults(context.Background())
+	}
+}
+
+func WithApiServerSourceStatusObservedGeneration(generation int64) ApiServerSourceOption {
+	return func(c *v1.ApiServerSource) {
+		c.Status.ObservedGeneration = generation
+	}
+}
+
+func WithApiServerSourceObjectMetaGeneration(generation int64) ApiServerSourceOption {
+	return func(c *v1.ApiServerSource) {
+		c.ObjectMeta.Generation = generation
+	}
+}
diff --git a/vendor/knative.dev/eventing/pkg/reconciler/testing/v1/listers.go b/vendor/knative.dev/eventing/pkg/reconciler/testing/v1/listers.go
index a70dfb117..97b28dd66 100644
--- a/vendor/knative.dev/eventing/pkg/reconciler/testing/v1/listers.go
+++ b/vendor/knative.dev/eventing/pkg/reconciler/testing/v1/listers.go
@@ -33,14 +33,12 @@ import (
 	eventingv1 "knative.dev/eventing/pkg/apis/eventing/v1"
 	flowsv1 "knative.dev/eventing/pkg/apis/flows/v1"
 	messagingv1 "knative.dev/eventing/pkg/apis/messaging/v1"
-	sourcesv1alpha1 "knative.dev/eventing/pkg/apis/sources/v1alpha1"
-	sourcesv1alpha2 "knative.dev/eventing/pkg/apis/sources/v1alpha2"
+	sourcesv1 "knative.dev/eventing/pkg/apis/sources/v1"
 	fakeeventingclientset "knative.dev/eventing/pkg/client/clientset/versioned/fake"
 	eventinglisters "knative.dev/eventing/pkg/client/listers/eventing/v1"
 	flowslisters "knative.dev/eventing/pkg/client/listers/flows/v1"
 	messaginglisters "knative.dev/eventing/pkg/client/listers/messaging/v1"
-	sourcelisters "knative.dev/eventing/pkg/client/listers/sources/v1alpha1"
-	sourcev1alpha2listers "knative.dev/eventing/pkg/client/listers/sources/v1alpha2"
+	sourcelisters "knative.dev/eventing/pkg/client/listers/sources/v1"
 	duckv1 "knative.dev/pkg/apis/duck/v1"
 	"knative.dev/pkg/reconciler/testing"
 )
@@ -145,29 +143,8 @@ func (l *Listers) GetParallelLister() flowslisters.ParallelLister {
 }
 
 func (l *Listers) GetApiServerSourceLister() sourcelisters.ApiServerSourceLister {
-	return sourcelisters.NewApiServerSourceLister(l.indexerFor(&sourcesv1alpha1.ApiServerSource{}))
+	return sourcelisters.NewApiServerSourceLister(l.indexerFor(&sourcesv1.ApiServerSource{}))
 }
-
-func (l *Listers) GetSinkBindingLister() sourcelisters.SinkBindingLister {
-	return sourcelisters.NewSinkBindingLister(l.indexerFor(&sourcesv1alpha1.SinkBinding{}))
-}
-
-func (l *Listers) GetPingSourceV1alpha2Lister() sourcev1alpha2listers.PingSourceLister {
-	return sourcev1alpha2listers.NewPingSourceLister(l.indexerFor(&sourcesv1alpha2.PingSource{}))
-}
-
-func (l *Listers) GetContainerSourceLister() sourcev1alpha2listers.ContainerSourceLister {
-	return sourcev1alpha2listers.NewContainerSourceLister(l.indexerFor(&sourcesv1alpha2.ContainerSource{}))
-}
-
-func (l *Listers) GetSinkBindingV1alpha2Lister() sourcev1alpha2listers.SinkBindingLister {
-	return sourcev1alpha2listers.NewSinkBindingLister(l.indexerFor(&sourcesv1alpha2.SinkBinding{}))
-}
-
-func (l *Listers) GetApiServerSourceV1alpha2Lister() sourcev1alpha2listers.ApiServerSourceLister {
-	return sourcev1alpha2listers.NewApiServerSourceLister(l.indexerFor(&sourcesv1alpha2.ApiServerSource{}))
-}
-
 func (l *Listers) GetDeploymentLister() appsv1listers.DeploymentLister {
 	return appsv1listers.NewDeploymentLister(l.indexerFor(&appsv1.Deployment{}))
 }
diff --git a/vendor/knative.dev/eventing/pkg/reconciler/testing/v1beta1/apiserversource.go b/vendor/knative.dev/eventing/pkg/reconciler/testing/v1beta1/apiserversource.go
new file mode 100644
index 000000000..ff013c3d2
--- /dev/null
+++ b/vendor/knative.dev/eventing/pkg/reconciler/testing/v1beta1/apiserversource.go
@@ -0,0 +1,49 @@
+/*
+Copyright 2020 The Knative Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package testing
+
+import (
+	"context"
+
+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+	"knative.dev/eventing/pkg/apis/sources/v1beta1"
+)
+
+// ApiServerSourceOption enables further configuration of a v1beta1 ApiServer.
+type ApiServerSourceOption func(*v1beta1.ApiServerSource)
+
+// NewApiServerSource creates a v1beta1 ApiServer with ApiServerOptions
+func NewApiServerSource(name, namespace string, o ...ApiServerSourceOption) *v1beta1.ApiServerSource {
+	c := &v1beta1.ApiServerSource{
+		ObjectMeta: metav1.ObjectMeta{
+			Name:      name,
+			Namespace: namespace,
+		},
+	}
+	for _, opt := range o {
+		opt(c)
+	}
+	//c.SetDefaults(context.Background()) // TODO: We should add defaults and validation.
+	return c
+}
+
+func WithApiServerSourceSpec(spec v1beta1.ApiServerSourceSpec) ApiServerSourceOption {
+	return func(c *v1beta1.ApiServerSource) {
+		c.Spec = spec
+		c.Spec.SetDefaults(context.Background())
+	}
+}
diff --git a/vendor/knative.dev/eventing/test/conformance/helpers/broker_tracing_test_helper.go b/vendor/knative.dev/eventing/test/conformance/helpers/broker_tracing_test_helper.go
index 19b12be79..97a3ea226 100644
--- a/vendor/knative.dev/eventing/test/conformance/helpers/broker_tracing_test_helper.go
+++ b/vendor/knative.dev/eventing/test/conformance/helpers/broker_tracing_test_helper.go
@@ -21,13 +21,14 @@ import (
 	"fmt"
 	"testing"
 
+	"knative.dev/pkg/network"
+
 	cloudevents "github.com/cloudevents/sdk-go/v2"
 	cetest "github.com/cloudevents/sdk-go/v2/test"
 	"github.com/openzipkin/zipkin-go/model"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 
 	"knative.dev/eventing/pkg/apis/eventing/v1beta1"
-	"knative.dev/eventing/pkg/utils"
 	tracinghelper "knative.dev/eventing/test/conformance/helpers/tracing"
 	testlib "knative.dev/eventing/test/lib"
 	"knative.dev/eventing/test/lib/resources"
@@ -129,7 +130,7 @@ func setupBrokerTracing(ctx context.Context, brokerClass string) SetupTracingTes
 			client.SendEventToAddressable(ctx, senderName, broker.Name, testlib.BrokerTypeMeta, event)
 		}
 
-		domain := utils.GetClusterDomainName()
+		domain := network.GetClusterDomainName()
 
 		// We expect the following spans:
 		// 1. Send pod sends event to the Broker Ingress (only if the sending pod generates a span).
diff --git a/vendor/knative.dev/eventing/test/lib/config.go b/vendor/knative.dev/eventing/test/lib/config.go
index b87f3eec8..e5ad31086 100644
--- a/vendor/knative.dev/eventing/test/lib/config.go
+++ b/vendor/knative.dev/eventing/test/lib/config.go
@@ -47,7 +47,7 @@ var ChannelFeatureMap = map[metav1.TypeMeta][]Feature{
 }
 
 var ApiServerSourceTypeMeta = metav1.TypeMeta{
-	APIVersion: resources.SourcesV1B1APIVersion,
+	APIVersion: resources.SourcesV1APIVersion,
 	Kind:       resources.ApiServerSourceKind,
 }
 
diff --git a/vendor/knative.dev/eventing/test/lib/creation.go b/vendor/knative.dev/eventing/test/lib/creation.go
index d5d650fb2..e0eb6d72e 100644
--- a/vendor/knative.dev/eventing/test/lib/creation.go
+++ b/vendor/knative.dev/eventing/test/lib/creation.go
@@ -21,6 +21,8 @@ import (
 	"fmt"
 	"strings"
 
+	sourcesv1 "knative.dev/eventing/pkg/apis/sources/v1"
+
 	appsv1 "k8s.io/api/apps/v1"
 	batchv1beta1 "k8s.io/api/batch/v1beta1"
 	corev1 "k8s.io/api/core/v1"
@@ -592,6 +594,23 @@ func (c *Client) CreateApiServerSourceV1Beta1OrFail(apiServerSource *sourcesv1be
 	c.Tracker.AddObj(apiServerSource)
 }
 
+// CreateApiServerSourceV1OrFail will create an v1 ApiServerSource
+func (c *Client) CreateApiServerSourceV1OrFail(apiServerSource *sourcesv1.ApiServerSource) {
+	c.T.Logf("Creating apiserversource %+v", apiServerSource)
+	apiServerInterface := c.Eventing.SourcesV1().ApiServerSources(c.Namespace)
+	err := c.RetryWebhookErrors(func(attempts int) (err error) {
+		_, e := apiServerInterface.Create(context.Background(), apiServerSource, metav1.CreateOptions{})
+		if e != nil {
+			c.T.Logf("Failed to create apiserversource %q: %v", apiServerSource.Name, e)
+		}
+		return e
+	})
+	if err != nil && !errors.IsAlreadyExists(err) {
+		c.T.Fatalf("Failed to create apiserversource %q: %v", apiServerSource.Name, err)
+	}
+	c.Tracker.AddObj(apiServerSource)
+}
+
 // CreateContainerSourceV1Alpha2OrFail will create a v1alpha2 ContainerSource.
 func (c *Client) CreateContainerSourceV1Alpha2OrFail(containerSource *sourcesv1alpha2.ContainerSource) {
 	c.T.Logf("Creating containersource %+v", containerSource)
diff --git a/vendor/knative.dev/eventing/test/lib/resources/constants.go b/vendor/knative.dev/eventing/test/lib/resources/constants.go
index a04d61baf..c5e0bd16a 100644
--- a/vendor/knative.dev/eventing/test/lib/resources/constants.go
+++ b/vendor/knative.dev/eventing/test/lib/resources/constants.go
@@ -30,6 +30,7 @@ const (
 	ServingAPIVersion     = "serving.knative.dev/v1"
 	SourcesV1A2APIVersion = "sources.knative.dev/v1alpha2"
 	SourcesV1B1APIVersion = "sources.knative.dev/v1beta1"
+	SourcesV1APIVersion   = "sources.knative.dev/v1"
 )
 
 // Kind for Knative resources.
diff --git a/vendor/knative.dev/pkg/metrics/testing/config.go b/vendor/knative.dev/pkg/metrics/testing/config.go
new file mode 100644
index 000000000..2df88b6e0
--- /dev/null
+++ b/vendor/knative.dev/pkg/metrics/testing/config.go
@@ -0,0 +1,28 @@
+/*
+Copyright 2019 The Knative Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    https://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package testing
+
+import (
+	"os"
+
+	"knative.dev/pkg/metrics"
+)
+
+func init() {
+	os.Setenv(metrics.DomainEnv, "knative.dev/testing")
+	metrics.InitForTesting()
+}