diff --git a/builder/hyperv/iso/builder.go b/builder/hyperv/iso/builder.go index 155c51614..a364c3226 100644 --- a/builder/hyperv/iso/builder.go +++ b/builder/hyperv/iso/builder.go @@ -66,7 +66,7 @@ type Config struct { DiskSize uint `mapstructure:"disk_size" required:"false"` // The block size of the VHD to be created. // Recommended disk block size for Linux hyper-v guests is 1 MiB. This - // defaults to "32 MiB". + // defaults to "32" MiB. DiskBlockSize uint `mapstructure:"disk_block_size" required:"false"` // The amount, in megabytes, of RAM to assign to the // VM. By default, this is 1 GB. diff --git a/common/iso_config_test.go b/common/iso_config_test.go index b04e0933f..9ffe6fecf 100644 --- a/common/iso_config_test.go +++ b/common/iso_config_test.go @@ -164,7 +164,15 @@ func TestISOConfigPrepare_ISOUrl(t *testing.T) { i.RawSingleISOUrl = "" i.ISOChecksum = "" i.ISOChecksumURL = ts.URL + "/basic.txt" - warns, err = i.Prepare(nil) + // ISOConfig.Prepare() returns a slice of errors + var errs []error + warns, errs = i.Prepare(nil) + if len(warns) > 0 { + t.Fatalf("expected no warnings, got:%v", warns) + } + if len(errs) < 1 || err[0] == nil { + t.Fatalf("expected a populated error slice, got: %v", errs) + } // Test iso_url set i = testISOConfig() diff --git a/website/source/partials/builder/hyperv/iso/_Config-not-required.html.md b/website/source/partials/builder/hyperv/iso/_Config-not-required.html.md index 380b21660..4bdde113c 100644 --- a/website/source/partials/builder/hyperv/iso/_Config-not-required.html.md +++ b/website/source/partials/builder/hyperv/iso/_Config-not-required.html.md @@ -5,7 +5,7 @@ - `disk_block_size` (uint) - The block size of the VHD to be created. Recommended disk block size for Linux hyper-v guests is 1 MiB. This - defaults to "32 MiB". + defaults to "32" MiB. - `memory` (uint) - The amount, in megabytes, of RAM to assign to the VM. By default, this is 1 GB.