-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test for e.g. app memory > 0 were failing for the wrong reason. 0 fails to be parsed as an amount with a unit by the bytefmt library as it doesn't contain a byte unit. Adding tests for missing units showed the errors message could be improved by splitting validation into that for having a unit and that for being a positive amount. go-playground/validator doesn't allow us to give the true path to the erroneous value unfortunately. E.g. the cf on vms errors would be along the lines of `For application 'test-app': Process "web": Disk quota must use a supported unit: B, K, KB, M, MB, G, GB, T, or TB`. So best effort on field identification for now, until we can rethink the validation code.
- Loading branch information
Kieron Browne
committed
Jan 30, 2023
1 parent
114fe00
commit 8135b70
Showing
3 changed files
with
92 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters