Skip to content

status check based on existence #1327

@shahzebsiddiqui

Description

@shahzebsiddiqui

@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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions