Skip to content

Commit b96cca0

Browse files
committed
fix(deps): update DA dependencies + example / tests cleanup
1 parent e4923d1 commit b96cca0

File tree

3 files changed

+25
-43
lines changed

3 files changed

+25
-43
lines changed

ibm_catalog.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
],
8080
"optional": true,
8181
"on_by_default": false,
82-
"version": "v3.0.7"
82+
"version": "v3.0.23"
8383
},
8484
{
8585
"name": "deploy-arch-ibm-apprapp",
@@ -89,7 +89,7 @@
8989
],
9090
"catalog_id": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3",
9191
"id": "045c1169-d15a-4046-ae81-aa3d3348421f-global",
92-
"version": "v1.10.2",
92+
"version": "v1.11.2",
9393
"optional": true,
9494
"input_mapping": [
9595
{
@@ -142,7 +142,7 @@
142142
"fully-configurable"
143143
],
144144
"id": "63d8ae58-fbf3-41ce-b844-0fb5b85882ab-global",
145-
"version": "v1.6.11",
145+
"version": "v1.6.28",
146146
"optional": true,
147147
"on_by_default": true,
148148
"input_mapping": [
@@ -167,7 +167,7 @@
167167
"name": "deploy-arch-ibm-cloud-monitoring",
168168
"description": "Configure IBM Cloud Monitoring to collect the platform metrics.",
169169
"id": "73debdbf-894f-4c14-81c7-5ece3a70b67d-global",
170-
"version": "v1.6.4",
170+
"version": "v1.7.2",
171171
"flavors": [
172172
"fully-configurable"
173173
],
@@ -200,7 +200,7 @@
200200
"name": "deploy-arch-ibm-activity-tracker",
201201
"description": "Configure Activity Tracker Event Routing to route the auditing events.",
202202
"id": "918453c3-4f97-4583-8c4a-83ef12fc7916-global",
203-
"version": "v1.2.25",
203+
"version": "v1.2.34",
204204
"flavors": [
205205
"fully-configurable"
206206
],

tests/pr_test.go

Lines changed: 19 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ import (
2222
"github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper/testschematic"
2323
)
2424

25+
/*
26+
Global variables
27+
*/
2528
const resourceGroup = "geretain-test-resources"
2629
const fullyConfigurableDADir = "solutions/fully-configurable"
27-
28-
var existingResources = "./existing-resources"
29-
30-
// Define a struct with fields that match the structure of the YAML data.
3130
const yamlLocation = "../common-dev-assets/common-go-assets/common-permanent-resources.yaml"
31+
const existingResources = "./existing-resources"
32+
const terraformVersion = "terraform_v1.10" // This should match the version in the ibm_catalog.json
3233

33-
// Current supported SCC Workload Protection region
3434
var validRegions = []string{
3535
"us-south",
3636
"us-east",
@@ -43,7 +43,6 @@ var validRegions = []string{
4343
"ca-tor",
4444
"au-syd",
4545
}
46-
4746
var permanentResources map[string]interface{}
4847

4948
func TestMain(m *testing.M) {
@@ -107,9 +106,11 @@ func TestFullyConfigurable(t *testing.T) {
107106
},
108107
ResourceGroup: resourceGroup,
109108
TemplateFolder: fullyConfigurableDADir,
110-
Tags: []string{"test-schematic"},
109+
Tags: []string{"test-schematic", "scc-wp-da-fc"},
111110
DeleteWorkspaceOnFail: false,
112111
WaitJobCompleteMinutes: 60,
112+
Region: region,
113+
TerraformVersion: terraformVersion,
113114
// workaround for https://github.com/terraform-ibm-modules/terraform-ibm-scc-workload-protection/issues/243
114115
IgnoreAdds: testhelper.Exemptions{
115116
List: []string{"module.scc_wp.restapi_object.cspm"},
@@ -119,7 +120,7 @@ func TestFullyConfigurable(t *testing.T) {
119120
options.TerraformVars = []testschematic.TestSchematicTerraformVar{
120121
{Name: "ibmcloud_api_key", Value: options.RequiredEnvironmentVars["TF_VAR_ibmcloud_api_key"], DataType: "string", Secure: true},
121122
{Name: "existing_resource_group_name", Value: resourceGroup, DataType: "string"},
122-
{Name: "region", Value: region, DataType: "string"},
123+
{Name: "region", Value: options.Region, DataType: "string"},
123124
{Name: "scc_workload_protection_instance_tags", Value: options.Tags, DataType: "list(string)"},
124125
{Name: "scc_workload_protection_resource_key_tags", Value: options.Tags, DataType: "list(string)"},
125126
{Name: "scc_workload_protection_access_tags", Value: permanentResources["accessTags"], DataType: "list(string)"},
@@ -192,11 +193,14 @@ func TestFullyConfigurableUpgrade(t *testing.T) {
192193
"*.tf",
193194
fullyConfigurableDADir + "/*.tf",
194195
},
195-
ResourceGroup: resourceGroup,
196-
TemplateFolder: fullyConfigurableDADir,
197-
Tags: []string{"test-schematic"},
198-
DeleteWorkspaceOnFail: false,
199-
WaitJobCompleteMinutes: 60,
196+
ResourceGroup: resourceGroup,
197+
TemplateFolder: fullyConfigurableDADir,
198+
Tags: []string{"test-schematic"},
199+
DeleteWorkspaceOnFail: false,
200+
WaitJobCompleteMinutes: 60,
201+
CheckApplyResultForUpgrade: true,
202+
Region: region,
203+
TerraformVersion: terraformVersion,
200204
// workaround for https://github.com/terraform-ibm-modules/terraform-ibm-scc-workload-protection/issues/243
201205
IgnoreAdds: testhelper.Exemptions{
202206
List: []string{"module.scc_wp.restapi_object.cspm"},
@@ -206,7 +210,7 @@ func TestFullyConfigurableUpgrade(t *testing.T) {
206210
options.TerraformVars = []testschematic.TestSchematicTerraformVar{
207211
{Name: "ibmcloud_api_key", Value: options.RequiredEnvironmentVars["TF_VAR_ibmcloud_api_key"], DataType: "string", Secure: true},
208212
{Name: "existing_resource_group_name", Value: resourceGroup, DataType: "string"},
209-
{Name: "region", Value: region, DataType: "string"},
213+
{Name: "region", Value: options.Region, DataType: "string"},
210214
{Name: "scc_workload_protection_instance_tags", Value: options.Tags, DataType: "list(string)"},
211215
{Name: "scc_workload_protection_resource_key_tags", Value: options.Tags, DataType: "list(string)"},
212216
{Name: "scc_workload_protection_access_tags", Value: permanentResources["accessTags"], DataType: "list(string)"},
@@ -233,7 +237,7 @@ func TestFullyConfigurableUpgrade(t *testing.T) {
233237
}
234238
}
235239

236-
func TestSccWpAddonDefaultConfiguration(t *testing.T) {
240+
func TestAddonDefaultConfiguration(t *testing.T) {
237241
t.Parallel()
238242

239243
options := testaddons.TestAddonsOptionsDefault(&testaddons.TestAddonOptions{
@@ -256,25 +260,3 @@ func TestSccWpAddonDefaultConfiguration(t *testing.T) {
256260
err := options.RunAddonTest()
257261
require.NoError(t, err)
258262
}
259-
260-
// TestDependencyPermutations runs dependency permutations for SCC WP and all its dependencies
261-
func TestSccWpDependencyPermutations(t *testing.T) {
262-
// currently Permutation tests is not stable and the test wrapper framework must be updated. Skip tests for now
263-
t.Skip()
264-
t.Parallel()
265-
options := testaddons.TestAddonsOptionsDefault(&testaddons.TestAddonOptions{
266-
Testing: t,
267-
Prefix: "scc-per",
268-
AddonConfig: cloudinfo.AddonConfig{
269-
OfferingName: "deploy-arch-ibm-scc-workload-protection",
270-
OfferingFlavor: "fully-configurable",
271-
Inputs: map[string]interface{}{
272-
"prefix": "scc-per",
273-
"region": validRegions[rand.Intn(len(validRegions))],
274-
},
275-
},
276-
})
277-
278-
err := options.RunAddonPermutationTest()
279-
assert.NoError(t, err, "Dependency permutation test should not fail")
280-
}

0 commit comments

Comments
 (0)