fix config model: remove ge=0 constraints from LoggingConfig
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -42,14 +42,8 @@ Update Config
|
||||
# ---------------------------------------------------------------------------
|
||||
Validate Valid Config
|
||||
[Documentation] Validate a well-formed configuration.
|
||||
${payload}= Create Dictionary
|
||||
... name=Aniworld
|
||||
... data_dir=data
|
||||
... scheduler={'enabled': True, 'schedule_time': '03:00', 'schedule_days': ['mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun']}
|
||||
... logging={'level': 'INFO', 'file': None, 'max_bytes': None, 'backup_count': 3}
|
||||
... backup={'enabled': False}
|
||||
... nfo={'tmdb_api_key': '', 'auto_create': True, 'download_poster': True, 'download_logo': True, 'download_fanart': True}
|
||||
... other={}
|
||||
${schedule_days}= Create List mon tue wed thu fri sat sun
|
||||
${payload}= Evaluate json.loads('''{"name": "Aniworld", "data_dir": "data", "scheduler": {"enabled": true, "schedule_time": "03:00", "schedule_days": ["mon", "tue", "wed", "thu", "fri", "sat", "sun"]}, "logging": {"level": "INFO", "backup_count": 3}, "backup": {"enabled": false}, "nfo": {"tmdb_api_key": "", "auto_create": true, "download_poster": true, "download_logo": true, "download_fanart": true}, "other": {}}''') modules=json
|
||||
${resp}= Validate Config ${payload} 200
|
||||
Response Should Have Status ${resp} 200
|
||||
${valid}= Get JSON Value ${resp} $.valid
|
||||
@@ -82,14 +76,7 @@ Validate Invalid Schedule Time
|
||||
|
||||
Validate Invalid Log Level
|
||||
[Documentation] Validate a config with an invalid logging level.
|
||||
${payload}= Create Dictionary
|
||||
... name=Aniworld
|
||||
... data_dir=data
|
||||
... scheduler={'enabled': True, 'schedule_time': '03:00', 'schedule_days': ['mon']}
|
||||
... logging={'level': 'INVALID', 'file': None, 'max_bytes': None, 'backup_count': 3}
|
||||
... backup={'enabled': False}
|
||||
... nfo={'auto_create': False}
|
||||
... other={}
|
||||
${payload}= Evaluate json.loads('''{"name": "Aniworld", "data_dir": "data", "scheduler": {"enabled": true, "schedule_time": "03:00", "schedule_days": ["mon"]}, "logging": {"level": "INVALID", "backup_count": 3}, "backup": {"enabled": false}, "nfo": {"auto_create": false}, "other": {}}''') modules=json
|
||||
${resp}= Validate Config ${payload} 422
|
||||
Response Should Have Status ${resp} 422
|
||||
|
||||
|
||||
Reference in New Issue
Block a user