aboutsummaryrefslogtreecommitdiffstats
path: root/models/unit/unit_test.go
Commit message (Collapse)AuthorAgeFilesLines
* Require at least one unit to be enabled (#24189)Lunny Xiao2023-05-061-17/+59
| | | | | | | | | | | | | | Don't remember why the previous decision that `Code` and `Release` are non-disable units globally. Since now every unit include `Code` could be disabled, maybe we should have a new rule that the repo should have at least one unit. So any unit could be disabled. Fixes #20960 Fixes #7525 --------- Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: yp05327 <576951401@qq.com>
* Improve LoadUnitConfig to handle invalid or duplicate units (#23736)Jason Song2023-04-031-0/+53
The old code just parses an invalid key to `TypeInvalid` and uses it as normal, and duplicate keys will be kept. So this PR will ignore invalid key and log warning and also deduplicate valid units.