blob: 66308b68f33021d5af82f8745a64de55ab77aa3c [file] [log] [blame]
# TODO(xingao) Update to 2.0.0 to enable metadataTest.
schemaVersion: "1.0.0"
# TODO: split out the common tests once resolve the CI issues
# Distro-specific tests
commandTests:
- name: 'os-version'
command: ['sh', '-c', 'cat /etc/issue.net']
expectedOutput: ['Ubuntu 16.04.3 LTS']
# Common tests
commandTests:
- name: 'path-envvar'
command: ['sh', '-c', 'echo $PATH']
expectedOutput: ['/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin']
- name: 'javahome-envvar'
command: ['sh', '-c', 'echo $JAVA_HOME']
expectedOutput: ['/usr/lib/jvm/java-8-openjdk-amd64']
- name: 'java-version'
command: ['bash', '-c', 'java -version 2>&1']
expectedOutput: ['openjdk version \"1.8.*']
- name: 'gcc-version'
command: ['bash', '-c', 'gcc --version 2>&1']
expectedOutput: ['gcc .*']
- name: 'check-openssl'
command: ['bash', '-c', 'openssl version']
expectedOutput: ['OpenSSL .*']
- name: 'check-unzip'
command: ['bash', '-c', 'unzip']
expectedOutput: ['.*Usage: unzip .*']
- name: 'check-zip'
command: ['bash', '-c', 'zip --version']
expectedOutput: ['.*This is Zip.*']
# File existence tests
fileExistenceTests:
- name: 'OpenJDK'
isDirectory: true
path: '/usr/lib/jvm/java-8-openjdk-amd64'
shouldExist: true
# TODO(xingao) Test entry point once rules_docker is updated with latest
# version of the structure_test
# https://github.com/bazelbuild/rules_docker/pull/416
# metadataTest:
# entrypoint: ['bazel']