Skip to content

Commit

Permalink
Merge pull request #250 from mmulholla/oc10support
Browse files Browse the repository at this point in the history
recognize OCP v10
  • Loading branch information
mmulholla authored Mar 8, 2022
2 parents 98d046e + ae1dd58 commit fb5f4e7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/tool/kubectl.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (

// Based on https://access.redhat.com/solutions/4870701
var kubeOpenShiftVersionMap map[string]string = map[string]string{
"1.23": "4.10",
"1.22": "4.9",
"1.21": "4.8",
"1.20": "4.7",
Expand Down
6 changes: 6 additions & 0 deletions pkg/tool/kubectl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,19 @@ var output122 = version.Info{
Minor: "22",
}

var output123 = version.Info{
Major: "1",
Minor: "23",
}

var testsData []testData

func TestOCVersions(t *testing.T) {

testsData = append(testsData, testData{getVersionOut: output120, OCVersion: "4.7"})
testsData = append(testsData, testData{getVersionOut: output121, OCVersion: "4.8"})
testsData = append(testsData, testData{getVersionOut: output122, OCVersion: "4.9"})
testsData = append(testsData, testData{getVersionOut: output123, OCVersion: "4.10"})

for _, testdata := range testsData {
clientset := fake.NewSimpleClientset()
Expand Down

0 comments on commit fb5f4e7

Please sign in to comment.