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

fix: Eventually() missing Should() statement and sync error #11101

Merged
merged 1 commit into from
Feb 3, 2024

Commits on Jan 30, 2024

  1. fix: Eventually() missing Should() statement

    The linter enforces the usage of `Should()` statements when a
    `Eventually` check is used.
    
    Also, `DeferCleanup` has been dropped in favor of `AfterEach`. The
    [`resetToDefaultConfig()`
    ](https://github.com/kubevirt/kubevirt/blob/cb1b6e53540189d6664c4a8c126ab6e0a84ff8c4/tests/utils.go#L1842)
    is called before the test `DeferCleanup`, creating the following error:
    "resource & config versions (5548 and 4736 respectively) are not as
    expected. component: \"virt-handler\", pod: \"virt-handler-zdv7f\" "
    
    This is because the `virt-handler` will not be ready (intentionally for
    the purposes of the test), and the `resetToDefaultConfig()` will force
    the `virt-handler` to reconcile, which will fail, but the `virt-handler`
    `resourceVersion` will be updated. Therefore, the Kubevirt object will
    be out of sync.
    
    Signed-off-by: Javier Cano Cano <jcanocan@redhat.com>
    jcanocan committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    e43402d View commit details
    Browse the repository at this point in the history