Skip to content

[ut enhancement] Replace ut's scheduler cache with mockSchedulerCache #3270

Closed
@lowang-bh

Description

What would you like to be added:

Use mockSchedulerCache return by NewDefaultMockSchedulerCache in PR #3269

Why is this needed:

  1. simplify the code in UT
  2. 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

Finaly, in future commiter only need to concern about UT design when submit a pr

Metadata

Assignees

Labels

good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/featureCategorizes issue or PR as related to a new feature.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions