Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Design prototype: Replacement for shell tests #747

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions test/mgmtest/file-mode.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
test:
title: File mode
inputs:
yaml0: yamlfile
vars:
stat: stat # TODO: in OSX use a different value
# or just supply these in mgmtest itself
timeline:
- input:
target: yaml0
content: |
---
graph: mygraph
resources:
file:
- name: dir
path: /tmp/mgmt/
state: exists
- name: file1
path: "/tmp/mgmt/f1"
content: |
i am f1
state: exists
- name: file2
path: "/tmp/mgmt/f2"
content: |
i am f2
state: exists
mode: 0741
- name: file3
path: "/tmp/mgmt/f3"
content: |
i am f3
state: exists
mode: '0614'
- launch:
command: "./mgmt run --no-watch --tmp-prefix yaml {{.yaml0}}"
- converge:
time: 5
checks:
- shell: ls -l /tmp/mgmt
- shell: test -e /tmp/mgmt/f1
- shell: test -e /tmp/mgmt/f2
- shell: test -e /tmp/mgmt/f3
- shell: test $({{.stat}} -c%a /tmp/mgmt/f2) = 741
- shell: test $({{.stat}} -c%a /tmp/mgmt/f3) = 614
Loading
Loading