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

Add a step for checking file existence (and properties) #323

Open
glum23 opened this issue Oct 9, 2017 · 4 comments
Open

Add a step for checking file existence (and properties) #323

glum23 opened this issue Oct 9, 2017 · 4 comments

Comments

@glum23
Copy link
Contributor

glum23 commented Oct 9, 2017

Add a step into file_steps.py that will enable to check whether a file exists (and possibly has some properties like permissions, size, etc.).

@ignatenkobrain
Copy link
Contributor

not sure, but probably easier would be to use test inline, but obviously would like to see some use-cases to find best solution

@glum23
Copy link
Contributor Author

glum23 commented Oct 9, 2017

Well, it's always possible to call bash commands directly, however, it imho breaks the purpose of the behavioral framework. I needed it when checking results of dnf download.

@ignatenkobrain
Copy link
Contributor

yeah, when talking about dnf-download it is perfectly valid use-case. Mind sending PR for checking that file exists?

@kkaarreell
Copy link
Contributor

kkaarreell commented Oct 10, 2017

I propose to implement step like

Then the file {filepath} exists
 | tag    | value      |
 | size   | 12345      |
 | md5sum | 0123456abc |
 | perm   | 755        |

where the table part would be optional and we could add support for various file characteristics

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

No branches or pull requests

3 participants