Skip to content

Commit 27ee1ad

Browse files
authored
Fix failing tests for CLIENT INFO on 8.0 (#382)
fix failing tests for CLIENT INFO on 8.0M2
1 parent 54d894a commit 27ee1ad

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/NRedisStack.Tests/Core Commands/CoreTests.cs

+6-6
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public void TestSimpleSetInfo(string endpointId)
2525
db.ClientSetInfo(SetInfoAttr.LibraryVersion, "1.2.3");
2626

2727
var info = db.Execute("CLIENT", "INFO").ToString();
28-
Assert.EndsWith($"lib-name=TestLibraryName lib-ver=1.2.3\n", info);
28+
Assert.Contains($"lib-name=TestLibraryName lib-ver=1.2.3", info);
2929
}
3030

3131
[SkipIfRedis(Is.Enterprise, Comparison.LessThan, "7.1.242")]
@@ -38,7 +38,7 @@ public async Task TestSimpleSetInfoAsync(string endpointId)
3838
await db.ClientSetInfoAsync(SetInfoAttr.LibraryVersion, "1.2.3");
3939

4040
var info = db.Execute("CLIENT", "INFO").ToString();
41-
Assert.EndsWith($"lib-name=TestLibraryName lib-ver=1.2.3\n", info);
41+
Assert.Contains($"lib-name=TestLibraryName lib-ver=1.2.3", info);
4242
}
4343

4444
[SkipIfRedis(Is.Enterprise, Comparison.LessThan, "7.1.242")]
@@ -51,7 +51,7 @@ public void TestSetInfoDefaultValue(string endpointId)
5151
db.Execute(new SerializedCommand("PING")); // only the extension method of Execute (which is used for all the commands of Redis Stack) will set the library name and version.
5252

5353
var info = db.Execute("CLIENT", "INFO").ToString();
54-
Assert.EndsWith($"lib-name=NRedisStack(.NET_v{Environment.Version}) lib-ver={GetNRedisStackVersion()}\n", info);
54+
Assert.Contains($"lib-name=NRedisStack(.NET_v{Environment.Version}) lib-ver={GetNRedisStackVersion()}", info);
5555
}
5656

5757
[SkipIfRedis(Is.Enterprise, Comparison.LessThan, "7.1.242")]
@@ -64,7 +64,7 @@ public async Task TestSetInfoDefaultValueAsync(string endpointId)
6464
await db.ExecuteAsync(new SerializedCommand("PING")); // only the extension method of Execute (which is used for all the commands of Redis Stack) will set the library name and version.
6565

6666
var info = (await db.ExecuteAsync("CLIENT", "INFO")).ToString();
67-
Assert.EndsWith($"lib-name=NRedisStack(.NET_v{Environment.Version}) lib-ver={GetNRedisStackVersion()}\n", info);
67+
Assert.Contains($"lib-name=NRedisStack(.NET_v{Environment.Version}) lib-ver={GetNRedisStackVersion()}", info);
6868
}
6969

7070
[SkipIfRedis(Is.Enterprise, Comparison.LessThan, "7.1.242")]
@@ -77,7 +77,7 @@ public void TestSetInfoWithValue(string endpointId)
7777
db.Execute(new SerializedCommand("PING")); // only the extension method of Execute (which is used for all the commands of Redis Stack) will set the library name and version.
7878

7979
var info = db.Execute("CLIENT", "INFO").ToString();
80-
Assert.EndsWith($"NRedisStack(MyLibraryName;v1.0.0;.NET_v{Environment.Version}) lib-ver={GetNRedisStackVersion()}\n", info);
80+
Assert.Contains($"NRedisStack(MyLibraryName;v1.0.0;.NET_v{Environment.Version}) lib-ver={GetNRedisStackVersion()}", info);
8181
}
8282

8383
[SkipIfRedis(Is.Enterprise, Comparison.LessThan, "7.1.242")]
@@ -90,7 +90,7 @@ public async Task TestSetInfoWithValueAsync(string endpointId)
9090
await db.ExecuteAsync(new SerializedCommand("PING")); // only the extension method of Execute (which is used for all the commands of Redis Stack) will set the library name and version.
9191

9292
var info = (await db.ExecuteAsync("CLIENT", "INFO")).ToString();
93-
Assert.EndsWith($"NRedisStack(MyLibraryName;v1.0.0;.NET_v{Environment.Version}) lib-ver={GetNRedisStackVersion()}\n", info);
93+
Assert.Contains($"NRedisStack(MyLibraryName;v1.0.0;.NET_v{Environment.Version}) lib-ver={GetNRedisStackVersion()}", info);
9494
}
9595

9696
[SkipIfRedis(Is.Enterprise, Comparison.LessThan, "7.1.242")]

0 commit comments

Comments
 (0)