From c4831ba02cb502ae2392a1459593dcc908669657 Mon Sep 17 00:00:00 2001 From: Raimund Hook <1150270+StingRayZA@users.noreply.github.com> Date: Fri, 20 Sep 2019 11:26:44 +0100 Subject: [PATCH 1/2] Added disk_block_size unit clarification to hyperv-iso doc --- website/source/docs/builders/hyperv-iso.html.md.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/source/docs/builders/hyperv-iso.html.md.erb b/website/source/docs/builders/hyperv-iso.html.md.erb index 9545b44f1..f8d8ddf9b 100644 --- a/website/source/docs/builders/hyperv-iso.html.md.erb +++ b/website/source/docs/builders/hyperv-iso.html.md.erb @@ -93,9 +93,9 @@ builder. file representing the disk will not use the full size unless it is full. -- `disk_block_size` (string) - The block size of the VHD to be created. +- `disk_block_size` (string) - The block size of the VHD to be created in MiB. Recommended disk block size for Linux hyper-v guests is 1 MiB. This - defaults to "32 MiB". + defaults to "32" (MiB). - `disk_size` (number) - The size, in megabytes, of the hard disk to create for the VM. By default, this is 40 GB. From a98f2d21702edf89040db2d21eda8e69c376f7fc Mon Sep 17 00:00:00 2001 From: Lars Lehtonen Date: Fri, 20 Sep 2019 05:06:25 -0700 Subject: [PATCH 2/2] common: fix dropped errors and warnings in test --- common/iso_config_test.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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()