-
-
Notifications
You must be signed in to change notification settings - Fork 21
status check based on existence #1327
Copy link
Copy link
Closed
Description
@wyphan what do you think of this feature for directory existence as part of status check where test must pass when directory is created after execution of test. Here is a simple example
buildspecs:
dir_existence:
type: script
executor: generic.local.bash
description: status check based on directory existence
run: |
mkdir -p dirA
mkdir -p /tmp/ABC
touch file1
status:
exists:
- dirA
- /tmp/ABC
- file1
This test will evaluate a list of directories where exists will evaluate each value using os.path.exist()
Alternately, we can add support for other keys like is_dir and is_file which will operate same way but use https://docs.python.org/3/library/os.path.html#os.path.isfile and https://docs.python.org/3/library/os.path.html#os.path.isdir
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels