Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Cilium dep and fix unit tests that subsequently broke #335

Merged
merged 2 commits into from
Aug 7, 2020

Conversation

rolinh
Copy link
Member

@rolinh rolinh commented Aug 5, 2020

Bump Cilium dep to latest and use go-cmp to rewrite assertion that started to fail after a cilium dep upgrade due to a testify bug.

This pulls in github.com/google/go-cmp as an explicit dependency.

Ref: cilium/cilium#12772

Note that due to this bug[0] in the `testify` library some unit tests
started failing. See this issue[1] for more details.

[0]: stretchr/testify#930
[1]: cilium/cilium#12772

Signed-off-by: Robin Hahling <robin.hahling@gw-computing.net>
Use `go-cmp` to rewrite assertion that started to fail after a cilium
dep upgrade due to a `testify` bug[0]. More details in this issue[1].

This pulls in `github.com/google/go-cmp` as an explicit dependency.

[0]: stretchr/testify#930
[1]: cilium/cilium#12772

Signed-off-by: Robin Hahling <robin.hahling@gw-computing.net>
@rolinh rolinh added 🤖 area/CI Impacts the testing / continuous integration testing of the project. release-note/misc This PR makes changes that have no direct user impact. labels Aug 5, 2020
@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Aug 5, 2020
Comment on lines +100 to +101
cmpopts.IgnoreUnexported(pb.FlowFilter{}),
cmpopts.IgnoreUnexported(pb.EventTypeFilter{}),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this just future-proofing, or the test doesn't pass without these?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When omitted, one gets a panic with the following message:

--- FAIL: TestFilterDispatch (0.00s)
panic: cannot handle unexported field at {[]*flow.FlowFilter}[0].EventType[0].state:
        "github.com/cilium/cilium/api/v1/flow".EventTypeFilter
consider using a custom Comparer; if you control the implementation of type, you can also consider using an Exporter, AllowUnexported, or cmpopts.IgnoreUnexported [recovered]
        panic: cannot handle unexported field at {[]*flow.FlowFilter}[0].EventType[0].state:
        "github.com/cilium/cilium/api/v1/flow".EventTypeFilter
consider using a custom Comparer; if you control the implementation of type, you can also consider using an Exporter, AllowUnexported, or cmpopts.IgnoreUnexported

@glibsm glibsm merged commit 5fb7069 into master Aug 7, 2020
@glibsm glibsm deleted the pr/rolinh/bump-cilium-dep branch August 7, 2020 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖 area/CI Impacts the testing / continuous integration testing of the project. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants