mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 04:33:26 +00:00
Move test specific option setting to the test file
Setting of "metricsRecorder" is only needed for testcase. Signed-off-by: Dave Chen <dave.chen@arm.com>
This commit is contained in:
parent
0df8c69731
commit
20cad3b5da
@ -190,13 +190,6 @@ func WithRunAllFilters(runAllFilters bool) Option {
|
||||
}
|
||||
}
|
||||
|
||||
// withMetricsRecorder is only used in tests.
|
||||
func withMetricsRecorder(recorder *metricsRecorder) Option {
|
||||
return func(o *frameworkOptions) {
|
||||
o.metricsRecorder = recorder
|
||||
}
|
||||
}
|
||||
|
||||
// WithPodNominator sets podNominator for the scheduling frameworkImpl.
|
||||
func WithPodNominator(nominator framework.PodNominator) Option {
|
||||
return func(o *frameworkOptions) {
|
||||
|
@ -1933,6 +1933,13 @@ func TestPermitPlugins(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// withMetricsRecorder set metricsRecorder for the scheduling frameworkImpl.
|
||||
func withMetricsRecorder(recorder *metricsRecorder) Option {
|
||||
return func(o *frameworkOptions) {
|
||||
o.metricsRecorder = recorder
|
||||
}
|
||||
}
|
||||
|
||||
func TestRecordingMetrics(t *testing.T) {
|
||||
state := &framework.CycleState{}
|
||||
state.SetRecordPluginMetrics(true)
|
||||
|
Loading…
Reference in New Issue
Block a user