Skip to content

Commit 6545def

Browse files
committed
Redis Functional tests fix
1 parent 1a94e84 commit 6545def

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

src/VirtualClient/VirtualClient.Actions.FunctionalTests/Redis/RedisServerProfileTests.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ namespace VirtualClient.Actions
88
using System.Linq;
99
using System.Net;
1010
using System.Runtime.InteropServices;
11+
using System.Text;
1112
using System.Threading;
1213
using System.Threading.Tasks;
1314
using Moq;
@@ -90,6 +91,10 @@ public async Task RedisMemtierWorkloadProfileExecutesTheWorkloadAsExpectedOfServ
9091
this.mockFixture.ProcessManager.OnCreateProcess = (command, arguments, workingDir) =>
9192
{
9293
IProcessProxy process = this.mockFixture.CreateProcess(command, arguments, workingDir);
94+
if (!string.IsNullOrWhiteSpace(arguments) && arguments.Contains("redis-cli INFO SERVER"))
95+
{
96+
process.StandardOutput = new ConcurrentBuffer(new StringBuilder("redis_version:7.0.15"));
97+
}
9398

9499
return process;
95100
};

src/VirtualClient/VirtualClient.Common/IProcessProxy.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public interface IProcessProxy : IDisposable
8282
/// <summary>
8383
/// Standard error stream for the process.
8484
/// </summary>
85-
ConcurrentBuffer StandardOutput { get; }
85+
ConcurrentBuffer StandardOutput { get; set; }
8686

8787
/// <summary>
8888
/// Standard input for the process.

src/VirtualClient/VirtualClient.Common/ProcessProxy.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ public ProcessDetails ProcessDetails
151151
public ConcurrentBuffer StandardError { get; }
152152

153153
/// <inheritdoc />
154-
public ConcurrentBuffer StandardOutput { get; }
154+
public ConcurrentBuffer StandardOutput { get; set; }
155155

156156
/// <inheritdoc />
157157
public StreamWriter StandardInput => this.UnderlyingProcess.StandardInput;

0 commit comments

Comments
 (0)