Bug #26283
closedhammer sync-plan update does not work with custom cron
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1683096
Description of problem:
When trying to update a sync-plan created with interval set to custom cron, the command always fails with:
Could not update the sync plan:
Cron expression is not valid!
Version-Release number of selected component (if applicable):
~]# hammer --version
hammer (0.15.1)
How reproducible:
I tried many different commands against sync-plan created in web UI and using hammer.
Steps to Reproduce:
1. ~]# hammer sync-plan create --name BugTest --sync-date "2019/02/01" --enabled 1 --interval "custom cron" --cron-expression "1 2 3 4 5" --organization-id 1
2. ~]# hammer sync-plan info --name BugTest --organization-id 1
3. ~]# hammer sync-plan update --name BugTest --organization-id 1 --description Hello
Could not update the sync plan:
Cron expression is not valid!
4. ~]# hammer sync-plan update --name BugTest --organization-id 1 --description Hello --cron-expression "1 2 3 4 5"
Could not update the sync plan:
Cron expression is not valid!
Actual results:
Could not update the sync plan
Expected results:
Could update the sync plan