Skip to content

Commit 7ceed7c

Browse files
committed
Use env var, do not setup podman
1 parent cbddd02 commit 7ceed7c

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

semantic-kernel-csharp/run.sh

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,29 @@
22

33
set -eu
44

5+
# Get the MONGODB_URI
6+
SCRIPT_DIR=$(realpath "$(dirname ${BASH_SOURCE[0]})")
7+
ROOT_DIR=$(dirname $SCRIPT_DIR)
8+
. $ROOT_DIR/env.sh
9+
510
# WORKING_DIR = $ROOT_DIR/semantic-kernel-csharp/semantic-kernel
611

712
# Install .NET
813
DOTNET_SDK_PATH=./.dotnet
914
mkdir -p "$DOTNET_SDK_PATH"
10-
1115
echo "Downloading .NET SDK installer into $DOTNET_SDK_PATH folder..."
1216
curl -Lfo "$DOTNET_SDK_PATH"/dotnet-install.sh https://dot.net/v1/dotnet-install.sh
1317
echo "Installing .NET 9.0 SDK..."
1418
bash "$DOTNET_SDK_PATH"/dotnet-install.sh --channel 9.0 --install-dir "$DOTNET_SDK_PATH" --no-path
1519
echo "Installing .NET 8.0 runtime..."
1620
bash "$DOTNET_SDK_PATH"/dotnet-install.sh --channel 8.0 --install-dir "$DOTNET_SDK_PATH" --no-path --runtime dotnet
1721

18-
# The tests use the TestContainers.Net library which requires docker.
19-
# RHEL 8 and 9 don't support docker so we have the setup below to emulate docker with podman
20-
sudo dnf install -y docker
21-
22-
# Enable and start Podman's socket service to listen for Docker API calls
23-
sudo systemctl enable --now podman.socket
24-
25-
# Point docker commands to use the podman socket
26-
export DOCKER_HOST="unix:///run/podman/podman.sock"
27-
2822
# Enable MongoDB.ConformanceTests
2923
sed -i -e '/\[assembly: DisableTests/d' dotnet/test/VectorData/MongoDB.ConformanceTests/Properties/AssemblyInfo.cs
3024

3125
# Export the MongoDB connection string
3226
export MONGODB__CONNECTIONURL=$MONGODB_URI
3327

28+
# Run tests
3429
echo "Running MongoDB.ConformanceTests"
35-
sudo $DOTNET_SDK_PATH/dotnet test dotnet/test/VectorData/MongoDB.ConformanceTests/MongoDB.ConformanceTests.csproj --framework net8.0
30+
$DOTNET_SDK_PATH/dotnet test dotnet/test/VectorData/MongoDB.ConformanceTests/MongoDB.ConformanceTests.csproj --framework net8.0

0 commit comments

Comments
 (0)