mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-26 02:24:21 +01:00
Fix version comparison bug whereby the specified operator was being applied to the wrong version number. The version handling for distro and kernel versions was incorrect. This was not clear as the internal logic was rather difficult to understand. Renaming `constraintInvalid()` to `constraintValid()` and updating `NotValid()` correspondingly makes the logic clearer and exposed the bug, allowing it to be fixed. Added two new tests to ensure correct behaviour: - `TestConstraintNotValidKernelVersion()` - `TestConstraintNotValidDistroVersion()` Fixes #1653. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>