-
Notifications
You must be signed in to change notification settings - Fork 630
EventType Test Logical Error #7158
Copy link
Copy link
Closed
Labels
area/test-and-releaseTest infrastructure, tests or releaseTest infrastructure, tests or releasekind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.triage/acceptedIssues which should be fixed (post-triage)Issues which should be fixed (post-triage)
Metadata
Metadata
Assignees
Labels
area/test-and-releaseTest infrastructure, tests or releaseTest infrastructure, tests or releasekind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.triage/acceptedIssues which should be fixed (post-triage)Issues which should be fixed (post-triage)
Describe the bug
I am trying to running the rekt test
TestPingSourceWithEventTypes, in the eventing/test/rekt/pingsource_test.goAnd the test config can be found in test/rekt/features/pingsource/feature.go
In the test config, it says
I added a logger within AssertPresent, as you can see here test/rekt/resources/eventtype/eventtype.go
After running the test, I noticed an issue with the logic. The test checks whether eventtypesCount equals len(etl.Items) to verify if an eventType object is created. However, it currently allows for a scenario where both are at 0. This means that even when no eventType object is created, the test will still return as successful. This is a problem from my perspective because the primary purpose of the test is to validate the existence of an eventType object.
Expected behavior
The test should be logically correct.
To Reproduce
Additional context
CNCF Slack Channel discussion thread can be found here