mirror of https://github.com/kubernetes/kops.git
Test for having fewer nodes than minimum count
This commit is contained in:
parent
46d885d39b
commit
df0482c6eb
|
@ -125,6 +125,22 @@ func Test_ValidateClusterMastersNotEnough(t *testing.T) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func Test_ValidateNodesNotEnough(t *testing.T) {
|
||||||
|
nodeList, err := dummyClient("true", "true").Core().Nodes().List(metav1.ListOptions{})
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("unexpected error: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
validationCluster := &ValidationCluster{NodeList: nodeList, NodesCount: 3, MastersCount: 1}
|
||||||
|
validationCluster, err = validateTheNodes("foo", validationCluster)
|
||||||
|
|
||||||
|
if err == nil {
|
||||||
|
printDebug(validationCluster)
|
||||||
|
t.Fatal("Too few nodes not caught")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func Test_ValidateNoPodFailures(t *testing.T) {
|
func Test_ValidateNoPodFailures(t *testing.T) {
|
||||||
failures, err := collectPodFailures(dummyPodClient(
|
failures, err := collectPodFailures(dummyPodClient(
|
||||||
[]map[string]string{
|
[]map[string]string{
|
||||||
|
|
Loading…
Reference in New Issue