Skip to content

Instantly share code, notes, and snippets.

@zionyx
Last active October 6, 2021 18:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zionyx/13e4311777f8db94d573bd9cb131e892 to your computer and use it in GitHub Desktop.
Save zionyx/13e4311777f8db94d573bd9cb131e892 to your computer and use it in GitHub Desktop.
Container Structure Test docker test on Windows with Linux containers command: `docker run -v //var/run/docker.sock:/var/run/docker.sock -v "$(pwd):/work" gcr.io/gcp-runtimes/container-structure-test:latest test -i ubuntu:latest -c /work/command-test.yaml`
schemaVersion: "2.0.0"
commandTests:
- name: "git cli"
command: "git"
args: ["--version"]
expectedOutput: ["git version 2.25.1"]
- name: "Check path"
command: "pwd"
# args:
# - -c
# - |
# echo hello &&
# echo world
exitCode: 0
expectedOutput: ["/"]
- name: "pwsh"
command: "pwsh"
args: ["--version"]
expectedOutput: ["PowerShell 7.1.4"]
fileExistenceTests:
- name: "license"
path: "/etc/secret"
shouldExist: true
permissions: "-r--r--r--"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment