You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What happened:
When writing a new test suite, using erroneous values in existing Eventually() Assertions would still have the test suite pass. It didn't seem like the expect statements are being caught correctly. Upon looking at GoMega documentation, .Should((Succeed)) needs to be added at the end of Eventually to actually get these assertions to be caught.
What you expected to happen:
I expected the test suite to fail once I put in erroneous values, but it passed. I haven't looked into this globally, but I've seen it in multiple spots in the integration test suite ipamd.
How to reproduce it (as minimally and precisely as possible):
I am running ENI/IP Leak Test and changing the oldIP and oldENI to erroneous values ie. 100000 and the test still passes. When I follow the documentation and add .Should(Succeed()) the test will fail.
Code Change to impossible values on eni_ip_leak_test.go line 53:
Add .Should(Succeed()) after the Eventually and run it again, test will fail
Change values back to original values, add .Should(Succeed()), test will pass again.
Anything else we need to know?:
Documentation: https://onsi.github.io/gomega/
Search "Category 3: Making assertions in the function passed into Eventually"
Environment:
Kubernetes version v1.27.1
CNI Version
OS (e.g: cat /etc/os-release): Amazon Linux 2
Kernel (e.g. uname -a): Linux dev-dsk-lnhanks-2a-271b2fcf.us-west-2.amazon.com 5.10.184-153.749.amzn2int.x86_64 Initial commit of amazon-vpc-cni-k8s #1 SMP Wed Jul 12 19:43:54 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered:
Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
What happened:
When writing a new test suite, using erroneous values in existing Eventually() Assertions would still have the test suite pass. It didn't seem like the expect statements are being caught correctly. Upon looking at GoMega documentation, .Should((Succeed)) needs to be added at the end of Eventually to actually get these assertions to be caught.
What you expected to happen:
I expected the test suite to fail once I put in erroneous values, but it passed. I haven't looked into this globally, but I've seen it in multiple spots in the integration test suite ipamd.
How to reproduce it (as minimally and precisely as possible):
I am running ENI/IP Leak Test and changing the oldIP and oldENI to erroneous values ie. 100000 and the test still passes. When I follow the documentation and add .Should(Succeed()) the test will fail.
Code Change to impossible values on eni_ip_leak_test.go line 53:
Comment out line 29
Command:
Test will pass
Add .Should(Succeed()) after the Eventually and run it again, test will fail
Change values back to original values, add .Should(Succeed()), test will pass again.
Anything else we need to know?:
Documentation: https://onsi.github.io/gomega/
Search "Category 3: Making assertions in the function passed into Eventually"
Environment:
cat /etc/os-release
): Amazon Linux 2uname -a
): Linux dev-dsk-lnhanks-2a-271b2fcf.us-west-2.amazon.com 5.10.184-153.749.amzn2int.x86_64 Initial commit of amazon-vpc-cni-k8s #1 SMP Wed Jul 12 19:43:54 UTC 2023 x86_64 x86_64 x86_64 GNU/LinuxThe text was updated successfully, but these errors were encountered: