buildah/tests/roles/cli/tasks/add.yaml
Bruno Goncalves eea687c42a Sync new tests from upstreamfirst
* the tests is quite old since it moved from upstreamfirst
    * lots of new cases are added, like option 'run', 'inspect' etc
    * save log to TEST_ARTIFACTS when the variable is set
    * always run tests with latest runc built from source
    * merge task and task status to same line
2018-05-24 12:58:54 +02:00

59 lines
1.8 KiB
YAML

---
- name: buildah add
command: buildah add nginxc /tmp/buildah/bud/Dockerfile
- name: check buildah add
command: ls {{mount.stdout}}/Dockerfile
- name: buildah add to destination
command: buildah add nginxc /tmp/buildah/bud/Dockerfile /home
- name: check buildah add to
command: ls {{mount.stdout}}/home/Dockerfile
- name: buildah add URL
command: buildah add nginxc https://github.com/projectatomic/buildah/raw/master/README.md
- name: check buildah add URL
command: ls {{mount.stdout}}/README.md
- name: buildah add URL to destination
command: buildah add nginxc https://github.com/projectatomic/buildah/raw/master/README.md /home
- name: check buildah add URL to destination
command: ls {{mount.stdout}}/home/README.md
- name: create /tmp/buildah/addcopy
file: path=/tmp/buildah/addcopy state=directory
- name: Download buildah README.md
get_url:
url: https://github.com/projectatomic/buildah/raw/master/README.md
dest: /tmp/buildah/addcopy/
- name: buildah add dir
command: buildah add nginxc /tmp/buildah
- name: check buildah add dir
command: ls {{mount.stdout}}/addcopy/README.md
- name: buildah add dir to destination
command: buildah add nginxc /tmp/buildah /home
- name: check buildah add dir to destination
command: ls {{mount.stdout}}/home/addcopy/README.md
- name: buildah add a tarball file
command: buildah add nginxc /var/www/html/bud/Dockerfile.tar.gz /home
- name: check buildah has added content of tarball to container
command: ls {{mount.stdout}}/home/hello
- name: buildah add with option chown
command: buildah add --chown bin:bin nginxc /tmp/buildah/bud /home
- name: check user after add with option chown
raw: buildah run nginxc -- ls -l /home/hello
register: ast
failed_when: '"bin" not in ast.stdout'