gofmt: format qemu.go and qemu_test.go

Signed-off-by: Simarpreet Singh <simar@linux.com>
This commit is contained in:
Simarpreet Singh 2017-10-02 13:16:48 -07:00
parent 3d99e71de8
commit 10d7d6dab0
No known key found for this signature in database
GPG key ID: 968CB29E0FB1DA5F
2 changed files with 9 additions and 9 deletions

View file

@ -74,17 +74,17 @@ func (d *QemuDriver) Validate(config map[string]interface{}) error {
fd := &fields.FieldData{
Raw: config,
Schema: map[string]*fields.FieldSchema{
"image_path": &fields.FieldSchema{
"image_path": {
Type: fields.TypeString,
Required: true,
},
"accelerator": &fields.FieldSchema{
"accelerator": {
Type: fields.TypeString,
},
"port_map": &fields.FieldSchema{
"port_map": {
Type: fields.TypeArray,
},
"args": &fields.FieldSchema{
"args": {
Type: fields.TypeArray,
},
},

View file

@ -72,7 +72,7 @@ func TestQemuDriver_StartOpen_Wait(t *testing.T) {
CPU: 500,
MemoryMB: 512,
Networks: []*structs.NetworkResource{
&structs.NetworkResource{
{
ReservedPorts: []structs.Port{{Label: "main", Value: 22000}, {Label: "web", Value: 80}},
},
},
@ -121,7 +121,7 @@ func TestQemuDriverUser(t *testing.T) {
t.Parallel()
}
ctestutils.QemuCompatible(t)
tasks := []*structs.Task{&structs.Task{
tasks := []*structs.Task{{
Name: "linux",
Driver: "qemu",
User: "alice",
@ -143,13 +143,13 @@ func TestQemuDriverUser(t *testing.T) {
CPU: 500,
MemoryMB: 512,
Networks: []*structs.NetworkResource{
&structs.NetworkResource{
{
ReservedPorts: []structs.Port{{Label: "main", Value: 22000}, {Label: "web", Value: 80}},
},
},
},
},
&structs.Task{
{
Name: "linux",
Driver: "qemu",
User: "alice",
@ -171,7 +171,7 @@ func TestQemuDriverUser(t *testing.T) {
CPU: 500,
MemoryMB: -1,
Networks: []*structs.NetworkResource{
&structs.NetworkResource{
{
ReservedPorts: []structs.Port{{Label: "main", Value: 22000}, {Label: "web", Value: 80}},
},
},