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

[release-v0.18] Fix VirtualMachineCRCErrors not stop firing #907

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions tests/monitoring_test.go
Expand Up @@ -19,7 +19,6 @@ import (
apps "k8s.io/api/apps/v1"
authnv1 "k8s.io/api/authentication/v1"
core "k8s.io/api/core/v1"
k8serrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
Expand Down Expand Up @@ -287,7 +286,7 @@ var _ = Describe("Prometheus Alerts", func() {

Eventually(func(g Gomega) error {
return apiClient.Get(ctx, types.NamespacedName{Name: vmName, Namespace: strategy.GetNamespace()}, vm)
}).Should(MatchError(k8serrors.IsNotFound))
Copy link
Member

Choose a reason for hiding this comment

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

IIRC this syntax is just missing a string as second argument

e.g.

Should(MatchError(k8serrors.IsNotFound, "IsNotFound"))

Copy link
Member Author

Choose a reason for hiding this comment

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

that is what we have in main branch, but that caused the automatic cherry-pick to fail. Probably here we have an older version of gomega

Copy link
Member

Choose a reason for hiding this comment

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

ACK

}).Should(MatchError(ContainSubstring(fmt.Sprintf("virtualmachines.kubevirt.io \"%s\" not found", vmName))))
akrejcir marked this conversation as resolved.
Show resolved Hide resolved

waitForSeriesToBeDetected(fmt.Sprintf("kubevirt_ssp_vm_rbd_block_volume_without_rxbounce{name='%s'} == 0", vmName))
alertShouldNotBeActive("VirtualMachineCRCErrors")
Expand Down