Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion installer/pkg/config/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,6 @@ func (c *Cluster) validateNodePools() []error {
}{
{pools: c.Master.NodePools, field: "master"},
{pools: c.Worker.NodePools, field: "worker"},
{pools: c.Etcd.NodePools, field: "etcd"},
}
for _, f := range fields {
var found bool
Expand Down
53 changes: 6 additions & 47 deletions installer/pkg/config/validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@ func TestMissingNodePool(t *testing.T) {
}{
{
cluster: Cluster{},
errs: 3,
errs: 2,
},
{
cluster: Cluster{
Master: Master{
NodePools: []string{"", "", ""},
},
},
errs: 3,
errs: 2,
},
{
cluster: Cluster{
Master: Master{
NodePools: []string{"master"},
},
},
errs: 2,
errs: 1,
},
{
cluster: Cluster{
Expand All @@ -42,9 +42,6 @@ func TestMissingNodePool(t *testing.T) {
Worker: Worker{
NodePools: []string{"worker"},
},
Etcd: Etcd{
NodePools: []string{"etcd"},
},
},
errs: 0,
},
Expand Down Expand Up @@ -90,9 +87,6 @@ func TestMoreThanOneNodePool(t *testing.T) {
Worker: Worker{
NodePools: []string{"worker"},
},
Etcd: Etcd{
NodePools: []string{"etcd"},
},
},
errs: 0,
},
Expand All @@ -104,9 +98,6 @@ func TestMoreThanOneNodePool(t *testing.T) {
Worker: Worker{
NodePools: []string{"worker"},
},
Etcd: Etcd{
NodePools: []string{"etcd"},
},
},
errs: 1,
},
Expand All @@ -118,11 +109,8 @@ func TestMoreThanOneNodePool(t *testing.T) {
Worker: Worker{
NodePools: []string{"worker", "worker2"},
},
Etcd: Etcd{
NodePools: []string{"etcd", "etcd2"},
},
},
errs: 3,
errs: 2,
},
}

Expand Down Expand Up @@ -166,11 +154,8 @@ func TestUnmatchedNodePool(t *testing.T) {
Worker: Worker{
NodePools: []string{"worker"},
},
Etcd: Etcd{
NodePools: []string{"etcd"},
},
},
errs: 3,
errs: 2,
},
{
cluster: Cluster{
Expand All @@ -180,9 +165,6 @@ func TestUnmatchedNodePool(t *testing.T) {
Worker: Worker{
NodePools: []string{"worker"},
},
Etcd: Etcd{
NodePools: []string{"etcd"},
},
NodePools: NodePools{
{
Name: "master",
Expand All @@ -192,10 +174,6 @@ func TestUnmatchedNodePool(t *testing.T) {
Name: "worker",
Count: 1,
},
{
Name: "etcd",
Count: 1,
},
},
},
errs: 1,
Expand All @@ -208,9 +186,6 @@ func TestUnmatchedNodePool(t *testing.T) {
Worker: Worker{
NodePools: []string{"worker"},
},
Etcd: Etcd{
NodePools: []string{"etcd"},
},
NodePools: NodePools{
{
Name: "master",
Expand All @@ -220,10 +195,6 @@ func TestUnmatchedNodePool(t *testing.T) {
Name: "worker",
Count: 1,
},
{
Name: "etcd",
Count: 1,
},
},
},
errs: 0,
Expand Down Expand Up @@ -270,9 +241,6 @@ func TestSharedNodePool(t *testing.T) {
Worker: Worker{
NodePools: []string{"shared"},
},
Etcd: Etcd{
NodePools: []string{"etcd"},
},
},
errs: 1,
},
Expand All @@ -284,9 +252,6 @@ func TestSharedNodePool(t *testing.T) {
Worker: Worker{
NodePools: []string{"shared"},
},
Etcd: Etcd{
NodePools: []string{"shared"},
},
},
errs: 1,
},
Expand All @@ -298,9 +263,6 @@ func TestSharedNodePool(t *testing.T) {
Worker: Worker{
NodePools: []string{"shared", "shared2"},
},
Etcd: Etcd{
NodePools: []string{"shared"},
},
},
errs: 2,
},
Expand All @@ -312,11 +274,8 @@ func TestSharedNodePool(t *testing.T) {
Worker: Worker{
NodePools: []string{"shared", "shared2", "shared3"},
},
Etcd: Etcd{
NodePools: []string{"shared", "shared3"},
},
},
errs: 3,
errs: 2,
},
}

Expand Down