-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexamples.yaml
More file actions
104 lines (104 loc) · 2.16 KB
/
examples.yaml
File metadata and controls
104 lines (104 loc) · 2.16 KB
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
name: command examples
init:
- mkdir:
source: ./source
perm: 0777
- mkdir:
source: ./dest
must-perm: 0766
- print:
input: init done
actions:
- cp:
source: ./command_test.go
dest: ./source/command_test.go.bak
- cp:
source: ./source/command_test.go.bak
dest: ./dest/command_test.go.bak
- mv:
source: ./source/command_test.go.bak
dest: ./source/command_test_v2.go.bak
- rm:
source: ./source/command_test_v2.go.bak
- touch:
source: ./source/hello
- echo:
source: ./source/hello
input: Hello World
append: false
- echo:
source: ./source/hello
input: Bye Bye
append: true
no-newline: false
- echo:
source: ./source/empty1
no-newline: true
- echo:
source: ./source/empty2
no-newline: true
- run: echo "Bye Bye"
- symlink:
link: ./source/hello.symlink
dest: ./source/hello
ignore-error: true
- sleep: 2s
- is-equal:
source: ./command_test.go
dest: ./dest/command_test.go.bak
expect: true
must-non-empty: true
- is-equal:
source: ./command_test.go
dest: ./dest/command_test.go.bak
expect: true
must-non-empty: true
algorithm: sha1
- is-equal:
source: ./command_test.go
dest: ./command.go
expect: false
- is-equal:
source: ./source/empty1
dest: ./source/empty2
expect: true
must-non-empty: false
- is-empty:
source: ./dest/command_test.go.bak
expect: false
- is-exist:
source: ./source/command_test.go.bak
expect: false
- is-dir:
source: ./source
expect: true
- is-dir:
source: ./dest/command_test.go.bak
expect: false
- hash:
algorithm: md5
source: ./source/hello
expect: 856719c57653fa86008d49db895a5752
- hash:
algorithm: sha1
source: ./source/hello
expect: f343874b5df87e887d85df2e790df33584463162
- is-equal-text:
source: ./source/hello
dest: |
Hello World
Bye Bye
expect: true
- is-equal-text:
source: ./source/empty1
dest: hello
expect: false
- is-symlink:
link: ./source/hello.symlink
expect: true
ignore-error: true
clear:
- rm:
source: ./source
- rm:
source: ./dest