Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Commit

Permalink
adjusted to changes in kubernetes version list (#1707)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitsh authored and jackfrancis committed Nov 3, 2017
1 parent d3a99ce commit f2f8159
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 4 additions & 1 deletion pkg/api/orchestrators.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,10 @@ func kubernetesUpgrades(csOrch *OrchestratorProfile) ([]*OrchestratorProfile, er
nextMajor = 1
nextMinor = 8
}
for _, ver := range common.AllKubernetesSupportedVersions {
for ver, supported := range common.AllKubernetesSupportedVersions {
if !supported {
continue
}
nextVersion, err := semver.NewVersion(ver)
if err != nil {
continue
Expand Down
8 changes: 4 additions & 4 deletions pkg/api/orchestrators_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ func TestOrchestratorUpgradeInfo(t *testing.T) {
}
orch, e = GetOrchestratorVersionProfile(csOrch)
Expect(e).To(BeNil())
// 1.6.9, 1.6.11, 1.7.1, 1.7.2, 1.7.4, 1.7.5, 1.7.7, 1.7.9
Expect(len(orch.Upgrades)).To(Equal(8))
// 1.6.9, 1.6.11, 1.7.0, 1.7.1, 1.7.2, 1.7.4, 1.7.5, 1.7.7, 1.7.9
Expect(len(orch.Upgrades)).To(Equal(9))

// 1.7.0 is upgradable to 1.7.x and 1.8.x
csOrch = &OrchestratorProfile{
Expand Down Expand Up @@ -102,10 +102,10 @@ func TestOrchestratorUpgradeInfo(t *testing.T) {
// v20170930 - all orchestrators
list, e := GetOrchestratorVersionProfileListV20170930("", "")
Expect(e).To(BeNil())
Expect(len(list.Properties.Orchestrators)).To(Equal(19))
Expect(len(list.Properties.Orchestrators)).To(Equal(20))

// v20170930 - kubernetes only
list, e = GetOrchestratorVersionProfileListV20170930(common.Kubernetes, "")
Expect(e).To(BeNil())
Expect(len(list.Properties.Orchestrators)).To(Equal(14))
Expect(len(list.Properties.Orchestrators)).To(Equal(15))
}

0 comments on commit f2f8159

Please sign in to comment.