Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Unit Testing Pulumi programs in Python

An example of writing mock-based unit tests with both infrastructure definition and tests written in Python. The example uses the unittest test framework to define and run the tests.

Running the tests

  1. Create a Python virtualenv, activate it, and install dependencies:

    $ python3 -m venv venv
    $ source venv/bin/activate
    $ python -m pip install --upgrade pip
    $ python -m pip install -r requirements.txt
  2. Run the tests:

    $ python -m pytest --disable-pytest-warnings # or simply `pytest --disable-pytest-warnings`
    
    ====================================================================================================== 3 passed, 6 warnings in 0.76s =======================================================================================================
    
    

Further steps

Learn more about testing Pulumi programs: