Skip to content

Commit

Permalink
Merge branch 'master' into DeleteMoq
Browse files Browse the repository at this point in the history
  • Loading branch information
shacharPash authored Aug 14, 2023
2 parents f8f2aec + 244ebbf commit dbe0b74
Show file tree
Hide file tree
Showing 7 changed files with 247 additions and 117 deletions.
16 changes: 4 additions & 12 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
redis-stack-version: ["6.2.6-v7", "7.0.6-RC8", "edge"]
redis-stack-version: ["6.2.6-v9", "7.2.0-RC3", "edge"]
env:
USER_NAME: ${{ secrets.USER_NAME }}
PASSWORD: ${{ secrets.PASSWORD }}
Expand Down Expand Up @@ -46,22 +46,14 @@ jobs:
echo "${{secrets.REDIS_USER_CRT}}" > tests/NRedisStack.Tests/bin/Debug/net6.0/redis_user.crt
echo "${{secrets.REDIS_USER_PRIVATE_KEY}}" > tests/NRedisStack.Tests/bin/Debug/net6.0/redis_user_private.key
ls -R
if [ "$REDIS_VERSION" != "edge" ]; then
dotnet test -f net6.0 --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover --filter Category!=edge
else
dotnet test -f net6.0 --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
fi
dotnet test -f net6.0 --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
- name: Test
run: |
echo "${{secrets.REDIS_CA_PEM}}" > tests/NRedisStack.Tests/bin/Debug/net7.0/redis_ca.pem
echo "${{secrets.REDIS_USER_CRT}}" > tests/NRedisStack.Tests/bin/Debug/net7.0/redis_user.crt
echo "${{secrets.REDIS_USER_PRIVATE_KEY}}" > tests/NRedisStack.Tests/bin/Debug/net7.0/redis_user_private.key
ls -R
if [ "$REDIS_VERSION" != "edge" ]; then
dotnet test -f net7.0 --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover --filter Category!=edge
else
dotnet test -f net7.0 --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
fi
dotnet test -f net7.0 --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
- name: Codecov
uses: codecov/codecov-action@v3
with:
Expand Down Expand Up @@ -105,4 +97,4 @@ jobs:
shell: cmd
run: |
START wsl ./redis-stack-server-${{env.redis_stack_version}}/bin/redis-stack-server &
dotnet test -f net481 --no-build --verbosity normal --filter Category!=edge
dotnet test -f net481 --no-build --verbosity normal
21 changes: 7 additions & 14 deletions tests/NRedisStack.Tests/Gears/GearsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ public void Dispose()
}


[Fact]
[Trait("Category", "edge")]
[SkipIfRedisVersion(Comparison.LessThan, "7.1.242")]
public void TestTFunctionLoadDelete()
{
IDatabase db = redisFixture.Redis.GetDatabase();
Expand All @@ -25,8 +24,7 @@ public void TestTFunctionLoadDelete()
}


[Fact]
[Trait("Category", "edge")]
[SkipIfRedisVersion(Comparison.LessThan, "7.1.242")]
public async Task TestTFunctionLoadDeleteAsync()
{
IDatabase db = redisFixture.Redis.GetDatabase();
Expand All @@ -37,8 +35,7 @@ public async Task TestTFunctionLoadDeleteAsync()
Assert.True(await db.TFunctionDeleteAsync("lib"));
}

[Fact]
[Trait("Category", "edge")]
[SkipIfRedisVersion(Comparison.LessThan, "7.1.242")]
public void TestTFunctionList()
{
IDatabase db = redisFixture.Redis.GetDatabase();
Expand Down Expand Up @@ -69,8 +66,7 @@ public void TestTFunctionList()
Assert.True(db.TFunctionDelete("lib3"));
}

[Fact]
[Trait("Category", "edge")]
[SkipIfRedisVersion(Comparison.LessThan, "7.1.242")]
public async Task TestTFunctionListAsync()
{
IDatabase db = redisFixture.Redis.GetDatabase();
Expand Down Expand Up @@ -99,8 +95,7 @@ public async Task TestTFunctionListAsync()
Assert.True(await db.TFunctionDeleteAsync("lib3"));
}

[Fact]
[Trait("Category", "edge")]
[SkipIfRedisVersion(Comparison.LessThan, "7.1.242")]
public void TestTFCall()
{
IDatabase db = redisFixture.Redis.GetDatabase();
Expand All @@ -114,8 +109,7 @@ public void TestTFCall()
Assert.True(db.TFunctionDelete("lib"));
}

[Fact]
[Trait("Category", "edge")]
[SkipIfRedisVersion(Comparison.LessThan, "7.1.242")]
public async Task TestTFCallAsync()
{
IDatabase db = redisFixture.Redis.GetDatabase();
Expand All @@ -129,8 +123,7 @@ public async Task TestTFCallAsync()
Assert.True(await db.TFunctionDeleteAsync("lib"));
}

[Fact]
[Trait("Category", "edge")]
[SkipIfRedisVersion(Comparison.LessThan, "7.1.242")]
public void TestGearsCommandBuilder()
{
// TFunctionLoad:
Expand Down
Loading

0 comments on commit dbe0b74

Please sign in to comment.