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

update k8s libs to 1.26. #2687

Merged
merged 3 commits into from
Apr 18, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions tests/cloner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2235,14 +2235,6 @@ var _ = Describe("all clone tests", func() {

f.ForceBindPvcIfDvIsWaitForFirstConsumer(dataVolume)

By("Verify Quota was exceeded in logs")
matchString := strings.Trim(fmt.Sprintf("\"namespace\": \"%s\", \"error\": \"pods \\\"cdi-upload-target-dv\\\" is forbidden: exceeded quota: test-quota, requested", targetNs.Name), " ")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we know if the new quota message still matches the ErrQuotaExceeded function that we use in the dv controllers?

Copy link
Member Author

Choose a reason for hiding this comment

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

If you look at the file we still verify a condition and an event contain ErrExceededQuota

Eventually(func() string {
log, err := f.RunKubectlCommand("logs", f.ControllerPod.Name, "-n", f.CdiInstallNs)
Expect(err).NotTo(HaveOccurred())
return strings.Trim(log, " ")
}, controllerSkipPVCCompleteTimeout, assertionPollInterval).Should(ContainSubstring(matchString))

expectedCondition := &cdiv1.DataVolumeCondition{
Type: cdiv1.DataVolumeRunning,
Status: v1.ConditionFalse,
Expand Down
16 changes: 0 additions & 16 deletions tests/import_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -800,14 +800,6 @@ var _ = Describe("Namespace with quota", func() {
pvcAnn,
nil))

By("Verify Quota was exceeded in logs")
matchString := strings.Trim(fmt.Sprintf(`"name": "import-image-to-pvc", "namespace": "%s", "error": "pods \"importer-import-image-to-pvc\" is forbidden: exceeded quota: test-quota`, f.Namespace.Name), " ")
Eventually(func() string {
log, err := f.RunKubectlCommand("logs", f.ControllerPod.Name, "-n", f.CdiInstallNs)
Expect(err).NotTo(HaveOccurred())
return strings.Trim(log, " ")
}, controllerSkipPVCCompleteTimeout, assertionPollInterval).Should(ContainSubstring(matchString))

By("Check the expected event")
msg := fmt.Sprintf(controller.MessageErrStartingPod, "importer-import-image-to-pvc")
f.ExpectEvent(f.Namespace.Name).Should(ContainSubstring(msg))
Expand All @@ -832,14 +824,6 @@ var _ = Describe("Namespace with quota", func() {
pvcAnn,
nil))

By("Verify Quota was exceeded in logs")
matchString := strings.Trim(fmt.Sprintf(`"name": "import-image-to-pvc", "namespace": "%s", "error": "pods \"importer-import-image-to-pvc\" is forbidden: exceeded quota: test-quota`, f.Namespace.Name), " ")
Eventually(func() string {
log, err := f.RunKubectlCommand("logs", f.ControllerPod.Name, "-n", f.CdiInstallNs)
Expect(err).NotTo(HaveOccurred())
return strings.Trim(log, " ")
}, controllerSkipPVCCompleteTimeout, assertionPollInterval).Should(ContainSubstring(matchString))

By("Check the expected event")
msg := fmt.Sprintf(controller.MessageErrStartingPod, "importer-import-image-to-pvc")
f.ExpectEvent(f.Namespace.Name).Should(ContainSubstring(msg))
Expand Down