Skip to content

Commit c096333

Browse files
committed
Add new files.* operation tests with spaces.
1 parent 0a0cdb7 commit c096333

File tree

6 files changed

+124
-0
lines changed

6 files changed

+124
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"args": ["test dir"],
3+
"kwargs": {
4+
"user": "testuser",
5+
"group": "testgroup",
6+
"mode": 777,
7+
"recursive": true
8+
},
9+
"facts": {
10+
"directory": {
11+
"testdir": null
12+
}
13+
},
14+
"commands": [
15+
"mkdir -p 'test dir'",
16+
"chmod -R 777 'test dir'",
17+
"chown -R testuser:testgroup 'test dir'"
18+
]
19+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"args": ["test dir"],
3+
"kwargs": {
4+
"mode": 777,
5+
"recursive": true,
6+
"group": "otheruser"
7+
},
8+
"facts": {
9+
"directory": {
10+
"test dir": {
11+
"mode": 0,
12+
"user": "testuser",
13+
"group": "testgroup"
14+
}
15+
}
16+
},
17+
"commands": [
18+
"chmod -R 777 'test dir'",
19+
"chgrp -R otheruser 'test dir'"
20+
]
21+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"args": ["test file"],
3+
"kwargs": {
4+
"user": "testuser",
5+
"group": "testgroup",
6+
"mode": "777",
7+
"touch": true
8+
},
9+
"facts": {
10+
"file": {
11+
"test file": null
12+
}
13+
},
14+
"commands": [
15+
"touch 'test file'",
16+
"chmod 777 'test file'",
17+
"chown testuser:testgroup 'test file'"
18+
],
19+
"idempotent": false
20+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"args": ["test file"],
3+
"kwargs": {
4+
"present": false
5+
},
6+
"facts": {
7+
"file": {
8+
"test file": {
9+
"mode": 0,
10+
"user": "testuser",
11+
"group": "testgroup"
12+
}
13+
}
14+
},
15+
"commands": [
16+
"rm -f 'test file'"
17+
]
18+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"args": ["test link"],
3+
"kwargs": {
4+
"target": "/etc/init.d/path with spaces",
5+
"user": "testuser",
6+
"group": "testgroup"
7+
},
8+
"facts": {
9+
"link": {
10+
"test link": null
11+
}
12+
},
13+
"commands": [
14+
"ln -s '/etc/init.d/path with spaces' 'test link'",
15+
"chown -h testuser:testgroup 'test link'"
16+
]
17+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"args": ["some file.txt", "/home/some file.txt"],
3+
"kwargs": {
4+
"user": "another-testuser",
5+
"group": "another-testgroup",
6+
"mode": 644
7+
},
8+
"files": ["some file.txt"],
9+
"facts": {
10+
"file": {
11+
"/home/some file.txt": {
12+
"mode": 500,
13+
"user": "testuser",
14+
"group": "testgroup"
15+
}
16+
},
17+
"directory": {
18+
"/home": true
19+
},
20+
"sha1_file": {
21+
"/home/some file.txt": "ac2cd59a622114712b5b21081763c54bf0caacb8"
22+
}
23+
},
24+
"commands": [
25+
"chmod 644 '/home/some file.txt'",
26+
"chown another-testuser:another-testgroup '/home/some file.txt'"
27+
],
28+
"idempotent": false
29+
}

0 commit comments

Comments
 (0)