mirror of https://github.com/kubernetes/kops.git
Import tidying
This commit is contained in:
parent
ccd9ea90b3
commit
cdacc15dce
|
@ -17,8 +17,9 @@ limitations under the License.
|
|||
package main
|
||||
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
"io"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
"k8s.io/kops/cmd/kops/util"
|
||||
)
|
||||
|
||||
|
|
|
@ -18,8 +18,11 @@ package main
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/spf13/cobra"
|
||||
"io"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
"k8s.io/kops/cmd/kops/util"
|
||||
api "k8s.io/kops/pkg/apis/kops"
|
||||
"k8s.io/kops/pkg/validation"
|
||||
|
@ -28,8 +31,6 @@ import (
|
|||
"k8s.io/kubernetes/pkg/api/v1"
|
||||
"k8s.io/kubernetes/pkg/client/clientset_generated/release_1_5"
|
||||
"k8s.io/kubernetes/pkg/client/unversioned/clientcmd"
|
||||
"os"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type ValidateClusterOptions struct {
|
||||
|
|
|
@ -18,11 +18,12 @@ package validation
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/kubernetes/pkg/api/v1"
|
||||
"k8s.io/kubernetes/pkg/client/clientset_generated/release_1_5"
|
||||
"k8s.io/kubernetes/pkg/util/wait"
|
||||
"time"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -19,8 +19,8 @@ package validation
|
|||
import (
|
||||
"testing"
|
||||
"time"
|
||||
//k8sapi "k8s.io/kubernetes/pkg/api"
|
||||
k8sapi "k8s.io/kubernetes/pkg/api/v1"
|
||||
|
||||
"k8s.io/kubernetes/pkg/api/v1"
|
||||
"k8s.io/kubernetes/pkg/client/clientset_generated/release_1_5/fake"
|
||||
)
|
||||
|
||||
|
@ -33,7 +33,7 @@ import (
|
|||
//}
|
||||
|
||||
func TestWaitForNodeToBeReady(t *testing.T) {
|
||||
conditions := []k8sapi.NodeCondition{{Type: "Ready", Status: "True"}}
|
||||
conditions := []v1.NodeCondition{{Type: "Ready", Status: "True"}}
|
||||
nodeName := "node-foo"
|
||||
nodeAA := setupNodeAA(t, conditions, nodeName)
|
||||
|
||||
|
@ -47,7 +47,7 @@ func TestWaitForNodeToBeReady(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestWaitForNodeToBeNotReady(t *testing.T) {
|
||||
conditions := []k8sapi.NodeCondition{{Type: "Ready", Status: "False"}}
|
||||
conditions := []v1.NodeCondition{{Type: "Ready", Status: "False"}}
|
||||
nodeName := "node-foo"
|
||||
nodeAA := setupNodeAA(t, conditions, nodeName)
|
||||
|
||||
|
@ -64,11 +64,11 @@ func TestWaitForNodeToBeNotReady(t *testing.T) {
|
|||
//
|
||||
//}
|
||||
|
||||
func setupNodeAA(t *testing.T, conditions []k8sapi.NodeCondition, nodeName string) *NodeAPIAdapter {
|
||||
node := &k8sapi.Node{
|
||||
ObjectMeta: k8sapi.ObjectMeta{Name: nodeName},
|
||||
Spec: k8sapi.NodeSpec{Unschedulable: false},
|
||||
Status: k8sapi.NodeStatus{Conditions: conditions},
|
||||
func setupNodeAA(t *testing.T, conditions []v1.NodeCondition, nodeName string) *NodeAPIAdapter {
|
||||
node := &v1.Node{
|
||||
ObjectMeta: v1.ObjectMeta{Name: nodeName},
|
||||
Spec: v1.NodeSpec{Unschedulable: false},
|
||||
Status: v1.NodeStatus{Conditions: conditions},
|
||||
}
|
||||
|
||||
c := fake.NewSimpleClientset(node)
|
||||
|
|
|
@ -17,9 +17,8 @@ limitations under the License.
|
|||
package validation
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"k8s.io/kubernetes/pkg/api/resource"
|
||||
"k8s.io/kubernetes/pkg/api/v1"
|
||||
|
|
Loading…
Reference in New Issue