Merge pull request #13 from bart0sh/PR0006-reformat-with-gofmt-s

reformatted *.go with gofmt -s -w
This commit is contained in:
Dmitry Rozhkov 2018-05-28 21:56:15 +03:00 committed by GitHub
commit c3d89a7a4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 18 deletions

View File

@ -116,22 +116,22 @@ func TestDiscoverFPGAs(t *testing.T) {
"intel-fpga-port.2", "intel-fpga-fme.2",
},
expectedResult: map[string]map[string]deviceplugin.DeviceInfo{
fmt.Sprintf("%s-d8424dc4a4a3c413f89e433683f9040b", afMode): map[string]deviceplugin.DeviceInfo{
"intel-fpga-dev.0": deviceplugin.DeviceInfo{
fmt.Sprintf("%s-d8424dc4a4a3c413f89e433683f9040b", afMode): {
"intel-fpga-dev.0": {
State: "Healthy",
Nodes: []string{
path.Join(tmpdir, "/dev/intel-fpga-port.0"),
},
},
"intel-fpga-dev.1": deviceplugin.DeviceInfo{
"intel-fpga-dev.1": {
State: "Healthy",
Nodes: []string{
path.Join(tmpdir, "/dev/intel-fpga-port.1"),
},
},
},
fmt.Sprintf("%s-47595d0fae972fbed0c51b4a41c7a349", afMode): map[string]deviceplugin.DeviceInfo{
"intel-fpga-dev.2": deviceplugin.DeviceInfo{
fmt.Sprintf("%s-47595d0fae972fbed0c51b4a41c7a349", afMode): {
"intel-fpga-dev.2": {
State: "Healthy",
Nodes: []string{
path.Join(tmpdir, "/dev/intel-fpga-port.2"),
@ -187,15 +187,15 @@ func TestDiscoverFPGAs(t *testing.T) {
"intel-fpga-port.2", "intel-fpga-fme.2",
},
expectedResult: map[string]map[string]deviceplugin.DeviceInfo{
fmt.Sprintf("%s-ce48969398f05f33946d560708be108a", regionMode): map[string]deviceplugin.DeviceInfo{
"intel-fpga-dev.0": deviceplugin.DeviceInfo{
fmt.Sprintf("%s-ce48969398f05f33946d560708be108a", regionMode): {
"intel-fpga-dev.0": {
State: "Healthy",
Nodes: []string{
path.Join(tmpdir, "/dev/intel-fpga-fme.0"),
path.Join(tmpdir, "/dev/intel-fpga-port.0"),
},
},
"intel-fpga-dev.1": deviceplugin.DeviceInfo{
"intel-fpga-dev.1": {
State: "Healthy",
Nodes: []string{
path.Join(tmpdir, "/dev/intel-fpga-fme.1"),
@ -203,8 +203,8 @@ func TestDiscoverFPGAs(t *testing.T) {
},
},
},
fmt.Sprintf("%s-fd967345645f05f338462a0748be0091", regionMode): map[string]deviceplugin.DeviceInfo{
"intel-fpga-dev.2": deviceplugin.DeviceInfo{
fmt.Sprintf("%s-fd967345645f05f338462a0748be0091", regionMode): {
"intel-fpga-dev.2": {
State: "Healthy",
Nodes: []string{
path.Join(tmpdir, "/dev/intel-fpga-fme.2"),
@ -329,8 +329,8 @@ func TestListAndWatch(t *testing.T) {
"intel-fpga-port.2", "intel-fpga-fme.2",
},
expectedResult: []*pluginapi.Device{
&pluginapi.Device{"intel-fpga-dev.0", "Healthy"},
&pluginapi.Device{"intel-fpga-dev.1", "Healthy"},
{"intel-fpga-dev.0", "Healthy"},
{"intel-fpga-dev.1", "Healthy"},
},
expectedErr: false,
},
@ -393,7 +393,7 @@ func TestAllocate(t *testing.T) {
rqt := &pluginapi.AllocateRequest{
ContainerRequests: []*pluginapi.ContainerAllocateRequest{
&pluginapi.ContainerAllocateRequest{
{
DevicesIDs: []string{"dev1"},
},
},

View File

@ -101,7 +101,7 @@ func TestAllocate(t *testing.T) {
rqt := &pluginapi.AllocateRequest{
ContainerRequests: []*pluginapi.ContainerAllocateRequest{
&pluginapi.ContainerAllocateRequest{
{
DevicesIDs: []string{"dev1"},
},
},

View File

@ -163,7 +163,7 @@ func TestSetupAndServe(t *testing.T) {
client := pluginapi.NewDevicePluginClient(conn)
_, err = client.Allocate(context.Background(), &pluginapi.AllocateRequest{
ContainerRequests: []*pluginapi.ContainerAllocateRequest{
&pluginapi.ContainerAllocateRequest{
{
DevicesIDs: []string{"dev1", "dev2"},
},
},
@ -205,7 +205,7 @@ func TestSetupAndServe(t *testing.T) {
client = pluginapi.NewDevicePluginClient(conn)
_, err = client.Allocate(context.Background(), &pluginapi.AllocateRequest{
ContainerRequests: []*pluginapi.ContainerAllocateRequest{
&pluginapi.ContainerAllocateRequest{
{
DevicesIDs: []string{"dev1", "dev2"},
},
},
@ -226,7 +226,7 @@ func TestStop(t *testing.T) {
func TestMakeAllocateResponse(t *testing.T) {
rqt := &pluginapi.AllocateRequest{
ContainerRequests: []*pluginapi.ContainerAllocateRequest{
&pluginapi.ContainerAllocateRequest{
{
DevicesIDs: []string{"dev1"},
},
},
@ -238,7 +238,7 @@ func TestMakeAllocateResponse(t *testing.T) {
}
devices := map[string]DeviceInfo{
"dev1": DeviceInfo{pluginapi.Unhealthy, []string{"/dev/dev1"}},
"dev1": {pluginapi.Unhealthy, []string{"/dev/dev1"}},
}
_, err = MakeAllocateResponse(rqt, devices)