mirror of https://github.com/k3s-io/k3s
fix non-gofmt'd things
parent
50eb2cf59c
commit
bb0cd95a83
|
@ -22,6 +22,6 @@ package main
|
|||
import (
|
||||
_ "github.com/GoogleCloudPlatform/kubernetes/pkg/cloudprovider/aws"
|
||||
_ "github.com/GoogleCloudPlatform/kubernetes/pkg/cloudprovider/gce"
|
||||
_ "github.com/GoogleCloudPlatform/kubernetes/pkg/cloudprovider/vagrant"
|
||||
_ "github.com/GoogleCloudPlatform/kubernetes/pkg/cloudprovider/ovirt"
|
||||
_ "github.com/GoogleCloudPlatform/kubernetes/pkg/cloudprovider/vagrant"
|
||||
)
|
||||
|
|
|
@ -85,7 +85,7 @@ var apiObjectFuzzer = fuzz.New().NilChance(.5).NumElements(1, 1).Funcs(
|
|||
func TestInternalRoundTrip(t *testing.T) {
|
||||
latest := "v1beta2"
|
||||
|
||||
for k, _ := range internal.Scheme.KnownTypes("") {
|
||||
for k := range internal.Scheme.KnownTypes("") {
|
||||
obj, err := internal.Scheme.New("", k)
|
||||
if err != nil {
|
||||
t.Errorf("%s: unexpected error: %v", k, err)
|
||||
|
|
|
@ -89,20 +89,20 @@ func mockInstancesResp(instances []ec2.Instance) (aws *AWSCloud) {
|
|||
func(instanceIds []string, filter *ec2.Filter) (resp *ec2.InstancesResp, err error) {
|
||||
return &ec2.InstancesResp{"",
|
||||
[]ec2.Reservation{
|
||||
ec2.Reservation{"", "", "", nil, instances}}}, nil
|
||||
{"", "", "", nil, instances}}}, nil
|
||||
}},
|
||||
nil}
|
||||
}
|
||||
|
||||
func TestList(t *testing.T) {
|
||||
instances := make([]ec2.Instance, 4)
|
||||
instances[0].Tags = []ec2.Tag{ec2.Tag{"Name", "foo"}}
|
||||
instances[0].Tags = []ec2.Tag{{"Name", "foo"}}
|
||||
instances[0].PrivateDNSName = "instance1"
|
||||
instances[1].Tags = []ec2.Tag{ec2.Tag{"Name", "bar"}}
|
||||
instances[1].Tags = []ec2.Tag{{"Name", "bar"}}
|
||||
instances[1].PrivateDNSName = "instance2"
|
||||
instances[2].Tags = []ec2.Tag{ec2.Tag{"Name", "baz"}}
|
||||
instances[2].Tags = []ec2.Tag{{"Name", "baz"}}
|
||||
instances[2].PrivateDNSName = "instance3"
|
||||
instances[3].Tags = []ec2.Tag{ec2.Tag{"Name", "quux"}}
|
||||
instances[3].Tags = []ec2.Tag{{"Name", "quux"}}
|
||||
instances[3].PrivateDNSName = "instance4"
|
||||
|
||||
aws := mockInstancesResp(instances)
|
||||
|
|
|
@ -18,9 +18,9 @@ package ovirt_cloud
|
|||
|
||||
import (
|
||||
"encoding/xml"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"fmt"
|
||||
"net"
|
||||
"net/http"
|
||||
"net/url"
|
||||
|
|
|
@ -28,12 +28,12 @@ func TestDockerConfigJSONDecode(t *testing.T) {
|
|||
input := []byte(`{"http://foo.example.com":{"username": "foo", "password": "bar", "email": "foo@example.com"}, "http://bar.example.com":{"username": "bar", "password": "baz", "email": "bar@example.com"}}`)
|
||||
|
||||
expect := dockerConfig(map[string]dockerConfigEntry{
|
||||
"http://foo.example.com": dockerConfigEntry{
|
||||
"http://foo.example.com": {
|
||||
Username: "foo",
|
||||
Password: "bar",
|
||||
Email: "foo@example.com",
|
||||
},
|
||||
"http://bar.example.com": dockerConfigEntry{
|
||||
"http://bar.example.com": {
|
||||
Username: "bar",
|
||||
Password: "baz",
|
||||
Email: "bar@example.com",
|
||||
|
@ -171,12 +171,12 @@ func TestDecodeDockerConfigFieldAuth(t *testing.T) {
|
|||
|
||||
func TestDockerKeyringFromConfig(t *testing.T) {
|
||||
cfg := dockerConfig(map[string]dockerConfigEntry{
|
||||
"http://foo.example.com": dockerConfigEntry{
|
||||
"http://foo.example.com": {
|
||||
Username: "foo",
|
||||
Password: "bar",
|
||||
Email: "foo@example.com",
|
||||
},
|
||||
"https://bar.example.com": dockerConfigEntry{
|
||||
"https://bar.example.com": {
|
||||
Username: "bar",
|
||||
Password: "baz",
|
||||
Email: "bar@example.com",
|
||||
|
|
|
@ -20,12 +20,12 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
"hash/adler32"
|
||||
"io"
|
||||
"math/rand"
|
||||
"os/exec"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
"io"
|
||||
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
|
||||
"github.com/fsouza/go-dockerclient"
|
||||
|
|
|
@ -18,10 +18,10 @@ package kubelet
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"net"
|
||||
"strconv"
|
||||
"net/http"
|
||||
"io"
|
||||
"net"
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
|
||||
|
|
|
@ -20,13 +20,13 @@ import (
|
|||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"path"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
"io"
|
||||
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/validation"
|
||||
|
|
|
@ -20,6 +20,7 @@ import (
|
|||
"bytes"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
|
@ -27,7 +28,6 @@ import (
|
|||
"reflect"
|
||||
"strings"
|
||||
"testing"
|
||||
"io"
|
||||
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
|
||||
|
|
Loading…
Reference in New Issue