diff --git a/dotnet/src/IntegrationTests/Connectors/Memory/Redis/RedisHashSetVectorStoreRecordCollectionTests.cs b/dotnet/src/IntegrationTests/Connectors/Memory/Redis/RedisHashSetVectorStoreRecordCollectionTests.cs index b80d85551e6d..6c980693c4bc 100644 --- a/dotnet/src/IntegrationTests/Connectors/Memory/Redis/RedisHashSetVectorStoreRecordCollectionTests.cs +++ b/dotnet/src/IntegrationTests/Connectors/Memory/Redis/RedisHashSetVectorStoreRecordCollectionTests.cs @@ -22,9 +22,12 @@ namespace SemanticKernel.IntegrationTests.Connectors.Memory.Redis; [Collection("RedisVectorStoreCollection")] public sealed class RedisHashSetVectorStoreRecordCollectionTests(ITestOutputHelper output, RedisVectorStoreFixture fixture) { + // If null, all tests will be enabled + private const string SkipReason = "Requires Redis docker container up and running"; + private const string TestCollectionName = "hashhotels"; - [Theory] + [Theory(Skip = SkipReason)] [InlineData(TestCollectionName, true)] [InlineData("nonexistentcollection", false)] public async Task CollectionExistsReturnsCollectionStateAsync(string collectionName, bool expectedExists) @@ -39,7 +42,7 @@ public async Task CollectionExistsReturnsCollectionStateAsync(string collectionN Assert.Equal(expectedExists, actual); } - [Theory] + [Theory(Skip = SkipReason)] [InlineData(true)] [InlineData(false)] public async Task ItCanCreateACollectionUpsertAndGetAsync(bool useRecordDefinition) @@ -81,7 +84,7 @@ public async Task ItCanCreateACollectionUpsertAndGetAsync(bool useRecordDefiniti output.WriteLine(getResult?.ToString()); } - [Fact] + [Fact(Skip = SkipReason)] public async Task ItCanDeleteCollectionAsync() { // Arrange @@ -101,7 +104,7 @@ public async Task ItCanDeleteCollectionAsync() Assert.False(await sut.CollectionExistsAsync()); } - [Theory] + [Theory(Skip = SkipReason)] [InlineData(true)] [InlineData(false)] public async Task ItCanUpsertDocumentToVectorStoreAsync(bool useRecordDefinition) @@ -134,7 +137,7 @@ public async Task ItCanUpsertDocumentToVectorStoreAsync(bool useRecordDefinition output.WriteLine(getResult?.ToString()); } - [Theory] + [Theory(Skip = SkipReason)] [InlineData(true)] [InlineData(false)] public async Task ItCanUpsertManyDocumentsToVectorStoreAsync(bool useRecordDefinition) @@ -171,7 +174,7 @@ public async Task ItCanUpsertManyDocumentsToVectorStoreAsync(bool useRecordDefin } } - [Theory] + [Theory(Skip = SkipReason)] [InlineData(true, true)] [InlineData(true, false)] [InlineData(false, true)] @@ -209,7 +212,7 @@ public async Task ItCanGetDocumentFromVectorStoreAsync(bool includeVectors, bool output.WriteLine(getResult?.ToString()); } - [Fact] + [Fact(Skip = SkipReason)] public async Task ItCanGetManyDocumentsFromVectorStoreAsync() { // Arrange @@ -232,7 +235,7 @@ public async Task ItCanGetManyDocumentsFromVectorStoreAsync() } } - [Theory] + [Theory(Skip = SkipReason)] [InlineData(true)] [InlineData(false)] public async Task ItCanRemoveDocumentFromVectorStoreAsync(bool useRecordDefinition) @@ -264,7 +267,7 @@ public async Task ItCanRemoveDocumentFromVectorStoreAsync(bool useRecordDefiniti Assert.Null(await sut.GetAsync("Remove-1")); } - [Fact] + [Fact(Skip = SkipReason)] public async Task ItCanRemoveManyDocumentsFromVectorStoreAsync() { // Arrange @@ -284,7 +287,7 @@ public async Task ItCanRemoveManyDocumentsFromVectorStoreAsync() Assert.Null(await sut.GetAsync("RemoveMany-3", new GetRecordOptions { IncludeVectors = true })); } - [Fact] + [Fact(Skip = SkipReason)] public async Task ItReturnsNullWhenGettingNonExistentRecordAsync() { // Arrange @@ -295,7 +298,7 @@ public async Task ItReturnsNullWhenGettingNonExistentRecordAsync() Assert.Null(await sut.GetAsync("BaseSet-5", new GetRecordOptions { IncludeVectors = true })); } - [Fact] + [Fact(Skip = SkipReason)] public async Task ItThrowsMappingExceptionForFailedMapperAsync() { // Arrange diff --git a/dotnet/src/IntegrationTests/Connectors/Memory/Redis/RedisJsonVectorStoreRecordCollectionTests.cs b/dotnet/src/IntegrationTests/Connectors/Memory/Redis/RedisJsonVectorStoreRecordCollectionTests.cs index 9e7a2fde0561..4fbd7bc5d647 100644 --- a/dotnet/src/IntegrationTests/Connectors/Memory/Redis/RedisJsonVectorStoreRecordCollectionTests.cs +++ b/dotnet/src/IntegrationTests/Connectors/Memory/Redis/RedisJsonVectorStoreRecordCollectionTests.cs @@ -22,9 +22,12 @@ namespace SemanticKernel.IntegrationTests.Connectors.Memory.Redis; [Collection("RedisVectorStoreCollection")] public sealed class RedisJsonVectorStoreRecordCollectionTests(ITestOutputHelper output, RedisVectorStoreFixture fixture) { + // If null, all tests will be enabled + private const string SkipReason = "Requires Redis docker container up and running"; + private const string TestCollectionName = "jsonhotels"; - [Theory] + [Theory(Skip = SkipReason)] [InlineData(TestCollectionName, true)] [InlineData("nonexistentcollection", false)] public async Task CollectionExistsReturnsCollectionStateAsync(string collectionName, bool expectedExists) @@ -39,7 +42,7 @@ public async Task CollectionExistsReturnsCollectionStateAsync(string collectionN Assert.Equal(expectedExists, actual); } - [Theory] + [Theory(Skip = SkipReason)] [InlineData(true)] [InlineData(false)] public async Task ItCanCreateACollectionUpsertAndGetAsync(bool useRecordDefinition) @@ -86,7 +89,7 @@ public async Task ItCanCreateACollectionUpsertAndGetAsync(bool useRecordDefiniti output.WriteLine(getResult?.ToString()); } - [Fact] + [Fact(Skip = SkipReason)] public async Task ItCanDeleteCollectionAsync() { // Arrange @@ -106,7 +109,7 @@ public async Task ItCanDeleteCollectionAsync() Assert.False(await sut.CollectionExistsAsync()); } - [Theory] + [Theory(Skip = SkipReason)] [InlineData(true)] [InlineData(false)] public async Task ItCanUpsertDocumentToVectorStoreAsync(bool useRecordDefinition) @@ -144,7 +147,7 @@ public async Task ItCanUpsertDocumentToVectorStoreAsync(bool useRecordDefinition output.WriteLine(getResult?.ToString()); } - [Theory] + [Theory(Skip = SkipReason)] [InlineData(true)] [InlineData(false)] public async Task ItCanUpsertManyDocumentsToVectorStoreAsync(bool useRecordDefinition) @@ -181,7 +184,7 @@ public async Task ItCanUpsertManyDocumentsToVectorStoreAsync(bool useRecordDefin } } - [Theory] + [Theory(Skip = SkipReason)] [InlineData(true, true)] [InlineData(true, false)] [InlineData(false, true)] @@ -223,7 +226,7 @@ public async Task ItCanGetDocumentFromVectorStoreAsync(bool includeVectors, bool output.WriteLine(getResult?.ToString()); } - [Fact] + [Fact(Skip = SkipReason)] public async Task ItCanGetManyDocumentsFromVectorStoreAsync() { // Arrange @@ -246,7 +249,7 @@ public async Task ItCanGetManyDocumentsFromVectorStoreAsync() } } - [Fact] + [Fact(Skip = SkipReason)] public async Task ItFailsToGetDocumentsWithInvalidSchemaAsync() { // Arrange. @@ -257,7 +260,7 @@ public async Task ItFailsToGetDocumentsWithInvalidSchemaAsync() await Assert.ThrowsAsync(async () => await sut.GetAsync("BaseSet-4-Invalid", new GetRecordOptions { IncludeVectors = true })); } - [Theory] + [Theory(Skip = SkipReason)] [InlineData(true)] [InlineData(false)] public async Task ItCanRemoveDocumentFromVectorStoreAsync(bool useRecordDefinition) @@ -290,7 +293,7 @@ public async Task ItCanRemoveDocumentFromVectorStoreAsync(bool useRecordDefiniti Assert.Null(await sut.GetAsync("Remove-1")); } - [Fact] + [Fact(Skip = SkipReason)] public async Task ItCanRemoveManyDocumentsFromVectorStoreAsync() { // Arrange @@ -310,7 +313,7 @@ public async Task ItCanRemoveManyDocumentsFromVectorStoreAsync() Assert.Null(await sut.GetAsync("RemoveMany-3", new GetRecordOptions { IncludeVectors = true })); } - [Fact] + [Fact(Skip = SkipReason)] public async Task ItReturnsNullWhenGettingNonExistentRecordAsync() { // Arrange @@ -321,7 +324,7 @@ public async Task ItReturnsNullWhenGettingNonExistentRecordAsync() Assert.Null(await sut.GetAsync("BaseSet-5", new GetRecordOptions { IncludeVectors = true })); } - [Fact] + [Fact(Skip = SkipReason)] public async Task ItThrowsMappingExceptionForFailedMapperAsync() { // Arrange diff --git a/dotnet/src/IntegrationTests/Connectors/Memory/Redis/RedisVectorStoreTests.cs b/dotnet/src/IntegrationTests/Connectors/Memory/Redis/RedisVectorStoreTests.cs index a6bda9559480..8e18522928eb 100644 --- a/dotnet/src/IntegrationTests/Connectors/Memory/Redis/RedisVectorStoreTests.cs +++ b/dotnet/src/IntegrationTests/Connectors/Memory/Redis/RedisVectorStoreTests.cs @@ -16,7 +16,10 @@ namespace SemanticKernel.IntegrationTests.Connectors.Memory.Redis; [Collection("RedisVectorStoreCollection")] public class RedisVectorStoreTests(ITestOutputHelper output, RedisVectorStoreFixture fixture) { - [Fact] + // If null, all tests will be enabled + private const string SkipReason = "Requires Redis docker container up and running"; + + [Fact(Skip = SkipReason)] public async Task ItCanGetAListOfExistingCollectionNamesAsync() { // Arrange