Skip to content

Commit

Permalink
fix(olm): Provide correct format of kube version in CSV
Browse files Browse the repository at this point in the history
The format of kube version in CSV should be Major.Minor.Patch. For
example, 1.1.1 is correct.

Signed-off-by: Vu Dinh <vdinh@redhat.com>
  • Loading branch information
dinhxuanvu committed Jan 12, 2019
1 parent 4c91431 commit 1bad5c0
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
16 changes: 8 additions & 8 deletions pkg/controller/operators/olm/requirements_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func TestRequirementAndPermissionStatus(t *testing.T) {
description: "BadInstallStrategy",
csv: csv("csv1",
namespace,
"0.0",
"0.0.0",
"",
v1alpha1.NamedInstallStrategy{"deployment", json.RawMessage{}},
nil,
Expand All @@ -55,7 +55,7 @@ func TestRequirementAndPermissionStatus(t *testing.T) {
description: "AllPermissionsMet",
csv: csv("csv1",
namespace,
"0.0",
"0.0.0",
"",
installStrategy(
"csv1-dep",
Expand Down Expand Up @@ -186,7 +186,7 @@ func TestRequirementAndPermissionStatus(t *testing.T) {
description: "OnePermissionNotMet",
csv: csv("csv1",
namespace,
"0.0",
"0.0.0",
"",
installStrategy(
"csv1-dep",
Expand Down Expand Up @@ -317,7 +317,7 @@ func TestRequirementAndPermissionStatus(t *testing.T) {
description: "AllRequirementsMet",
csv: csv("csv1",
namespace,
"0.0",
"0.0.0",
"",
installStrategy(
"csv1-dep",
Expand Down Expand Up @@ -435,7 +435,7 @@ func TestRequirementAndPermissionStatus(t *testing.T) {
description: "RequirementNotMet/NonServedCRDVersion",
csv: csv("csv1",
namespace,
"0.0",
"0.0.0",
"",
installStrategy("csv1-dep", nil, nil),
[]*v1beta1.CustomResourceDefinition{crd("c1", "v2")},
Expand All @@ -462,7 +462,7 @@ func TestRequirementAndPermissionStatus(t *testing.T) {
description: "RequirementNotMet/NotEstablishedCRDVersion",
csv: csv("csv1",
namespace,
"0.0",
"0.0.0",
"",
installStrategy("csv1-dep", nil, nil),
[]*v1beta1.CustomResourceDefinition{crd("c1", "version-not-found")},
Expand All @@ -489,7 +489,7 @@ func TestRequirementAndPermissionStatus(t *testing.T) {
description: "RequirementNotMet/NamesConflictedCRD",
csv: csv("csv1",
namespace,
"0.0",
"0.0.0",
"",
installStrategy("csv1-dep", nil, nil),
[]*v1beta1.CustomResourceDefinition{crd("c1", "v2")},
Expand Down Expand Up @@ -522,7 +522,7 @@ func TestRequirementAndPermissionStatus(t *testing.T) {
description: "RequirementNotMet/CRDResourceInactive",
csv: csv("csv1",
namespace,
"0.0",
"0.0.0",
"",
installStrategy("csv1-dep", nil, nil),
[]*v1beta1.CustomResourceDefinition{crd("c1", "v2")},
Expand Down
24 changes: 12 additions & 12 deletions test/e2e/csv_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ func TestCreateCSVWithUnmetRequirementsMinKubeVersion(t *testing.T) {
Name: genName("csv"),
},
Spec: v1alpha1.ClusterServiceVersionSpec{
MinKubeVersion: "999.999",
MinKubeVersion: "999.999.999",
InstallModes: []v1alpha1.InstallMode{
{
Type: v1alpha1.InstallModeTypeOwnNamespace,
Expand Down Expand Up @@ -334,7 +334,7 @@ func TestCreateCSVWithUnmetRequirementsCRD(t *testing.T) {
Name: genName("csv"),
},
Spec: v1alpha1.ClusterServiceVersionSpec{
MinKubeVersion: "0.0",
MinKubeVersion: "0.0.0",
InstallModes: []v1alpha1.InstallMode{
{
Type: v1alpha1.InstallModeTypeOwnNamespace,
Expand Down Expand Up @@ -507,7 +507,7 @@ func TestCreateCSVWithUnmetRequirementsAPIService(t *testing.T) {
Name: genName("csv"),
},
Spec: v1alpha1.ClusterServiceVersionSpec{
MinKubeVersion: "0.0",
MinKubeVersion: "0.0.0",
InstallModes: []v1alpha1.InstallMode{
{
Type: v1alpha1.InstallModeTypeOwnNamespace,
Expand Down Expand Up @@ -596,7 +596,7 @@ func TestCreateCSVWithUnmetPermissionsAPIService(t *testing.T) {
Name: genName("csv"),
},
Spec: v1alpha1.ClusterServiceVersionSpec{
MinKubeVersion: "0.0",
MinKubeVersion: "0.0.0",
InstallModes: []v1alpha1.InstallMode{
{
Type: v1alpha1.InstallModeTypeOwnNamespace,
Expand Down Expand Up @@ -659,7 +659,7 @@ func TestCreateCSVWithUnmetRequirementsNativeAPI(t *testing.T) {
Name: genName("csv"),
},
Spec: v1alpha1.ClusterServiceVersionSpec{
MinKubeVersion: "0.0",
MinKubeVersion: "0.0.0",
InstallModes: []v1alpha1.InstallMode{
{
Type: v1alpha1.InstallModeTypeOwnNamespace,
Expand Down Expand Up @@ -750,7 +750,7 @@ func TestCreateCSVRequirementsMetCRD(t *testing.T) {
Name: genName("csv"),
},
Spec: v1alpha1.ClusterServiceVersionSpec{
MinKubeVersion: "0.0",
MinKubeVersion: "0.0.0",
InstallModes: []v1alpha1.InstallMode{
{
Type: v1alpha1.InstallModeTypeOwnNamespace,
Expand Down Expand Up @@ -1006,7 +1006,7 @@ func TestCreateCSVRequirementsMetAPIService(t *testing.T) {
Name: genName("csv"),
},
Spec: v1alpha1.ClusterServiceVersionSpec{
MinKubeVersion: "0.0",
MinKubeVersion: "0.0.0",
InstallModes: []v1alpha1.InstallMode{
{
Type: v1alpha1.InstallModeTypeOwnNamespace,
Expand Down Expand Up @@ -1162,7 +1162,7 @@ func TestCreateCSVWithOwnedAPIService(t *testing.T) {

csv := v1alpha1.ClusterServiceVersion{
Spec: v1alpha1.ClusterServiceVersionSpec{
MinKubeVersion: "0.0",
MinKubeVersion: "0.0.0",
InstallModes: []v1alpha1.InstallMode{
{
Type: v1alpha1.InstallModeTypeOwnNamespace,
Expand Down Expand Up @@ -1337,7 +1337,7 @@ func TestUpdateCSVSameDeploymentName(t *testing.T) {
Name: genName("csv"),
},
Spec: v1alpha1.ClusterServiceVersionSpec{
MinKubeVersion: "0.0",
MinKubeVersion: "0.0.0",
InstallModes: []v1alpha1.InstallMode{
{
Type: v1alpha1.InstallModeTypeOwnNamespace,
Expand Down Expand Up @@ -1520,7 +1520,7 @@ func TestUpdateCSVDifferentDeploymentName(t *testing.T) {
Name: genName("csv"),
},
Spec: v1alpha1.ClusterServiceVersionSpec{
MinKubeVersion: "0.0",
MinKubeVersion: "0.0.0",
InstallModes: []v1alpha1.InstallMode{
{
Type: v1alpha1.InstallModeTypeOwnNamespace,
Expand Down Expand Up @@ -1708,7 +1708,7 @@ func TestUpdateCSVMultipleIntermediates(t *testing.T) {
Name: genName("csv"),
},
Spec: v1alpha1.ClusterServiceVersionSpec{
MinKubeVersion: "0.0",
MinKubeVersion: "0.0.0",
InstallModes: []v1alpha1.InstallMode{
{
Type: v1alpha1.InstallModeTypeOwnNamespace,
Expand Down Expand Up @@ -1902,7 +1902,7 @@ func TestUpdateCSVMultipleVersionCRD(t *testing.T) {
Name: genName("csv"),
},
Spec: v1alpha1.ClusterServiceVersionSpec{
MinKubeVersion: "0.0",
MinKubeVersion: "0.0.0",
InstallModes: []v1alpha1.InstallMode{
{
Type: v1alpha1.InstallModeTypeOwnNamespace,
Expand Down

0 comments on commit 1bad5c0

Please sign in to comment.