Skip to content
Merged
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
14 changes: 12 additions & 2 deletions tests/pr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"math/rand"
"testing"

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

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

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

// Enable Account Config DA
options.AddonConfig.Dependencies = []cloudinfo.AddonConfig{
{
OfferingName: "deploy-arch-ibm-account-infra-base",
OfferingFlavor: "resource-groups-with-account-settings",
Enabled: core.BoolPtr(true), // explicitly enable this dependency
},
}

err := options.RunAddonTest()
require.NoError(t, err)
}