mirror of
https://github.com/tofuutils/pre-commit-opentofu.git
synced 2025-10-15 17:38:54 +02:00
chore: Add docker image tests - container-structure-test-config and dive-ci (#365)
This commit is contained in:
parent
f1822ed810
commit
4874cfe42e
4 changed files with 95 additions and 6 deletions
58
.github/.container-structure-test-config.yaml
vendored
Normal file
58
.github/.container-structure-test-config.yaml
vendored
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
schemaVersion: '2.0.0'
|
||||
commandTests:
|
||||
- name: "pre-commit"
|
||||
command: "pre-commit"
|
||||
args: ["-V"]
|
||||
expectedOutput: ["^pre-commit ([0-9]+\\.){2}[0-9]+\\n$"]
|
||||
|
||||
- name: "terraform"
|
||||
command: "terraform"
|
||||
args: ["-version"]
|
||||
expectedOutput: ["^Terraform v([0-9]+\\.){2}[0-9]+\\non linux_amd64\\n$"]
|
||||
|
||||
- name: "checkov"
|
||||
command: "checkov"
|
||||
args: ["--version"]
|
||||
expectedOutput: ["^([0-9]+\\.){2}[0-9]+\\n$"]
|
||||
|
||||
- name: "infracost"
|
||||
command: "infracost"
|
||||
args: ["--version"]
|
||||
expectedOutput: ["^Infracost v([0-9]+\\.){2}[0-9]+\\n$"]
|
||||
|
||||
- name: "terraform-docs"
|
||||
command: "terraform-docs"
|
||||
args: ["--version"]
|
||||
expectedOutput: ["^terraform-docs version v([0-9]+\\.){2}[0-9]+ [a-z0-9]+ linux/amd64\\n$"]
|
||||
|
||||
- name: "terragrunt"
|
||||
command: "terragrunt"
|
||||
args: ["--version"]
|
||||
expectedOutput: ["^terragrunt version v([0-9]+\\.){2}[0-9]+\\n$"]
|
||||
|
||||
- name: "terrascan"
|
||||
command: "terrascan"
|
||||
args: [ "version" ]
|
||||
expectedOutput: [ "^version: v([0-9]+\\.){2}[0-9]+\\n$" ]
|
||||
|
||||
- name: "tflint"
|
||||
command: "tflint"
|
||||
args: [ "--version" ]
|
||||
expectedOutput: [ "TFLint version ([0-9]+\\.){2}[0-9]+\\n$" ]
|
||||
|
||||
- name: "tfsec"
|
||||
command: "tfsec"
|
||||
args: [ "--version" ]
|
||||
expectedOutput: [ "([0-9]+\\.){2}[0-9]+\\n$" ]
|
||||
|
||||
- name: "tfupdate"
|
||||
command: "tfupdate"
|
||||
args: [ "--version" ]
|
||||
expectedOutput: [ "([0-9]+\\.){2}[0-9]+\\n$" ]
|
||||
|
||||
fileExistenceTests:
|
||||
- name: 'terrascan init'
|
||||
path: '/root/.terrascan/pkg/policies/opa/rego/github/github_repository/privateRepoEnabled.rego'
|
||||
shouldExist: true
|
||||
uid: 0
|
||||
gid: 0
|
||||
Loading…
Add table
Add a link
Reference in a new issue