SVRUnit
  • Welcome
  • Installation
    • Installation
    • First Run
  • Use Cases
    • Verify Server
    • Verify Server for Project
    • Post Deployment Tests
    • Unit Test Docker Image
    • Testing your frameworks
  • Configuration
    • Configuration
  • Commands
    • list:suites
    • list:groups
    • test
  • Assertions
    • Command
    • Directory Exists
    • File Exists
    • File Content
    • File Permissions
    • PHP INI
    • PHP Modules
  • Reports
    • HTML Report
    • JUnit Report
  • Resources
    • svrunit.com
    • Github
Powered by GitBook
On this page
  • Existing
  • Not Existing

Was this helpful?

  1. Assertions

File Exists

This assertion type helps you to verify if a certain directory exists.

Existing

Provide a TRUE (1) as expected to check that the file should exist.

file_exists:
    - name: "SSH Private Key exists"
      file: "/var/www/.ssh/id_rsa"
      expected: 1

Not Existing

Provide a FALSE (0) as expected to check that the file does not exist at all.

file_exists:
    - name: "SSH Private Key must not exist"
      file: "/var/www/.ssh/id_rsa"
      expected: 0
PreviousDirectory ExistsNextFile Content

Last updated 2 years ago

Was this helpful?