diff --git a/test/OpenTelemetry.Instrumentation.SqlClient.Tests/Dockerfile b/test/OpenTelemetry.Instrumentation.SqlClient.Tests/Dockerfile deleted file mode 100644 index 1083201dec8..00000000000 --- a/test/OpenTelemetry.Instrumentation.SqlClient.Tests/Dockerfile +++ /dev/null @@ -1,22 +0,0 @@ -# Create a container for running the OpenTelemetry SQL Client integration tests. -# This should be run from the root of the repo: -# docker build --file test/OpenTelemetry.Instrumentation.SqlClient.Tests/Dockerfile . - -ARG BUILD_SDK_VERSION=7.0 -ARG TEST_SDK_VERSION=7.0 - -FROM mcr.microsoft.com/dotnet/sdk:${BUILD_SDK_VERSION} AS build -ARG PUBLISH_CONFIGURATION=Release -ARG PUBLISH_FRAMEWORK=net7.0 -WORKDIR /repo -COPY . ./ -RUN ls -la /repo -WORKDIR "/repo/test/OpenTelemetry.Instrumentation.SqlClient.Tests" -RUN dotnet publish "OpenTelemetry.Instrumentation.SqlClient.Tests.csproj" -c "${PUBLISH_CONFIGURATION}" -f "${PUBLISH_FRAMEWORK}" -o /drop -p:IntegrationBuild=true -p:TARGET_FRAMEWORK=${PUBLISH_FRAMEWORK} - -FROM mcr.microsoft.com/dotnet/sdk:${TEST_SDK_VERSION} AS final -ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.7.3/wait /wait -RUN chmod +x /wait -WORKDIR /test -COPY --from=build /drop . -ENTRYPOINT ["dotnet", "vstest", "OpenTelemetry.Instrumentation.SqlClient.Tests.dll", "--logger:console;verbosity=detailed"] diff --git a/test/OpenTelemetry.Instrumentation.SqlClient.Tests/SqlClientTests.cs b/test/OpenTelemetry.Instrumentation.SqlClient.Tests/SqlClientTests.cs index ed31af72200..b7124668b22 100644 --- a/test/OpenTelemetry.Instrumentation.SqlClient.Tests/SqlClientTests.cs +++ b/test/OpenTelemetry.Instrumentation.SqlClient.Tests/SqlClientTests.cs @@ -27,14 +27,6 @@ namespace OpenTelemetry.Instrumentation.SqlClient.Tests { public class SqlClientTests : IDisposable { - /* - To run the integration tests, set the OTEL_SQLCONNECTIONSTRING machine-level environment variable to a valid Sql Server connection string. - - To use Docker... - 1) Run: docker run -d --name sql2019 -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=Pass@word" -p 5433:1433 mcr.microsoft.com/mssql/server:2019-latest - 2) Set OTEL_SQLCONNECTIONSTRING as: Data Source=127.0.0.1,5433; User ID=sa; Password=Pass@word - */ - private const string TestConnectionString = "Data Source=(localdb)\\MSSQLLocalDB;Database=master"; private readonly FakeSqlClientDiagnosticSource fakeSqlClientDiagnosticSource; diff --git a/test/OpenTelemetry.Instrumentation.SqlClient.Tests/docker-compose.yml b/test/OpenTelemetry.Instrumentation.SqlClient.Tests/docker-compose.yml deleted file mode 100644 index 2c4b2b2763a..00000000000 --- a/test/OpenTelemetry.Instrumentation.SqlClient.Tests/docker-compose.yml +++ /dev/null @@ -1,25 +0,0 @@ -# Start a sql container and then run OpenTelemetry sql integration tests. -# This should be run from the root of the repo: -# opentelemetry>docker-compose --file=test/OpenTelemetry.Instrumentation.SqlClient.Tests/docker-compose.yml --project-directory=. up --exit-code-from=tests --build -version: '3.7' - -services: - sql: - image: mcr.microsoft.com/mssql/server:2019-latest - environment: - - ACCEPT_EULA=Y - # Note: This password is for the ephemeral sql instance running in the container used for tests. Nothing that needs to be handled securely. - - SA_PASSWORD=Pass@word18 - ports: - - "1433:1433" - - tests: - build: - context: . - dockerfile: ./test/OpenTelemetry.Instrumentation.SqlClient.Tests/Dockerfile - entrypoint: ["bash", "-c", "/wait && dotnet vstest OpenTelemetry.Instrumentation.SqlClient.Tests.dll --TestCaseFilter:CategoryName=SqlIntegrationTests"] - environment: - - OTEL_SQLCONNECTIONSTRING=Data Source=sql; User ID=sa; Password=Pass@word18 - - WAIT_HOSTS=sql:1433 - depends_on: - - sql