Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Master-port #52441 #54985

Merged
merged 10 commits into from
Apr 13, 2020
Merged

Master-port #52441 #54985

merged 10 commits into from
Apr 13, 2020

Conversation

mchugh19
Copy link
Contributor

cron return a single line

What does this PR do?

Ports #52441 to master

Add get_entry to cron module to return a single cron entry. This allows for use in tools like saltcheck:

validate_cron.{{ task }}_exists:                                          
  module_and_function: cron.get_entry                                     
  args:                                                                   
    - root                            
    - {{ task }}                                                          
  assertion: assertEqual                                                  
  assertion_section: identifier                                           
  expected-return: {{ task }}

@dwoz dwoz requested a review from a team as a code owner November 20, 2019 07:57
@ghost ghost requested a review from dwoz November 20, 2019 07:57
Copy link
Contributor

@dhiltonp dhiltonp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR needs some tests.

It's a good candidate for unit tests - patch list_tab to return sample data, then verify that it breaks if cmd and identifier are specified, and works if identifier or cmd are specified.

Is it possible for the same identifier to occur multiple times in the crontab? What about the same command at different intervals?

salt/modules/cron.py Outdated Show resolved Hide resolved
salt/modules/cron.py Outdated Show resolved Hide resolved
salt/modules/cron.py Outdated Show resolved Hide resolved
@myii
Copy link
Contributor

myii commented Dec 4, 2019

Apologies, I started that review weeks ago but I waited for the PR route but both were closed.

@dwoz
Copy link
Contributor

dwoz commented Dec 16, 2019

@mchugh19 Can you address the comments?

@mchugh19
Copy link
Contributor Author

Added tests and @myii's changes. I think this should be good to go!

@mchugh19
Copy link
Contributor Author

re-run pr-py3-centos-8

@mchugh19
Copy link
Contributor Author

re-run pr-ubuntu1604-py3-m2crypto

@mchugh19
Copy link
Contributor Author

re-run pr-ubuntu1604-py2-m2crypto

dhiltonp
dhiltonp previously approved these changes Mar 12, 2020
@mchugh19
Copy link
Contributor Author

mchugh19 commented Apr 2, 2020

re-run pr-amazon2-py2

@DmitryKuzmenko
Copy link
Contributor

There are no py2 anymore. I've updated the branch to force refreshing of the tests list.

@dwoz dwoz merged commit ee1ebeb into saltstack:master Apr 13, 2020
@sagetherage sagetherage added the ZRelease-Sodium retired label label May 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants