1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 07:49:41 +02:00

Unit tests for enableFeaturesFromFlags function (#6063)

* - exporting BoolPairs CLI func
- added tests for enableFeaturesFromFlags function

* Add a test that uses a feature flag to add change the outcome of code - and test persistence, as that's the current implementation

Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io>

* Minor comment updates

Co-authored-by: Sven Dowideit <sven.dowideit@portainer.io>
Co-authored-by: Stéphane Busso <stephane.busso@gmail.com>
This commit is contained in:
zees-dev 2021-11-15 12:00:25 +13:00 committed by GitHub
parent 9e9a4ca4cc
commit 7d92aa1971
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 117 additions and 3 deletions

View file

@ -38,7 +38,7 @@ func (l *pairListBool) IsCumulative() bool {
return true
}
func boolPairs(s kingpin.Settings) (target *[]portainer.Pair) {
func BoolPairs(s kingpin.Settings) (target *[]portainer.Pair) {
target = new([]portainer.Pair)
s.SetValue((*pairListBool)(target))
return