Skip to content

Improve the configbuilder tests in clusterresolver #8868

@easwars

Description

@easwars

There is a lot of magic in the way the localities and endpoints used by the tests defined in this file are instantiated. And these package globals are accessed from a bunch of tests.

#8864 is making the problem worse because it is creating a new version for a couple of existing tests.

We should clean this test up such that all state is local to the test. We should consider adding some helpers to create localities with endpoints such that individual locality and endpoint weights can be specified by the test logic. And we should also create a helper that computes the expected final endpoint weights. Once these helpers are well documented, the tests will become much easier to read.

The whole of clusterresolver is being moved into CDS as part of A74. So, by the time someone starts working on this, these tests might already be in the CDS policy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: TestingIncludes tests and testing utilities that we have for unit and e2e tests within our repo.P2Status: Help Wanted

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions