Skip to content

Commit 31373dd

Browse files
uglideatakavci
andauthored
Update test matrix for Redis versions (#428)
* Update test matrix for Redis versions * - update to rs-7.4.0-v6 * - rs-7.4.0-v5 * - 7.4.0-v6 * - 8.2-rc2-pre * fix client info response assertions * - format --------- Co-authored-by: atakavci <[email protected]>
1 parent 54403c7 commit 31373dd

File tree

3 files changed

+19
-9
lines changed

3 files changed

+19
-9
lines changed

.github/actions/run-tests/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ runs:
5151
5252
# Mapping of redis version to stack version
5353
declare -A redis_stack_version_mapping=(
54-
["7.4.1"]="rs-7.4.0-v1"
55-
["7.2.6"]="rs-7.2.0-v13"
54+
["7.4.1"]="rs-7.4.0-v5"
55+
["7.2.6"]="rs-7.2.0-v17"
5656
["6.2.16"]="rs-6.2.6-v17"
5757
)
5858

.github/workflows/integration.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ concurrency:
1717

1818
env:
1919
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
20-
CURRENT_REDIS_VERSION: '7.4.1'
20+
CURRENT_REDIS_VERSION: '8.0.2'
2121

2222
jobs:
2323
redis_version:
@@ -37,7 +37,7 @@ jobs:
3737
max-parallel: 15
3838
fail-fast: false
3939
matrix:
40-
redis-version: [ '8.0-RC2-pre', '${{ needs.redis_version.outputs.CURRENT }}', '7.2.6', '6.2.16']
40+
redis-version: [ '8.2-rc2-pre', '${{ needs.redis_version.outputs.CURRENT }}', '7.4.1', '7.2.6', '6.2.16']
4141
dotnet-version: ['6.0', '7.0', '8.0']
4242
env:
4343
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
@@ -59,7 +59,7 @@ jobs:
5959
strategy:
6060
fail-fast: false
6161
matrix:
62-
redis-stack-version: ['6.2.6-v18', '7.2.0-v14', '7.4.0-v2']
62+
redis-stack-version: ['6.2.6-v18', '7.2.0-v17', '7.4.0-v6']
6363
env:
6464
redis_stack_version: ${{matrix.redis-stack-version}}
6565
USER_NAME: ${{ secrets.USER_NAME }}

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

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,14 @@ public void TestSetInfoNull(string endpointId)
108108
int infoAfterLibNameIndex = infoAfter!.IndexOf("lib-name=");
109109
int infoBeforeLibNameIndex = infoBefore!.IndexOf("lib-name=");
110110

111+
int infoAfterLibVerIndex = infoAfter.IndexOf(" ", infoAfter!.IndexOf("lib-ver="));
112+
infoAfterLibVerIndex = infoAfterLibVerIndex == -1 ? infoAfter.Length : infoAfterLibVerIndex;
113+
int infoBeforeLibVerIndex = infoBefore!.IndexOf(" ", infoBefore!.IndexOf("lib-ver="));
114+
infoBeforeLibVerIndex = infoBeforeLibVerIndex == -1 ? infoBefore.Length : infoBeforeLibVerIndex;
115+
111116
// Extract the sub-strings starting from "lib-name="
112-
string infoAfterLibNameToEnd = infoAfter.Substring(infoAfterLibNameIndex);
113-
string infoBeforeLibNameToEnd = infoBefore.Substring(infoBeforeLibNameIndex);
117+
string infoAfterLibNameToEnd = infoAfter.Substring(infoAfterLibNameIndex, infoAfterLibVerIndex - infoAfterLibNameIndex);
118+
string infoBeforeLibNameToEnd = infoBefore.Substring(infoBeforeLibNameIndex, infoBeforeLibVerIndex - infoBeforeLibNameIndex);
114119

115120
// Assert that the extracted sub-strings are equal
116121
Assert.Equal(infoAfterLibNameToEnd, infoBeforeLibNameToEnd);
@@ -131,9 +136,14 @@ public async Task TestSetInfoNullAsync(string endpointId)
131136
int infoAfterLibNameIndex = infoAfter!.IndexOf("lib-name=");
132137
int infoBeforeLibNameIndex = infoBefore!.IndexOf("lib-name=");
133138

139+
int infoAfterLibVerIndex = infoAfter.IndexOf(" ", infoAfter!.IndexOf("lib-ver="));
140+
infoAfterLibVerIndex = infoAfterLibVerIndex == -1 ? infoAfter.Length : infoAfterLibVerIndex;
141+
int infoBeforeLibVerIndex = infoBefore.IndexOf(" ", infoBefore!.IndexOf("lib-ver="));
142+
infoBeforeLibVerIndex = infoBeforeLibVerIndex == -1 ? infoBefore.Length : infoBeforeLibVerIndex;
143+
134144
// Extract the sub-strings starting from "lib-name="
135-
string infoAfterLibNameToEnd = infoAfter.Substring(infoAfterLibNameIndex);
136-
string infoBeforeLibNameToEnd = infoBefore.Substring(infoBeforeLibNameIndex);
145+
string infoAfterLibNameToEnd = infoAfter.Substring(infoAfterLibNameIndex, infoAfterLibVerIndex - infoAfterLibNameIndex);
146+
string infoBeforeLibNameToEnd = infoBefore.Substring(infoBeforeLibNameIndex, infoBeforeLibVerIndex - infoBeforeLibNameIndex);
137147

138148
// Assert that the extracted sub-strings are equal
139149
Assert.Equal(infoAfterLibNameToEnd, infoBeforeLibNameToEnd);

0 commit comments

Comments
 (0)