2 writes to PasswordParameter
Aspire.Hosting.Redis (2)
RedisResource.cs (2)
22PasswordParameter = password; 85PasswordParameter = password;
22 references to PasswordParameter
Aspire.Hosting.Azure.Tests (5)
AzureRedisExtensionsTests.cs (5)
105Assert.NotNull(redisResource?.PasswordParameter); 107Assert.Equal($"localhost:12455,password={redisResource.PasswordParameter.Value}", await redis.Resource.ConnectionStringExpression.GetValueAsync(CancellationToken.None)); 141Assert.NotNull(redisResource?.PasswordParameter); 198Assert.NotNull(redis.Resource.PasswordParameter); 201Assert.Equal($"localhost:12455,password={redis.Resource.PasswordParameter.Value}", await redis.Resource.GetConnectionStringAsync());
Aspire.Hosting.Redis (8)
RedisBuilderExtensions.cs (6)
96if (redis.PasswordParameter is { } password) 108if (redis.PasswordParameter is not null) 178if (redisInstance.PasswordParameter is not null) 180var password = await redisInstance.PasswordParameter.GetValueAsync(ct).ConfigureAwait(false); 244if (redisInstance.PasswordParameter is not null) 246context.EnvironmentVariables.Add($"RI_REDIS_PASSWORD{counter}", redisInstance.PasswordParameter);
RedisResource.cs (2)
44if (PasswordParameter is not null) 46builder.Append($",password={PasswordParameter}");
Aspire.Hosting.Redis.Tests (5)
AddRedisTests.cs (5)
325Assert.Equal(redis1.Resource.PasswordParameter!.Value, item.Value); 347Assert.Equal(redis2.Resource.PasswordParameter!.Value, item.Value); 504Assert.Equal($"myredis1:{redis.Resource.Name}:6379:0:{redis.Resource.PasswordParameter?.Value}", config["REDIS_HOSTS"]); 551Assert.Equal($"myredis1:{redis1.Resource.Name}:6379:0:{redis1.Resource.PasswordParameter?.Value},myredis2:myredis2:6379:0:{redis2.Resource.PasswordParameter?.Value}", config["REDIS_HOSTS"]);
Aspire.Hosting.Tests (4)
DistributedApplicationTests.cs (4)
1182Assert.Equal($"localhost:1234,password={redis.Resource.PasswordParameter?.Value}", env.Value); 1191Assert.Equal($"localhost:6379,password={redisNoPort.Resource.PasswordParameter?.Value}", otherRedisEnv.Value); 1240Assert.Equal($"localhost:1234,password={redis.Resource.PasswordParameter!.Value}", env.Value); 1249Assert.Equal($"localhost:6379,password={redisNoPort.Resource.PasswordParameter!.Value}", otherRedisEnv.Value);