-
Notifications
You must be signed in to change notification settings - Fork 11
/
smoke.yaml
124 lines (114 loc) · 2.11 KB
/
smoke.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
working-directory: .
shell:
- sh
- -e
tests:
- name: copy a file
command:
- cp
args:
- input.file
- output.file
files:
- path: output.file
contents:
file: input.file
revert:
- .
- name: uppercase a file
command: |
tr '[:lower:]' '[:upper:]' < input.file > output.file
files:
- path: output.file
contents: |
HERE IS SOME TEXT.
revert:
- .
- name: lowercase a file
command: |
tr '[:lower:]' '[:upper:]' < input.file > output.file
files:
- path: output.file
contents:
file: expected/lowercase.output.file
revert:
- .
- name: multiple files
command: |
echo three > one
echo two > two
echo one > three
files:
- path: one
contents: |
one
- path: two
contents: |
two
- path: three
contents: |
three
revert:
- .
- name: multiple possible file contents
command: |
echo 0 > output.file
files:
- path: output.file
contents:
- |
1
- |
2
- |
3
revert:
- .
- name: increment a number
command:
- ruby
- "-"
stdin: |
num = File.read('number').to_i
num += 1
File.write('number', num.to_s + "\n")
files:
- path: number
contents: |
8
revert:
- .
- name: write to two files
command: |
echo one >> single/thing
echo one >> multiple/things
echo two >> multiple/things
files:
- path: single/thing
contents: |
one
- path: multiple/things
contents: |
one
two
revert:
- ./single
- ./multiple
- name: check the wrong file
command:
- cp
args:
- input.file
- output.file
files:
- path: wrong.file
contents:
file: input.file
revert:
- .
- name: revert an executable file
command: ./hello
stdout: |
Hello, world!
revert:
- .