Skip to content

Commit 0612a1a

Browse files
authored
test: update addons test (#91)
1 parent ceae6cc commit 0612a1a

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

tests/pr_test.go

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"math/rand"
66
"testing"
77

8+
"github.com/IBM/go-sdk-core/v5/core"
89
"github.com/stretchr/testify/assert"
910
"github.com/stretchr/testify/require"
1011
"github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper/cloudinfo"
@@ -136,8 +137,8 @@ func TestRunAccountSettingsDA(t *testing.T) {
136137
assert.Nil(t, err, "This should not have errored")
137138
}
138139

139-
// Test deployment with all "on-by-default" dependant DAs
140-
func TestAddonDefaultConfiguration(t *testing.T) {
140+
// This DA has no "on-by-default" dependencies defined so hence testing with Account Config DA enabled
141+
func TestAddonWithAccountConfig(t *testing.T) {
141142
t.Parallel()
142143

143144
options := testaddons.TestAddonsOptionsDefault(&testaddons.TestAddonOptions{
@@ -157,6 +158,15 @@ func TestAddonDefaultConfiguration(t *testing.T) {
157158
},
158159
)
159160

161+
// Enable Account Config DA
162+
options.AddonConfig.Dependencies = []cloudinfo.AddonConfig{
163+
{
164+
OfferingName: "deploy-arch-ibm-account-infra-base",
165+
OfferingFlavor: "resource-groups-with-account-settings",
166+
Enabled: core.BoolPtr(true), // explicitly enable this dependency
167+
},
168+
}
169+
160170
err := options.RunAddonTest()
161171
require.NoError(t, err)
162172
}

0 commit comments

Comments
 (0)