From 2ba1d9e014622626dcce83a03905898c320ec57c Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Fri, 23 Sep 2022 10:46:03 +0200 Subject: [PATCH] e2e framework: remove AddonResourceConstraints According to spiffx in https://github.com/kubernetes/kubernetes/pull/112043/files#r978031680: > Last in-tree tests that used it were removed in #83322 (1.17 timeframe) > so I think it can be safely removed --- test/e2e/framework/debug/init/init.go | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/test/e2e/framework/debug/init/init.go b/test/e2e/framework/debug/init/init.go index 315efef6213..769db07c5c2 100644 --- a/test/e2e/framework/debug/init/init.go +++ b/test/e2e/framework/debug/init/init.go @@ -27,17 +27,6 @@ import ( e2edebug "k8s.io/kubernetes/test/e2e/framework/debug" ) -var ( - // TODO: this variable used to be a field in framework.Framework. It is - // not clear how it was ever set. https://grep.app/search?q=AddonResourceConstraints - // returns only the default initialization with an empty map. Perhaps it can be removed? - - // Constraints that passed to a check which is executed after data is gathered to - // see if 99% of results are within acceptable bounds. It has to be injected in the test, - // as expectations vary greatly. Constraints are grouped by the container names. - AddonResourceConstraints map[string]e2edebug.ResourceConstraint -) - func init() { framework.NewFrameworkExtensions = append(framework.NewFrameworkExtensions, func(f *framework.Framework) { @@ -98,7 +87,7 @@ func init() { go gatherer.StartGatheringData() ginkgo.DeferCleanup(func() { ginkgo.By("Collecting resource usage data", func() { - summary, resourceViolationError := gatherer.StopAndSummarize([]int{90, 99, 100}, AddonResourceConstraints) + summary, resourceViolationError := gatherer.StopAndSummarize([]int{90, 99, 100}, nil /* no constraints */) // Always record the summary, even if there was an error. f.TestSummaries = append(f.TestSummaries, summary) // Now fail if there was an error.