diff --git a/.github/actions/run-tests/action.yml b/.github/actions/run-tests/action.yml index 2fa1dd30..da0bc602 100644 --- a/.github/actions/run-tests/action.yml +++ b/.github/actions/run-tests/action.yml @@ -51,8 +51,8 @@ runs: # Mapping of redis version to stack version declare -A redis_stack_version_mapping=( - ["7.4.1"]="rs-7.4.0-v1" - ["7.2.6"]="rs-7.2.0-v13" + ["7.4.1"]="rs-7.4.0-v5" + ["7.2.6"]="rs-7.2.0-v17" ["6.2.16"]="rs-6.2.6-v17" ) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 437be795..b88904bc 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -17,7 +17,7 @@ concurrency: env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - CURRENT_REDIS_VERSION: '7.4.1' + CURRENT_REDIS_VERSION: '8.0.2' jobs: redis_version: @@ -37,7 +37,7 @@ jobs: max-parallel: 15 fail-fast: false matrix: - redis-version: [ '8.0-RC2-pre', '${{ needs.redis_version.outputs.CURRENT }}', '7.2.6', '6.2.16'] + redis-version: [ '8.2-rc2-pre', '${{ needs.redis_version.outputs.CURRENT }}', '7.4.1', '7.2.6', '6.2.16'] dotnet-version: ['6.0', '7.0', '8.0'] env: ACTIONS_ALLOW_UNSECURE_COMMANDS: true @@ -59,7 +59,7 @@ jobs: strategy: fail-fast: false matrix: - redis-stack-version: ['6.2.6-v18', '7.2.0-v14', '7.4.0-v2'] + redis-stack-version: ['6.2.6-v18', '7.2.0-v17', '7.4.0-v6'] env: redis_stack_version: ${{matrix.redis-stack-version}} USER_NAME: ${{ secrets.USER_NAME }} diff --git a/tests/NRedisStack.Tests/Core Commands/CoreTests.cs b/tests/NRedisStack.Tests/Core Commands/CoreTests.cs index 61b8ec41..f400e15b 100644 --- a/tests/NRedisStack.Tests/Core Commands/CoreTests.cs +++ b/tests/NRedisStack.Tests/Core Commands/CoreTests.cs @@ -108,9 +108,14 @@ public void TestSetInfoNull(string endpointId) int infoAfterLibNameIndex = infoAfter!.IndexOf("lib-name="); int infoBeforeLibNameIndex = infoBefore!.IndexOf("lib-name="); + int infoAfterLibVerIndex = infoAfter.IndexOf(" ", infoAfter!.IndexOf("lib-ver=")); + infoAfterLibVerIndex = infoAfterLibVerIndex == -1 ? infoAfter.Length : infoAfterLibVerIndex; + int infoBeforeLibVerIndex = infoBefore!.IndexOf(" ", infoBefore!.IndexOf("lib-ver=")); + infoBeforeLibVerIndex = infoBeforeLibVerIndex == -1 ? infoBefore.Length : infoBeforeLibVerIndex; + // Extract the sub-strings starting from "lib-name=" - string infoAfterLibNameToEnd = infoAfter.Substring(infoAfterLibNameIndex); - string infoBeforeLibNameToEnd = infoBefore.Substring(infoBeforeLibNameIndex); + string infoAfterLibNameToEnd = infoAfter.Substring(infoAfterLibNameIndex, infoAfterLibVerIndex - infoAfterLibNameIndex); + string infoBeforeLibNameToEnd = infoBefore.Substring(infoBeforeLibNameIndex, infoBeforeLibVerIndex - infoBeforeLibNameIndex); // Assert that the extracted sub-strings are equal Assert.Equal(infoAfterLibNameToEnd, infoBeforeLibNameToEnd); @@ -131,9 +136,14 @@ public async Task TestSetInfoNullAsync(string endpointId) int infoAfterLibNameIndex = infoAfter!.IndexOf("lib-name="); int infoBeforeLibNameIndex = infoBefore!.IndexOf("lib-name="); + int infoAfterLibVerIndex = infoAfter.IndexOf(" ", infoAfter!.IndexOf("lib-ver=")); + infoAfterLibVerIndex = infoAfterLibVerIndex == -1 ? infoAfter.Length : infoAfterLibVerIndex; + int infoBeforeLibVerIndex = infoBefore.IndexOf(" ", infoBefore!.IndexOf("lib-ver=")); + infoBeforeLibVerIndex = infoBeforeLibVerIndex == -1 ? infoBefore.Length : infoBeforeLibVerIndex; + // Extract the sub-strings starting from "lib-name=" - string infoAfterLibNameToEnd = infoAfter.Substring(infoAfterLibNameIndex); - string infoBeforeLibNameToEnd = infoBefore.Substring(infoBeforeLibNameIndex); + string infoAfterLibNameToEnd = infoAfter.Substring(infoAfterLibNameIndex, infoAfterLibVerIndex - infoAfterLibNameIndex); + string infoBeforeLibNameToEnd = infoBefore.Substring(infoBeforeLibNameIndex, infoBeforeLibVerIndex - infoBeforeLibNameIndex); // Assert that the extracted sub-strings are equal Assert.Equal(infoAfterLibNameToEnd, infoBeforeLibNameToEnd);