chore: import upstream snapshot with attribution
CodeQL / Analyze (csharp) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled

This commit is contained in:
wehub-resource-sync
2026-07-13 13:21:23 +08:00
commit b957a53def
5423 changed files with 863745 additions and 0 deletions
@@ -0,0 +1,24 @@
// Copyright (c) Microsoft. All rights reserved.
using Redis.ConformanceTests.Support;
using VectorData.ConformanceTests.ModelTests;
using VectorData.ConformanceTests.Support;
using Xunit;
namespace Redis.ConformanceTests.ModelTests;
public class RedisHashSetBasicModelTests(RedisHashSetBasicModelTests.Fixture fixture)
: BasicModelTests<string>(fixture), IClassFixture<RedisHashSetBasicModelTests.Fixture>
{
public override async Task GetAsync_with_filter_and_multiple_OrderBys()
{
var exception = await Assert.ThrowsAsync<NotSupportedException>(base.GetAsync_with_filter_and_multiple_OrderBys);
Assert.Equal("Redis does not support ordering by more than one property.", exception.Message);
}
public new class Fixture : BasicModelTests<string>.Fixture
{
public override TestStore TestStore => RedisTestStore.HashSetInstance;
}
}
@@ -0,0 +1,24 @@
// Copyright (c) Microsoft. All rights reserved.
using Redis.ConformanceTests.Support;
using VectorData.ConformanceTests.ModelTests;
using VectorData.ConformanceTests.Support;
using Xunit;
namespace Redis.ConformanceTests.ModelTests;
public class RedisHashSetDynamicModelTests(RedisHashSetDynamicModelTests.Fixture fixture)
: DynamicModelTests<string>(fixture), IClassFixture<RedisHashSetDynamicModelTests.Fixture>
{
public override async Task GetAsync_with_filter_and_multiple_OrderBys()
{
var exception = await Assert.ThrowsAsync<NotSupportedException>(base.GetAsync_with_filter_and_multiple_OrderBys);
Assert.Equal("Redis does not support ordering by more than one property.", exception.Message);
}
public new class Fixture : DynamicModelTests<string>.Fixture
{
public override TestStore TestStore => RedisTestStore.HashSetInstance;
}
}
@@ -0,0 +1,17 @@
// Copyright (c) Microsoft. All rights reserved.
using Redis.ConformanceTests.Support;
using VectorData.ConformanceTests.ModelTests;
using VectorData.ConformanceTests.Support;
using Xunit;
namespace Redis.ConformanceTests.ModelTests;
public class RedisHashSetMultiVectorModelTests(RedisHashSetMultiVectorModelTests.Fixture fixture)
: MultiVectorModelTests<string>(fixture), IClassFixture<RedisHashSetMultiVectorModelTests.Fixture>
{
public new class Fixture : MultiVectorModelTests<string>.Fixture
{
public override TestStore TestStore => RedisTestStore.HashSetInstance;
}
}
@@ -0,0 +1,34 @@
// Copyright (c) Microsoft. All rights reserved.
using Redis.ConformanceTests.Support;
using VectorData.ConformanceTests.ModelTests;
using VectorData.ConformanceTests.Support;
using Xunit;
namespace Redis.ConformanceTests.ModelTests;
public class RedisHashSetNoDataModelTests(RedisHashSetNoDataModelTests.Fixture fixture)
: NoDataModelTests<string>(fixture), IClassFixture<RedisHashSetNoDataModelTests.Fixture>
{
public override async Task GetAsync_single_record(bool includeVectors)
{
var expectedRecord = fixture.TestData[0];
var received = await this.Collection.GetAsync(expectedRecord.Key, new() { IncludeVectors = includeVectors });
if (includeVectors)
{
expectedRecord.AssertEqual(received, includeVectors, fixture.TestStore.VectorsComparable);
}
else
{
// When vectors aren't included and there's no other data, we get null back.
Assert.Null(received);
}
}
public new class Fixture : NoDataModelTests<string>.Fixture
{
public override TestStore TestStore => RedisTestStore.HashSetInstance;
}
}
@@ -0,0 +1,17 @@
// Copyright (c) Microsoft. All rights reserved.
using Redis.ConformanceTests.Support;
using VectorData.ConformanceTests.ModelTests;
using VectorData.ConformanceTests.Support;
using Xunit;
namespace Redis.ConformanceTests.ModelTests;
public class RedisHashSetNoVectorModelTests(RedisHashSetNoVectorModelTests.Fixture fixture)
: NoVectorModelTests<string>(fixture), IClassFixture<RedisHashSetNoVectorModelTests.Fixture>
{
public new class Fixture : NoVectorModelTests<string>.Fixture
{
public override TestStore TestStore => RedisTestStore.HashSetInstance;
}
}
@@ -0,0 +1,24 @@
// Copyright (c) Microsoft. All rights reserved.
using Redis.ConformanceTests.Support;
using VectorData.ConformanceTests.ModelTests;
using VectorData.ConformanceTests.Support;
using Xunit;
namespace Redis.ConformanceTests.ModelTests;
public class RedisJsonBasicModelTests(RedisJsonBasicModelTests.Fixture fixture)
: BasicModelTests<string>(fixture), IClassFixture<RedisJsonBasicModelTests.Fixture>
{
public override async Task GetAsync_with_filter_and_multiple_OrderBys()
{
var exception = await Assert.ThrowsAsync<NotSupportedException>(base.GetAsync_with_filter_and_multiple_OrderBys);
Assert.Equal("Redis does not support ordering by more than one property.", exception.Message);
}
public new class Fixture : BasicModelTests<string>.Fixture
{
public override TestStore TestStore => RedisTestStore.JsonInstance;
}
}
@@ -0,0 +1,24 @@
// Copyright (c) Microsoft. All rights reserved.
using Redis.ConformanceTests.Support;
using VectorData.ConformanceTests.ModelTests;
using VectorData.ConformanceTests.Support;
using Xunit;
namespace Redis.ConformanceTests.ModelTests;
public class RedisJsonDynamicModelTests(RedisJsonDynamicModelTests.Fixture fixture)
: DynamicModelTests<string>(fixture), IClassFixture<RedisJsonDynamicModelTests.Fixture>
{
public override async Task GetAsync_with_filter_and_multiple_OrderBys()
{
var exception = await Assert.ThrowsAsync<NotSupportedException>(base.GetAsync_with_filter_and_multiple_OrderBys);
Assert.Equal("Redis does not support ordering by more than one property.", exception.Message);
}
public new class Fixture : DynamicModelTests<string>.Fixture
{
public override TestStore TestStore => RedisTestStore.JsonInstance;
}
}
@@ -0,0 +1,17 @@
// Copyright (c) Microsoft. All rights reserved.
using Redis.ConformanceTests.Support;
using VectorData.ConformanceTests.ModelTests;
using VectorData.ConformanceTests.Support;
using Xunit;
namespace Redis.ConformanceTests.ModelTests;
public class RedisJsonMultiVectorModelTests(RedisJsonMultiVectorModelTests.Fixture fixture)
: MultiVectorModelTests<string>(fixture), IClassFixture<RedisJsonMultiVectorModelTests.Fixture>
{
public new class Fixture : MultiVectorModelTests<string>.Fixture
{
public override TestStore TestStore => RedisTestStore.JsonInstance;
}
}
@@ -0,0 +1,17 @@
// Copyright (c) Microsoft. All rights reserved.
using Redis.ConformanceTests.Support;
using VectorData.ConformanceTests.ModelTests;
using VectorData.ConformanceTests.Support;
using Xunit;
namespace Redis.ConformanceTests.ModelTests;
public class RedisJsonNoDataModelTests(RedisJsonNoDataModelTests.Fixture fixture)
: NoDataModelTests<string>(fixture), IClassFixture<RedisJsonNoDataModelTests.Fixture>
{
public new class Fixture : NoDataModelTests<string>.Fixture
{
public override TestStore TestStore => RedisTestStore.JsonInstance;
}
}
@@ -0,0 +1,17 @@
// Copyright (c) Microsoft. All rights reserved.
using Redis.ConformanceTests.Support;
using VectorData.ConformanceTests.ModelTests;
using VectorData.ConformanceTests.Support;
using Xunit;
namespace Redis.ConformanceTests.ModelTests;
public class RedisJsonNoVectorModelTests(RedisJsonNoVectorModelTests.Fixture fixture)
: NoVectorModelTests<string>(fixture), IClassFixture<RedisJsonNoVectorModelTests.Fixture>
{
public new class Fixture : NoVectorModelTests<string>.Fixture
{
public override TestStore TestStore => RedisTestStore.JsonInstance;
}
}