terraform-compliance / cli

a lightweight, security focused, BDD test framework against terraform.
https://terraform-compliance.com
MIT License
1.34k stars 151 forks source link

Import module `mock` error in v1.3.37 #667

Closed rslotte closed 1 year ago

rslotte commented 1 year ago

Description

When running version 1.3.37 of tf-compliance using Github Actions and the latest version of the tf-compliance action (@main) the following import error occurs: ! ERROR: Unable to import module 'steps' from '/home/runner/.local/lib/python3.10/site-packages/terraform_compliance/steps/steps.py': No module named 'mock'

This error is not present in version 1.3.34

To Reproduce

Should be reproducible via Github Actions on any run using the latest version.

Error Output:

Run terraform-compliance -p plan.out.json -f git:ssh://git@github.com/---/tf-compliance.git --silent
terraform-compliance v1.3.37 initiated

Using remote git repository: ssh://git@github.com/---/tf-compliance.git
> Features  : /tmp/tmpun4njchw/ (ssh://git@github.com/---/cc-tf-compliance.git)
> Plan File : /home/runner/work/---/---/terraform/plan.out.json
> Suppressing output enabled.
* Running in non-interactive mode.
! ERROR: Unable to import module 'steps' from '/home/runner/.local/lib/python3.10/site-packages/terraform_compliance/steps/steps.py': No module named 'mock'

Tested Versions: