Skip to content

Commit

Permalink
feat: added support for ocp v4.16 (#532)
Browse files Browse the repository at this point in the history
  • Loading branch information
imprateeksh authored Sep 30, 2024
1 parent 90b5c26 commit 57957a0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
10 changes: 5 additions & 5 deletions tests/other_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
func TestRunBasicExample(t *testing.T) {
t.Parallel()

options := setupOptions(t, "base-ocp", basicExampleDir, ocpVersion4)
options := setupOptions(t, "base-ocp", basicExampleDir, ocpVersion5)

output, err := options.RunTestConsistency()

Expand All @@ -22,7 +22,7 @@ func TestRunBasicExample(t *testing.T) {
func TestRunCustomsgExample(t *testing.T) {
t.Parallel()

options := setupOptions(t, "base-ocp-customsg", customsgExampleDir, ocpVersion1)
options := setupOptions(t, "base-ocp-customsg", customsgExampleDir, ocpVersion2)

output, err := options.RunTestConsistency()

Expand Down Expand Up @@ -102,7 +102,7 @@ func TestRunAddRulesToSGExample(t *testing.T) {
// Do not hard fail the test if the implicit destroy steps fail to allow a full destroy of resource to occur
ImplicitRequired: false,
TerraformVars: map[string]interface{}{
"ocp_version": ocpVersion2,
"ocp_version": ocpVersion3,
},
})
output, err := options.RunTestConsistency()
Expand All @@ -128,7 +128,7 @@ func TestCustomSGExample(t *testing.T) {
// Do not hard fail the test if the implicit destroy steps fail to allow a full destroy of resource to occur
ImplicitRequired: false,
TerraformVars: map[string]interface{}{
"ocp_version": ocpVersion1,
"ocp_version": ocpVersion2,
},
})
output, err := options.RunTestConsistency()
Expand All @@ -147,7 +147,7 @@ func TestCrossKmsSupportExample(t *testing.T) {
"kms_instance_guid": permanentResources["kp_us_south_guid"],
"kms_key_id": permanentResources["kp_us_south_root_key_id"],
"kms_cross_account_id": permanentResources["ge_ops_account_id"],
"ocp_version": ocpVersion3,
"ocp_version": ocpVersion4,
},
ImplicitDestroy: []string{
// workaround for the issue https://github.ibm.com/GoldenEye/issues/issues/10743
Expand Down
13 changes: 7 additions & 6 deletions tests/pr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ const customsgExampleDir = "examples/custom_sg"
const yamlLocation = "../common-dev-assets/common-go-assets/common-permanent-resources.yaml"

// Ensure there is one test per supported OCP version
const ocpVersion1 = "4.15" // used by TestRunUpgradeAdvancedExample, TestFSCloudInSchematic and TestRunMultiClusterExample
const ocpVersion2 = "4.14" // used by TestRunAdvancedExample and TestRunAddRulesToSGExample
const ocpVersion3 = "4.13" // used by TestCrossKmsSupportExample
const ocpVersion4 = "4.12" // used by TestRunBasicExample
const ocpVersion1 = "4.16" // used by TestRunUpgradeAdvancedExample , TestFSCloudInSchematic and TestRunMultiClusterExample
const ocpVersion2 = "4.15" // used by TestCustomSGExample and TestRunCustomsgExample
const ocpVersion3 = "4.14" // used by TestRunAdvancedExample and TestRunAddRulesToSGExample
const ocpVersion4 = "4.13" // used by TestCrossKmsSupportExample
const ocpVersion5 = "4.12" // used by TestRunBasicExample

var sharedInfoSvc *cloudinfo.CloudInfoService
var permanentResources map[string]interface{}
Expand Down Expand Up @@ -74,7 +75,7 @@ func setupOptions(t *testing.T, prefix string, terraformDir string, ocpVersion s
func TestRunAdvancedExample(t *testing.T) {
t.Parallel()

options := setupOptions(t, "base-ocp-adv", advancedExampleDir, ocpVersion2)
options := setupOptions(t, "base-ocp-adv", advancedExampleDir, ocpVersion3)

output, err := options.RunTestConsistency()

Expand All @@ -85,7 +86,7 @@ func TestRunAdvancedExample(t *testing.T) {
func TestRunUpgradeAdvancedExample(t *testing.T) {
t.Parallel()

options := setupOptions(t, "base-ocp-upg", advancedExampleDir, ocpVersion1)
options := setupOptions(t, "base-ocp-upg", advancedExampleDir, ocpVersion2)

output, err := options.RunTestUpgrade()
if !options.UpgradeTestSkipped {
Expand Down
1 change: 1 addition & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ variable "ocp_version" {
var.ocp_version == "4.13",
var.ocp_version == "4.14",
var.ocp_version == "4.15",
var.ocp_version == "4.16",
])
error_message = "The specified ocp_version is not of the valid versions."
}
Expand Down

0 comments on commit 57957a0

Please sign in to comment.