Skip to content

[feature]: Give every test an Area trait #1314

Closed

Description

@kimpenhaus

Is your feature request related to a problem? Please describe.

Many tests have no [Trait("Area", ...)], so --filter-trait "Area=..." cannot select them and the areas give an incomplete picture of the suite. On main, 47 test files have no Area trait at all and 11 more set it only on some of their tests:

Project Files without Area
KubeOps.Operator.Test 25
KubeOps.Abstractions.Test 8
KubeOps.Operator.Web.Test 5
KubeOps.KubernetesClient.Test 4
KubeOps.Generator.Test 2
KubeOps.Aspire.Test, KubeOps.Aspire.Hosting.Test, KubeOps.Cli.Test 1 each

Partly covered: Reconciler.Test.cs, ResourceWatcher{TEntity}.Test.cs, OperatorBuilder.Test.cs, OperatorBuilderQueueStrategy.Test.cs, EntityQueueBackgroundService.Test.cs, TimedEntityQueue.Test.cs and five generator tests.

#1301 adds the traits for the webhook and Aspire hosting tests.

Describe the solution you would like

Give every test an Area trait, on the class where all its tests share one area and on the method otherwise. Reuse the existing area names where they fit (e.g. LeaderLoss, Rbac, Selectors, Retry, Logging) and add new ones only for areas that have none yet.

Additional Context

The file list can be reproduced by searching test/**/*.cs for files with [Fact] or [Theory] but without Trait("Area".

Activity

  1. added
    enhancement
    on Nov 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions