Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions ibm_catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,12 @@
{
"key": "openshift_version",
"required": true,
"default_value": "4.18",
"default_value": "4.19",
"options": [
{
"displayname": "4.19",
"value": "4.19"
},
{
"displayname": "4.18",
"value": "4.18"
Expand Down Expand Up @@ -1467,9 +1471,13 @@
},
{
"key": "openshift_version",
"default_value": "4.18",
"default_value": "4.19",
"required": true,
"options": [
{
"displayname": "4.19",
"value": "4.19"
},
{
"displayname": "4.18",
"value": "4.18"
Expand Down
8 changes: 4 additions & 4 deletions tests/pr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ const resourceGroup = "geretain-test-base-ocp-vpc"
const yamlLocation = "../common-dev-assets/common-go-assets/common-permanent-resources.yaml"

// Ensure there is one test per supported OCP version
const ocpVersion1 = "4.18" // used by TestRunFullyConfigurable, TestRunUpgradeFullyConfigurable, TestFSCloudInSchematic and TestRunMultiClusterExample
const ocpVersion2 = "4.17" // used by TestCustomSGExample and TestRunCustomsgExample
const ocpVersion3 = "4.16" // used by TestRunAdvancedExample and TestCrossKmsSupportExample
const ocpVersion4 = "4.15" // used by TestRunAddRulesToSGExample and TestRunBasicExample
const ocpVersion1 = "4.19" // used by TestRunFullyConfigurable, TestRunUpgradeFullyConfigurable, TestFSCloudInSchematic and TestRunMultiClusterExample
const ocpVersion2 = "4.18" // used by TestCustomSGExample and TestRunCustomsgExample
const ocpVersion3 = "4.17" // used by TestRunAdvancedExample and TestCrossKmsSupportExample
const ocpVersion4 = "4.16" // used by TestRunAddRulesToSGExample and TestRunBasicExample
const terraformVersion = "terraform_v1.10" // This should match the version in the ibm_catalog.json

var (
Expand Down
6 changes: 4 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,10 @@ variable "worker_pools" {
(local.ocp_version_num == "4.14" && wp.operating_system == local.os_rhel) ||
(local.ocp_version_num == "4.15" && contains([local.os_rhel, local.os_rhcos], wp.operating_system)) ||
(contains(["4.16", "4.17"], local.ocp_version_num) && contains([local.os_rhel9, local.os_rhel, local.os_rhcos], wp.operating_system)) ||
(local.ocp_version_num == "4.18" && contains([local.os_rhel9, local.os_rhcos], wp.operating_system))
(local.ocp_version_num == "4.18" && contains([local.os_rhel9, local.os_rhcos], wp.operating_system)) ||
(local.ocp_version_num == "4.19" && contains([local.os_rhel9, local.os_rhcos], wp.operating_system))
])
error_message = "Invalid operating system for the given OCP version. Ensure the OS is compatible with the OCP version. Supported compatible OCP version and OS are v4.14: (REDHAT_8_64); v4.15: (REDHAT_8_64, RHCOS) ; v4.16 and v4.17: (REDHAT_8_64, RHCOS, RHEL_9_64); v4.18: (RHCOS, RHEL_9_64)"
error_message = "Invalid operating system for the given OCP version. Ensure the OS is compatible with the OCP version. Supported compatible OCP version and OS are v4.14: (REDHAT_8_64); v4.15: (REDHAT_8_64, RHCOS) ; v4.16 and v4.17: (REDHAT_8_64, RHCOS, RHEL_9_64); v4.18: (RHCOS, RHEL_9_64); v4.19: (RHEL_9_64, RHCOS)"
}

validation {
Expand Down Expand Up @@ -196,6 +197,7 @@ variable "ocp_version" {
var.ocp_version == "4.16",
var.ocp_version == "4.17",
var.ocp_version == "4.18",
var.ocp_version == "4.19",
])
error_message = "The specified ocp_version is not of the valid versions."
}
Expand Down