mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Merge pull request #99297 from chendave/testonly
Move test specific option setting to the test file
This commit is contained in:
commit
7c57489f84
@ -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.
|
// WithPodNominator sets podNominator for the scheduling frameworkImpl.
|
||||||
func WithPodNominator(nominator framework.PodNominator) Option {
|
func WithPodNominator(nominator framework.PodNominator) Option {
|
||||||
return func(o *frameworkOptions) {
|
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) {
|
func TestRecordingMetrics(t *testing.T) {
|
||||||
state := &framework.CycleState{}
|
state := &framework.CycleState{}
|
||||||
state.SetRecordPluginMetrics(true)
|
state.SetRecordPluginMetrics(true)
|
||||||
|
Loading…
Reference in New Issue
Block a user