Skip to content

Commit 5024e59

Browse files
committed
Update files.lines tests for new quoting.
1 parent 72da7fa commit 5024e59

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

tests/operations/files.line/add.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
}
99
},
1010
"commands": [
11-
"echo 'match_line' >> somefile"
11+
"echo match_line >> somefile"
1212
],
1313
"idempotent": false
1414
}

tests/operations/files.line/add_backup.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
}
1212
},
1313
"commands": [
14-
"cp somefile somefile.a-timestamp && echo 'match_line' >> somefile"
14+
"cp somefile somefile.a-timestamp && echo match_line >> somefile"
1515
],
1616
"idempotent": false
1717
}

tests/operations/files.line/add_no_exist.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
}
1313
},
1414
"commands": [
15-
"if [ -f 'somefile' ]; then\n (grep '^.*match_line.*$' 'somefile' && sed -i.a-timestamp 's/^.*match_line.*$/replace_line/abc' somefile && rm -f somefile.a-timestamp) 2> /dev/null || echo 'replace_line' >> somefile;\n else\n echo 'replace_line' >> somefile;\n fi"
15+
"if [ -f somefile ]; then (grep '^.*match_line.*$' somefile && sed -i.a-timestamp 's/^.*match_line.*$/replace_line/abc' somefile && rm -f somefile.a-timestamp) 2> /dev/null || echo replace_line >> somefile; else echo replace_line >> somefile; fi"
1616
],
1717
"idempotent": false
1818
}

tests/operations/files.line/add_replace.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
}
1414
},
1515
"commands": [
16-
"echo 'replace_line' >> somefile"
16+
"echo replace_line >> somefile"
1717
],
1818
"idempotent": false
1919
}

tests/operations/server.user/key_files.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
},
4545
"commands": [
4646
"chmod 600 homedir/.ssh/authorized_keys",
47-
"echo 'abc' >> homedir/.ssh/authorized_keys",
48-
"echo 'someotherkeydata' >> homedir/.ssh/authorized_keys"
47+
"echo abc >> homedir/.ssh/authorized_keys",
48+
"echo someotherkeydata >> homedir/.ssh/authorized_keys"
4949
],
5050
"idempotent": false
5151
}

tests/operations/server.user/keys.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
},
3939
"commands": [
4040
"chmod 600 homedir/.ssh/authorized_keys",
41-
"echo 'abc' >> homedir/.ssh/authorized_keys"
41+
"echo abc >> homedir/.ssh/authorized_keys"
4242
],
4343
"idempotent": false
4444
}

tests/operations/server.user/keys_single.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
},
3939
"commands": [
4040
"chmod 600 homedir/.ssh/authorized_keys",
41-
"echo 'abc' >> homedir/.ssh/authorized_keys"
41+
"echo abc >> homedir/.ssh/authorized_keys"
4242
],
4343
"idempotent": false
4444
}

0 commit comments

Comments
 (0)