Skip to content

Commit

Permalink
.Net: Refactor: Relocate Weaviate Integration Test Files (#8290)
Browse files Browse the repository at this point in the history
### Motivation and Context

Improved organization of Weaviate integration tests by relocating
related files.

### Description

Moved WeaviateMemoryStoreTests.cs and docker-compose.yml to
Memory/Weaviate for better structure and maintainability.

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄

Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com>
  • Loading branch information
atiq-bs23 and dmytrostruk authored Aug 22, 2024
1 parent 3a79305 commit f2bc246
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using Microsoft.SemanticKernel.Memory;
using Xunit;

namespace SemanticKernel.IntegrationTests.Connectors.Weaviate;
namespace SemanticKernel.IntegrationTests.Connectors.Memory.Weaviate;

/// <summary>
/// Tests for <see cref="WeaviateMemoryStore" /> collection and upsert operations.
Expand Down Expand Up @@ -96,7 +96,7 @@ public async Task ItListsCollectionsAsync()
await this._weaviateMemoryStore.CreateCollectionAsync(collectionName);
Assert.True(await this._weaviateMemoryStore.DoesCollectionExistAsync(collectionName));

Assert.Single((await this._weaviateMemoryStore.GetCollectionsAsync().ToListAsync()));
Assert.Single(await this._weaviateMemoryStore.GetCollectionsAsync().ToListAsync());

var collectionName2 = "SK" + Guid.NewGuid();
await this._weaviateMemoryStore.CreateCollectionAsync(collectionName2);
Expand All @@ -110,17 +110,17 @@ public async Task ItDeletesCollectionAsync()
{
await this.DeleteAllClassesAsync();

Assert.Empty((await this._weaviateMemoryStore.GetCollectionsAsync().ToListAsync()));
Assert.Empty(await this._weaviateMemoryStore.GetCollectionsAsync().ToListAsync());

var collectionName = "SK" + Guid.NewGuid();
await this._weaviateMemoryStore.CreateCollectionAsync(collectionName);
Assert.True(await this._weaviateMemoryStore.DoesCollectionExistAsync(collectionName));

Assert.Single((await this._weaviateMemoryStore.GetCollectionsAsync().ToListAsync()));
Assert.Single(await this._weaviateMemoryStore.GetCollectionsAsync().ToListAsync());

await this._weaviateMemoryStore.DeleteCollectionAsync(collectionName);
Assert.False(await this._weaviateMemoryStore.DoesCollectionExistAsync(collectionName));
Assert.Empty((await this._weaviateMemoryStore.GetCollectionsAsync().ToListAsync()));
Assert.Empty(await this._weaviateMemoryStore.GetCollectionsAsync().ToListAsync());
}

[Fact(Skip = SkipReason)]
Expand Down

0 comments on commit f2bc246

Please sign in to comment.