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

Remove unnecessary test failing on rails 7.1. #23299

Merged

Conversation

jrafanie
Copy link
Member

@jrafanie jrafanie commented Jan 3, 2025

Rails 7.1 detects this as a useless between clause, changing it to a simple = operator with the timestamp value.

It was originally added in 6a94a1d #7075 and it seems it was only to capture the current behavior at the time. I think it's testing internals of rails and not really important for testing behavior of MiqExpression.

In rails 7.1, it was failing with:

   expected: "\"vms\".\"last_scan_on\" BETWEEN '2011-01-10 00:00:00' AND '2011-01-10 00:00:00'"
        got: "\"vms\".\"last_scan_on\" = '2011-01-10 00:00:00'"

Extracted from #23225

Rails 7.1 detects this as a useless between clause, changing it
to a simple = operator with the timestamp value.

It was originally added in 6a94a1d ManageIQ#7075 and it seems
it was only to capture the current behavior at the time.  I think
it's testing internals of rails and not really important for testing
behavior of MiqExpression.

In rails 7.1, it was failing with:

       expected: "\"vms\".\"last_scan_on\" BETWEEN '2011-01-10 00:00:00' AND '2011-01-10 00:00:00'"
            got: "\"vms\".\"last_scan_on\" = '2011-01-10 00:00:00'"
Copy link
Member

@Fryguy Fryguy left a comment

Choose a reason for hiding this comment

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

LGTM, but want @kbrock to review as well

@kbrock
Copy link
Member

kbrock commented Jan 9, 2025

first of all. this failure is so sweet. Very cool stuff.
We could change it to be a single value, but I agree. not sure we care.

@kbrock kbrock merged commit d7aed32 into ManageIQ:master Jan 9, 2025
8 checks passed
@jrafanie jrafanie deleted the drop-redundant-between-clause-test branch January 14, 2025 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants