diff --git a/infra/modules/providers/azure/redis-cache/tests/integration/redis.go b/infra/modules/providers/azure/redis-cache/tests/integration/redis.go index 4ee328075d1037a867545ef291c3824890286fff..ba5005c993948164d312a67b82379983cb01478f 100644 --- a/infra/modules/providers/azure/redis-cache/tests/integration/redis.go +++ b/infra/modules/providers/azure/redis-cache/tests/integration/redis.go @@ -50,9 +50,16 @@ func validateMinTLSVersion(t *testing.T, minTLSVersion string) { // validateResourceGroupCaches - Validate the caches within the resource group func validateResourceGroupCacheCount(t *testing.T, caches []string, expectedCacheName string) { - expectedResourceGroupCaches := []string{expectedCacheName} + contains := false - require.Equal(t, expectedResourceGroupCaches, caches, "The provisioned caches in the RG don't match the expected result") + for _, cache := range caches { + if cache == expectedCacheName { + contains = true + break + } + } + + require.True(t, contains, "The provisioned caches in the RG don't contain the expected cache") } // InspectProvisionedCache - Runs a suite of test assertions to validate that a provisioned redis cache diff --git a/infra/templates/osdu-r3-mvp/service_resources/output.tf b/infra/templates/osdu-r3-mvp/service_resources/output.tf index 207404cb36a527906d6b8ba4ac22f4c45caed621..73234ee9e1053522d3db163c5e0eb2c73f983760 100644 --- a/infra/templates/osdu-r3-mvp/service_resources/output.tf +++ b/infra/templates/osdu-r3-mvp/service_resources/output.tf @@ -88,3 +88,21 @@ output "redis_primary_access_key" { output "redis_ssl_port" { value = module.redis_cache.ssl_port } + +output "redis_queue_name" { + description = "The name of the redis_queue" + value = module.redis_queue.name +} + +output "redis_queue_hostname" { + value = module.redis_queue.hostname +} + +output "redis_queue_primary_access_key" { + sensitive = true + value = module.redis_queue.primary_access_key +} + +output "redis_queue_ssl_port" { + value = module.redis_queue.ssl_port +} diff --git a/infra/templates/osdu-r3-mvp/service_resources/tests/integration/integration_test.go b/infra/templates/osdu-r3-mvp/service_resources/tests/integration/integration_test.go index 11598cacef9af9178607bc18df62e1cef84edc48..8b8cb84e0141f2790130291fc88119291ec14e10 100644 --- a/infra/templates/osdu-r3-mvp/service_resources/tests/integration/integration_test.go +++ b/infra/templates/osdu-r3-mvp/service_resources/tests/integration/integration_test.go @@ -39,10 +39,12 @@ func TestDataEnvironment(t *testing.T) { testFixture := infratests.IntegrationTestFixture{ GoTest: t, TfOptions: tfOptions, - ExpectedTfOutputCount: 13, + ExpectedTfOutputCount: 17, TfOutputAssertions: []infratests.TerraformOutputValidation{ redisIntegTests.InspectProvisionedCache("redis_name", "services_resource_group_name"), + redisIntegTests.InspectProvisionedCache("redis_queue_name", "services_resource_group_name"), redisIntegTests.CheckRedisWriteOperations("redis_hostname", "redis_primary_access_key", "redis_ssl_port"), + redisIntegTests.CheckRedisWriteOperations("redis_queue_hostname", "redis_queue_primary_access_key", "redis_queue_ssl_port"), appGatewayIntegTests.InspectAppGateway("services_resource_group_name", "appgw_name", "keyvault_secret_id"), }, }