Skip to content

Commit 72da7fa

Browse files
committed
Update files.download tests for new quoted urls.
1 parent 3fedd93 commit 72da7fa

File tree

12 files changed

+18
-18
lines changed

12 files changed

+18
-18
lines changed

tests/operations/apt.deb/download_add.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
}
1313
},
1414
"commands": [
15-
"curl -sSLf 'http://somewhere.com/something.deb' -o _tempfile_",
15+
"curl -sSLf http://somewhere.com/something.deb -o _tempfile_",
1616
"dpkg --force-confdef --force-confold -i _tempfile_ 2> /dev/null || true",
1717
"DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::=\"--force-confdef\" -o Dpkg::Options::=\"--force-confold\" install -f",
1818
"dpkg --force-confdef --force-confold -i _tempfile_"

tests/operations/dnf.rpm/add_url.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
}
1313
},
1414
"commands": [
15-
"curl -sSLf 'https://something.rpm' -o _tempfile_.rpm",
15+
"curl -sSLf https://something.rpm -o _tempfile_.rpm",
1616
"rpm -q `rpm -qp _tempfile_.rpm` 2> /dev/null || rpm -i _tempfile_.rpm"
1717
],
1818
"idempotent": false

tests/operations/files.download/download.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
}
1515
},
1616
"commands": [
17-
"curl -sSLf 'http://myfile' -o /home/myfile",
17+
"curl -sSLf http://myfile -o /home/myfile",
1818
"chgrp mygroup /home/myfile",
1919
"chmod 777 /home/myfile"
2020
],

tests/operations/files.download/download_cache_time.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}
1717
},
1818
"commands": [
19-
"curl -sSLf 'http://myfile' -o /home/myfile"
19+
"curl -sSLf http://myfile -o /home/myfile"
2020
],
2121
"idempotent": false
2222
}

tests/operations/files.download/download_existing_checksum.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@
2424
}
2525
},
2626
"commands": [
27-
"curl -sSLf 'http://myfile' -o /home/myfile",
28-
"((sha1sum /home/myfile 2> /dev/null || shasum /home/myfile || sha1 /home/myfile) | grep sha1-sum) || (echo \"SHA1 did not match!\" && exit 1)",
29-
"((sha256sum /home/myfile 2> /dev/null || shasum -a 256 /home/myfile || sha256 /home/myfile) | grep sha256-sum) || (echo \"SHA256 did not match!\" && exit 1)",
30-
"((md5sum /home/myfile 2> /dev/null || md5 /home/myfile) | grep md5-sum) || (echo \"MD5 did not match!\" && exit 1)"
27+
"curl -sSLf http://myfile -o /home/myfile",
28+
"((sha1sum /home/myfile 2> /dev/null || shasum /home/myfile || sha1 /home/myfile) | grep sha1-sum) || (echo 'SHA1 did not match!' && exit 1)",
29+
"((sha256sum /home/myfile 2> /dev/null || shasum -a 256 /home/myfile || sha256 /home/myfile) | grep sha256-sum) || (echo 'SHA256 did not match!' && exit 1)",
30+
"((md5sum /home/myfile 2> /dev/null || md5 /home/myfile) | grep md5-sum) || (echo 'MD5 did not match!' && exit 1)"
3131
],
3232
"idempotent": false
3333
}

tests/operations/files.download/download_no_curl_no_wget.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
}
1616
},
1717
"commands": [
18-
"(curl -sSLf 'http://myfile' -o /home/myfile) || (wget -q 'http://myfile' -O /home/myfile || (rm -f /home/myfile; exit 1))",
18+
"(curl -sSLf http://myfile -o /home/myfile) || (wget -q http://myfile -O /home/myfile || (rm -f /home/myfile; exit 1))",
1919
"chgrp mygroup /home/myfile",
2020
"chmod 777 /home/myfile"
2121
],

tests/operations/files.download/download_wget.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
}
1616
},
1717
"commands": [
18-
"wget -q 'http://myfile' -O /home/myfile || (rm -f /home/myfile; exit 1)",
18+
"wget -q http://myfile -O /home/myfile || (rm -f /home/myfile; exit 1)",
1919
"chgrp mygroup /home/myfile",
2020
"chmod 777 /home/myfile"
2121
],

tests/operations/files.download/download_with_checksums.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
}
1616
},
1717
"commands": [
18-
"curl -sSLf 'http://myfile' -o /home/myfile",
19-
"((sha1sum /home/myfile 2> /dev/null || shasum /home/myfile || sha1 /home/myfile) | grep sha1-sum) || (echo \"SHA1 did not match!\" && exit 1)",
20-
"((sha256sum /home/myfile 2> /dev/null || shasum -a 256 /home/myfile || sha256 /home/myfile) | grep sha256-sum) || (echo \"SHA256 did not match!\" && exit 1)",
21-
"((md5sum /home/myfile 2> /dev/null || md5 /home/myfile) | grep md5-sum) || (echo \"MD5 did not match!\" && exit 1)"
18+
"curl -sSLf http://myfile -o /home/myfile",
19+
"((sha1sum /home/myfile 2> /dev/null || shasum /home/myfile || sha1 /home/myfile) | grep sha1-sum) || (echo 'SHA1 did not match!' && exit 1)",
20+
"((sha256sum /home/myfile 2> /dev/null || shasum -a 256 /home/myfile || sha256 /home/myfile) | grep sha256-sum) || (echo 'SHA256 did not match!' && exit 1)",
21+
"((md5sum /home/myfile 2> /dev/null || md5 /home/myfile) | grep md5-sum) || (echo 'MD5 did not match!' && exit 1)"
2222
],
2323
"idempotent": false
2424
}

tests/operations/yum.repo/add_url.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
}
1010
},
1111
"commands": [
12-
"curl -sSLf 'http://somesite/somerepo.repo' -o /etc/yum.repos.d/somerepo.repo"
12+
"curl -sSLf http://somesite/somerepo.repo -o /etc/yum.repos.d/somerepo.repo"
1313
],
1414
"idempotent": false
1515
}

tests/operations/yum.rpm/add_url.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
}
1313
},
1414
"commands": [
15-
"curl -sSLf 'https://something.rpm' -o _tempfile_.rpm",
15+
"curl -sSLf https://something.rpm -o _tempfile_.rpm",
1616
"rpm -q `rpm -qp _tempfile_.rpm` 2> /dev/null || rpm -i _tempfile_.rpm"
1717
],
1818
"idempotent": false

0 commit comments

Comments
 (0)