-
Notifications
You must be signed in to change notification settings - Fork 74
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
Method DataIsDifferent() ignores hash keys with undefined values #2080
Comments
See https://github.com/RotherOSS/otobo/tree/issue-%232080-data_is_different for test cases that fail because of this problem. |
The bug concerning |
The fallout from fixing
|
Add some test cases for the darker corners of DataIsDifferent(). Avoid concationation to an undefined variable.
on the right side. Even if the value on the left side is an undef.
now that IsDeeply() is more strict. The extra data was added by the test script itself.
inadvertedly the name %Hash2 was used
No need that the object under test must be called $Kernel::OM.
The data set up by ObjectParamAdd() did not change, but the test is now more strict.
Fixed the problem of the ignored keys in the compared data structure. Adapted most of the afflicted test scripts. Only scripts/test/GenericInterface/Transport/HTTP/SOAP.t still shows failing tests. |
The actual result data structure did not change, only the test had become more strict.
Tests look fine now. The failure in AdminCustomerGroup.t succeeded when run again, looks like a sporadic effect.
|
This was noticed when migrating a test script from
Kernel::System::UnitTest::Driver::IsDeeply()
toTest2::V0::is()
. The former method does not see a difference when comparing{ sample_key => undef }
with{}
, but sees a difference when comparing{}
with{ sample_key => undef }
.This bug also has repercussions with
Kernel::System::UnitTest::Driver::IsDeeply()
.Beware that fixing this bug would trigger at least on test failure in scripts/test/DynamicField/ObjectType/Article/ObjectDataGet.t and possibly in other test scripts.
The text was updated successfully, but these errors were encountered: