Skip to content

Commit 18ba43a

Browse files
committed
CSHARP-5594: Fix Semantic Kernel Integration Tests
1 parent be53473 commit 18ba43a

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

semantic-kernel-csharp/run.sh

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,21 @@ curl -Lfo "$DOTNET_SDK_PATH"/dotnet-install.sh https://dot.net/v1/dotnet-install
2020
echo "Installing .NET LTS SDK..."
2121
bash "$DOTNET_SDK_PATH"/dotnet-install.sh --channel 8.0 --install-dir "$DOTNET_SDK_PATH" --no-path
2222

23+
# The tests use the TestContainers.Net library which requires docker.
24+
# RHEL 8 and 9 don't support docker so we have the setup below to emulate docker with podman
25+
sudo dnf install -y docker
26+
27+
# Enable and start Podman's socket service to listen for Docker API calls
28+
sudo systemctl enable --now podman.socket
29+
30+
# Point docker commands to use the podman socket
31+
export DOCKER_HOST="unix:///run/podman/podman.sock"
32+
2333
# Set SkipReason to null to enable tests
24-
sed -i -e 's/"MongoDB Atlas cluster is required"/null/g' dotnet/src/IntegrationTests/Connectors/Memory/MongoDB/MongoDBMemoryStoreTests.cs
34+
sed -i -e 's/"The MongoDB container is intermittently timing out at startup time blocking prs, so these test should be run manually."/null/g' dotnet/src/IntegrationTests/Connectors/Memory/MongoDB/MongoDBVectorStoreRecordCollectionTests.cs
35+
36+
# Remove the attribute blocking tests so we can run them
37+
sed -i -e 's/\[DisableVectorStoreTests(Skip = "The MongoDB container is intermittently timing out at startup time blocking prs, so these test should be run manually.")\]//g' dotnet/src/IntegrationTests/Connectors/Memory/MongoDB/MongoDBVectorStoreTests.cs
2538

26-
# Run tests
27-
echo "Running MongoDBMemoryStoreTests"
28-
MongoDB__ConnectionString=$MONGODB_URI \
29-
$DOTNET_SDK_PATH/dotnet test dotnet/src/IntegrationTests/IntegrationTests.csproj --filter SemanticKernel.IntegrationTests.Connectors.MongoDB.MongoDBMemoryStoreTests
39+
echo "Running MongoDBVectorStoreTests and MongoDBVectorStoreRecordCollectionTests"
40+
sudo $DOTNET_SDK_PATH/dotnet test dotnet/src/IntegrationTests/IntegrationTests.csproj --filter "SemanticKernel.IntegrationTests.Connectors.MongoDB.MongoDBVectorStoreTests | SemanticKernel.IntegrationTests.Connectors.MongoDB.MongoDBVectorStoreRecordCollectionTests"

0 commit comments

Comments
 (0)