mirror of
https://github.com/apricote/hcloud-upload-image.git
synced 2026-02-06 17:57:06 +00:00
parent
921d688fd4
commit
37ebbce517
4 changed files with 24 additions and 6 deletions
|
|
@ -48,6 +48,21 @@ func TestAssembleCommand(t *testing.T) {
|
|||
},
|
||||
want: "bash -c 'set -euo pipefail && wget --no-verbose -O - \"https://example.com/image.xz\" | xz -cd | dd of=/dev/sda bs=4M && sync'",
|
||||
},
|
||||
{
|
||||
name: "local zstd",
|
||||
options: UploadOptions{
|
||||
ImageCompression: CompressionZSTD,
|
||||
},
|
||||
want: "bash -c 'set -euo pipefail && zstd -cd | dd of=/dev/sda bs=4M && sync'",
|
||||
},
|
||||
{
|
||||
name: "remote zstd",
|
||||
options: UploadOptions{
|
||||
ImageURL: mustParseURL("https://example.com/image.zst"),
|
||||
ImageCompression: CompressionZSTD,
|
||||
},
|
||||
want: "bash -c 'set -euo pipefail && wget --no-verbose -O - \"https://example.com/image.zst\" | zstd -cd | dd of=/dev/sda bs=4M && sync'",
|
||||
},
|
||||
{
|
||||
name: "local bz2",
|
||||
options: UploadOptions{
|
||||
|
|
@ -59,9 +74,9 @@ func TestAssembleCommand(t *testing.T) {
|
|||
name: "remote bz2",
|
||||
options: UploadOptions{
|
||||
ImageURL: mustParseURL("https://example.com/image.bz2"),
|
||||
ImageCompression: CompressionXZ,
|
||||
ImageCompression: CompressionBZ2,
|
||||
},
|
||||
want: "bash -c 'set -euo pipefail && wget --no-verbose -O - \"https://example.com/image.bz2\" | xz -cd | dd of=/dev/sda bs=4M && sync'",
|
||||
want: "bash -c 'set -euo pipefail && wget --no-verbose -O - \"https://example.com/image.bz2\" | bzip2 -cd | dd of=/dev/sda bs=4M && sync'",
|
||||
},
|
||||
{
|
||||
name: "local qcow2",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue