Skip to content

Commit fdd8462

Browse files
authored
test: disable metrics route creation (#562)
1 parent 677ac67 commit fdd8462

File tree

3 files changed

+18
-5
lines changed

3 files changed

+18
-5
lines changed

tests/go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,16 @@ go 1.24.0
55
toolchain go1.25.1
66

77
require (
8-
github.com/gruntwork-io/terratest v0.50.0
8+
github.com/IBM/go-sdk-core/v5 v5.21.0
99
github.com/stretchr/testify v1.11.1
10-
github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper v1.60.6
10+
github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper v1.60.9
1111
)
1212

1313
require (
1414
dario.cat/mergo v1.0.0 // indirect
1515
github.com/IBM-Cloud/bluemix-go v0.0.0-20240719075425-078fcb3a55be // indirect
1616
github.com/IBM-Cloud/power-go-client v1.12.0 // indirect
1717
github.com/IBM/cloud-databases-go-sdk v0.8.0 // indirect
18-
github.com/IBM/go-sdk-core/v5 v5.21.0 // indirect
1918
github.com/IBM/platform-services-go-sdk v0.86.1 // indirect
2019
github.com/IBM/project-go-sdk v0.3.6 // indirect
2120
github.com/IBM/schematics-go-sdk v0.4.0 // indirect
@@ -53,6 +52,7 @@ require (
5352
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect
5453
github.com/google/go-cmp v0.7.0 // indirect
5554
github.com/google/uuid v1.6.0 // indirect
55+
github.com/gruntwork-io/terratest v0.50.0 // indirect
5656
github.com/hashicorp/errwrap v1.1.0 // indirect
5757
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
5858
github.com/hashicorp/go-getter/v2 v2.2.3 // indirect

tests/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO
295295
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
296296
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
297297
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
298-
github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper v1.60.6 h1:Tr7AlrQ+s1Nc9VOwB+It8sItnDOXhfXTxKqI2KtdyFA=
299-
github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper v1.60.6/go.mod h1:YBrRYc+5y5Pr9CXmY35lOqTQdlIjA4x4+3iVObXGOCE=
298+
github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper v1.60.9 h1:ntigNnXy4Ut6eVMfBUjQ5yoIZR5Rt419+pwfle4MO5c=
299+
github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper v1.60.9/go.mod h1:YBrRYc+5y5Pr9CXmY35lOqTQdlIjA4x4+3iVObXGOCE=
300300
github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
301301
github.com/tmccombs/hcl2json v0.6.4 h1:/FWnzS9JCuyZ4MNwrG4vMrFrzRgsWEOVi+1AyYUVLGw=
302302
github.com/tmccombs/hcl2json v0.6.4/go.mod h1:+ppKlIW3H5nsAsZddXPy2iMyvld3SHxyjswOZhavRDk=

tests/pr_test.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
"os"
1212
"testing"
1313

14+
"github.com/IBM/go-sdk-core/v5/core"
1415
"github.com/stretchr/testify/assert"
1516
"github.com/stretchr/testify/require"
1617
"github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper/common"
@@ -211,6 +212,18 @@ func TestAddonDefaultConfiguration(t *testing.T) {
211212
},
212213
)
213214

215+
// Disable target / route creation to prevent hitting quota in account
216+
options.AddonConfig.Dependencies = []cloudinfo.AddonConfig{
217+
{
218+
OfferingName: "deploy-arch-ibm-cloud-monitoring",
219+
OfferingFlavor: "fully-configurable",
220+
Inputs: map[string]interface{}{
221+
"enable_metrics_routing_to_cloud_monitoring": false,
222+
},
223+
Enabled: core.BoolPtr(true),
224+
},
225+
}
226+
214227
err := options.RunAddonTest()
215228
require.NoError(t, err)
216229
}

0 commit comments

Comments
 (0)