DataDog / system-tests

Test framework for libraries and agents.
Apache License 2.0
24 stars 9 forks source link

Adds a _default in manifest #2418

Open cbeauchesne opened 4 months ago

cbeauchesne commented 4 months ago

Sometimes, an entire file is activated at the same version :

test.py
     test_classA: v2.3.4
     test_classB: v2.3.4
     test_classC: v2.3.4

And if it's a map of variant, it become a little bit verbose.

The idea is to support a _default value :

test.py
     _default: v2.3.4

-> all classes in test.py will be activated at v2.3.4

The _default value is used if, and only if nothing is specified for a class. If something is specified, the _default value is ignored.

The keywork _default is used, meaning we wont be able to name a file _default.

Examples

test.py
     _default: v2.3.4
     test_classC: v4.0

-> all classes in test.py will be activated at v2.3.4, except test_classC who will be activated at v4.0

test.py
     _default: v2.3.4
     test_classC:
        nextjs: missing_feature

-> all classes in test.py will be activated at v2.3.4, except test_classC who will be flagged as missing for nextjs, and activated for all others (activation by default)

test.py
     _default:
        '*': v2.3.4
        'poc': bug
     test_classC: v4.0

-> all classes in test.py will be flagged as bug for poc, and activated at v2.3.4 for other variants, except test_classC who will activated at v4.0 for all variants

cbeauchesne commented 4 months ago

Actually, '*' may be a better choice :