Skip to content
This repository has been archived by the owner on Jun 4, 2021. It is now read-only.

Commit

Permalink
Update pkg, ignoring severity in tests (#130)
Browse files Browse the repository at this point in the history
* Update pkg, ignoring severity in tests

Adapting tests after knative/pkg@4b704fa.  This is following the
analogous bump made in knative/eventing@7dc7624

Signed-off-by: Galo Navarro <anglorvaroa@gmail.com>

* fixup! Update pkg, ignoring severity in tests
  • Loading branch information
srvaroa authored and knative-prow-robot committed Nov 27, 2018
1 parent 9ac54f7 commit 9741f15
Show file tree
Hide file tree
Showing 26 changed files with 291 additions and 54 deletions.
5 changes: 3 additions & 2 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ required = [
[[override]]
name = "github.com/knative/pkg"
# HEAD as of 2018-11-05
revision = "a8160c7d728d26da67e596c5b1975877082a26e6"
revision = "862aa6dbe7b6a79430354f732da044d02dcadac0"

[[override]]
name = "k8s.io/api"
Expand Down
2 changes: 2 additions & 0 deletions config/crds/sources_v1alpha1_containersource.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ spec:
type: string
reason:
type: string
severity:
type: string
status:
type: string
type:
Expand Down
2 changes: 2 additions & 0 deletions config/crds/sources_v1alpha1_gcppubsubsource.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ spec:
type: string
reason:
type: string
severity:
type: string
status:
type: string
type:
Expand Down
2 changes: 2 additions & 0 deletions config/crds/sources_v1alpha1_githubsource.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ spec:
type: string
reason:
type: string
severity:
type: string
status:
type: string
type:
Expand Down
2 changes: 2 additions & 0 deletions config/crds/sources_v1alpha1_kuberneteseventsource.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ spec:
type: string
reason:
type: string
severity:
type: string
status:
type: string
type:
Expand Down
8 changes: 8 additions & 0 deletions config/default-gcppubsub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ spec:
type: string
reason:
type: string
severity:
type: string
status:
type: string
type:
Expand Down Expand Up @@ -132,6 +134,8 @@ spec:
type: string
reason:
type: string
severity:
type: string
status:
type: string
type:
Expand Down Expand Up @@ -254,6 +258,8 @@ spec:
type: string
reason:
type: string
severity:
type: string
status:
type: string
type:
Expand Down Expand Up @@ -325,6 +331,8 @@ spec:
type: string
reason:
type: string
severity:
type: string
status:
type: string
type:
Expand Down
6 changes: 6 additions & 0 deletions config/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ spec:
type: string
reason:
type: string
severity:
type: string
status:
type: string
type:
Expand Down Expand Up @@ -183,6 +185,8 @@ spec:
type: string
reason:
type: string
severity:
type: string
status:
type: string
type:
Expand Down Expand Up @@ -254,6 +258,8 @@ spec:
type: string
reason:
type: string
severity:
type: string
status:
type: string
type:
Expand Down
3 changes: 2 additions & 1 deletion pkg/apis/sources/v1alpha1/containersource_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,8 @@ func TestContainerSourceStatusGetCondition(t *testing.T) {
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
got := test.s.GetCondition(test.condQuery)
ignoreTime := cmpopts.IgnoreFields(duckv1alpha1.Condition{}, "LastTransitionTime")
ignoreTime := cmpopts.IgnoreFields(duckv1alpha1.Condition{},
"LastTransitionTime", "Severity")
if diff := cmp.Diff(test.want, got, ignoreTime); diff != "" {
t.Errorf("unexpected condition (-want, +got) = %v", diff)
}
Expand Down
3 changes: 2 additions & 1 deletion pkg/apis/sources/v1alpha1/gcp_pubsub_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,8 @@ func TestGcpPubSubSourceStatusGetCondition(t *testing.T) {
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
got := test.s.GetCondition(test.condQuery)
ignoreTime := cmpopts.IgnoreFields(duckv1alpha1.Condition{}, "LastTransitionTime")
ignoreTime := cmpopts.IgnoreFields(duckv1alpha1.Condition{},
"LastTransitionTime", "Severity")
if diff := cmp.Diff(test.want, got, ignoreTime); diff != "" {
t.Errorf("unexpected condition (-want, +got) = %v", diff)
}
Expand Down
3 changes: 2 additions & 1 deletion pkg/apis/sources/v1alpha1/githubsource_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,8 @@ func TestGitHubSourceStatusGetCondition(t *testing.T) {
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
got := test.s.GetCondition(test.condQuery)
ignoreTime := cmpopts.IgnoreFields(duckv1alpha1.Condition{}, "LastTransitionTime")
ignoreTime := cmpopts.IgnoreFields(duckv1alpha1.Condition{},
"LastTransitionTime", "Severity")
if diff := cmp.Diff(test.want, got, ignoreTime); diff != "" {
t.Errorf("unexpected condition (-want, +got) = %v", diff)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ func TestKubernetesEventSourceStatusGetCondition(t *testing.T) {
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
got := test.s.GetCondition(test.condQuery)
ignoreTime := cmpopts.IgnoreFields(duckv1alpha1.Condition{}, "LastTransitionTime")
ignoreTime := cmpopts.IgnoreFields(duckv1alpha1.Condition{},
"LastTransitionTime", "Severity")
if diff := cmp.Diff(test.want, got, ignoreTime); diff != "" {
t.Errorf("unexpected condition (-want, +got) = %v", diff)
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

86 changes: 60 additions & 26 deletions vendor/github.com/knative/pkg/apis/duck/v1alpha1/condition_set.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9741f15

Please sign in to comment.