Skip to content

Commit dac47c6

Browse files
committed
Fix tests
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
1 parent 8ef30c2 commit dac47c6

2 files changed

Lines changed: 12 additions & 15 deletions

File tree

builder/xenserver/iso/builder_test.go

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,20 @@ import (
44
"reflect"
55
"testing"
66

7-
"github.com/hashicorp/packer-plugin-sdk/packer"
87
"github.com/hashicorp/packer-plugin-sdk/common"
8+
"github.com/hashicorp/packer-plugin-sdk/packer"
99
)
1010

11-
1211
func testConfig() map[string]interface{} {
1312
return map[string]interface{}{
14-
"remote_host": "localhost",
15-
"remote_username": "admin",
16-
"remote_password": "admin",
17-
"vm_name": "foo",
18-
"iso_checksum": "md5:A221725EE181A44C67E25BD6A2516742",
19-
"iso_url": "http://www.google.com/",
20-
"shutdown_command": "yes",
21-
"ssh_username": "foo",
13+
"remote_host": "localhost",
14+
"remote_username": "admin",
15+
"remote_password": "admin",
16+
"vm_name": "foo",
17+
"iso_checksum": "md5:A221725EE181A44C67E25BD6A2516742",
18+
"iso_url": "http://www.google.com/",
19+
"shutdown_command": "yes",
20+
"ssh_username": "foo",
2221

2322
common.BuildNameConfigKey: "foo",
2423
}
@@ -43,7 +42,7 @@ func TestBuilderPrepare_Defaults(t *testing.T) {
4342
t.Fatalf("should not have error: %s", err)
4443
}
4544

46-
if b.config.ToolsIsoName != "xs-tools.iso" {
45+
if b.config.ToolsIsoName != "" {
4746
t.Errorf("bad tools ISO name: %s", b.config.ToolsIsoName)
4847
}
4948

@@ -201,10 +200,8 @@ func TestBuilderPrepare_ISOChecksum(t *testing.T) {
201200
t.Fatal("should have error")
202201
}
203202

204-
205203
}
206204

207-
208205
func TestBuilderPrepare_ISOUrl(t *testing.T) {
209206
var b Builder
210207
config := testConfig()

builder/xenserver/xva/builder_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package xva
33
import (
44
"testing"
55

6-
"github.com/hashicorp/packer-plugin-sdk/packer"
76
"github.com/hashicorp/packer-plugin-sdk/common"
7+
"github.com/hashicorp/packer-plugin-sdk/packer"
88
)
99

1010
func testConfig() map[string]interface{} {
@@ -40,7 +40,7 @@ func TestBuilderPrepare_Defaults(t *testing.T) {
4040
t.Fatalf("should not have error: %s", err)
4141
}
4242

43-
if b.config.ToolsIsoName != "xs-tools.iso" {
43+
if b.config.ToolsIsoName != "" {
4444
t.Errorf("bad tools ISO name: %s", b.config.ToolsIsoName)
4545
}
4646

0 commit comments

Comments
 (0)