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

convert get to traverse_dict_and_list #52434

Closed
wants to merge 3 commits into from

Conversation

mchugh19
Copy link
Contributor

@mchugh19 mchugh19 commented Apr 7, 2019

What does this PR do?

Replaces value.get with call to traverse_dict_and_list to support list and deeper getting
Also only copy tst files from saltmaster, rather than run cp.cache_master on each invocation

Previous Behavior

saltcheck was only able to process a single depth dict in assertion_section
cp.cache_master always run

New Behavior

saltcheck's assertion_section can now traverse dicts and lists
cp.cache_files run for all *.tst files

Tests written?

No

Commits signed with GPG?

No

@mchugh19
Copy link
Contributor Author

mchugh19 commented Apr 9, 2019

Based on some feedback from the slack develop channel, this is still a work in progress.

@mchugh19
Copy link
Contributor Author

Now saltcheck should perform a cp.cache_dir for each requested state. I'd appreciate a second opinion on this logic

@gtmanfred

@mchugh19
Copy link
Contributor Author

mchugh19 commented Apr 12, 2019

It appears the included solution does not work with salt-ssh, and tst files are not copied to the minion. @garethgreenaway or @Ch3LL can you recommend a better approach?

The goal is to run salt-ssh someminion saltcheck.run_state_tests somestate and have that run properly. At the moment salt-check runs cp.cache-dir for the given states, and then walks the cache looking for associated .tst files which it then renders. This works fine for the salt and salt-call cases, but not for salt-ssh. What's a better method?

@mchugh19
Copy link
Contributor Author

I've figured out a way to support salt-ssh. It works but it might need feedback, so I've opened it as another PR for comments there. It includes the functionality of this PR, so I'll close this one out. If the saltcheck ssh wrapper isn't suitable, this PR can be re-opened.

@mchugh19 mchugh19 closed this Apr 14, 2019
@mchugh19 mchugh19 mentioned this pull request May 16, 2019
@mchugh19 mchugh19 deleted the saltcheck_traverse branch June 26, 2019 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant