Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Commit

Permalink
Add test for checking order of controlplane charts
Browse files Browse the repository at this point in the history
Signed-off-by: knrt10 <kautilya@kinvolk.io>
  • Loading branch information
knrt10 committed Sep 10, 2020
1 parent 2693b2d commit 468a554
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions pkg/platform/platform_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package platform_test

import (
"reflect"
"testing"

"github.com/kinvolk/lokomotive/pkg/platform"
Expand Down Expand Up @@ -45,3 +46,19 @@ func TestAppendVersionTag(t *testing.T) {
t.Fatalf("should append version tag to existing map")
}
}

func TestCommonControlPlaneChartsOrder(t *testing.T) {
expectedOrder := []string{"pod-checkpointer", "kube-apiserver", "kubernetes", "calico", "lokomotive", "bootstrap-secrets"} //nolint:lll

commonControlPlaneCharts := platform.CommonControlPlaneCharts()

actualOrder := []string{}

for _, v := range commonControlPlaneCharts {
actualOrder = append(actualOrder, v.Name)
}

if !reflect.DeepEqual(actualOrder, expectedOrder) {
t.Fatalf("expected order: %s, got: %s", expectedOrder, actualOrder)
}
}

0 comments on commit 468a554

Please sign in to comment.