[ut enhancement] Replace ut's scheduler cache with mockSchedulerCache #3270
Closed
Description
What would you like to be added:
Use mockSchedulerCache return by NewDefaultMockSchedulerCache
in PR #3269
Why is this needed:
- simplify the code in UT
- fixes some UTs which doesn't run actually
Plan to enhance UTs
- 1. support mockSchedulerCache, have done in add mock cache for ut and performance test #3269
- 2. Unify the UT validation process by defining a UT test struct, which include all resource need to do test, such as pg, pods, nodes, queues, and expect results for binding, pipelined, evicted.
- 2.1 define a CommonStruct, a init func to load conf, and a
func runTest
to do test and validation - 2.2 rewrite each package's UT
- 2.1 define a CommonStruct, a init func to load conf, and a
Finaly, in future commiter only need to concern about UT design when submit a pr