pre-commit-opentofu/.github/.container-structure-test-config.yaml
Maksym Vlasov dc177fe29e
fix: Updates all dependencies used in Dockerfile and fix Docker image (#507)
* Docker doesn't provide possibilities for avoiding trash

There is no possibility to exclude part of the "pre-installed" files from
COPY steps like https://github.com/moby/buildkit/issues/2853
And copy-paste mostly all `site-packages` without it is not worth it
2023-04-21 16:27:02 +03:00

81 lines
2.1 KiB
YAML

schemaVersion: '2.0.0'
commandTests:
- name: "git"
command: "git"
args: ["--version"]
expectedOutput: ["^git version 2\\.[0-9]+\\.[0-9]+\\n$"]
- 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$" ]
- name: "hcledit"
command: "hcledit"
args: [ "version" ]
expectedOutput: [ "([0-9]+\\.){2}[0-9]+\\n$" ]
- name: "entrypoint.sh"
envVars:
- key: "USERID"
value: "1000:1000"
command: "/entrypoint.sh"
args: [ "-V" ]
expectedError: ["^ERROR: uid:gid 1000:1000 lacks permissions to //\\n$"]
exitCode: 1
- name: "su-exec"
command: "su-exec"
expectedOutput: ["^Usage: su-exec user-spec command \\[args\\]\\n$"]
fileExistenceTests:
- name: 'terrascan init'
path: '/root/.terrascan/pkg/policies/opa/rego/github/github_repository/privateRepoEnabled.rego'
shouldExist: true
uid: 0
gid: 0