diff --git a/.github/common_environment.yml b/.github/common_environment.yml index ef0aff0b0..4dce26ea9 100644 --- a/.github/common_environment.yml +++ b/.github/common_environment.yml @@ -5,5 +5,3 @@ SLACK_ICON: https://raw.githubusercontent.com/DFE-Digital/get-into-teaching-api/master/.github/image.png?size=48 SLACK_USERNAME: GiT Workflows SLACK_FOOTER: Get Into Teaching API Service - Sentry__Dsn: "" -# NB the Sentry__Dsn variable is case-sensitive diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 28af586b9..9e809153a 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -42,8 +42,6 @@ jobs: run: docker-compose up -d - name: Test - env: - Sentry__Dsn: "" run: dotnet test --no-restore --verbosity normal - name: Lint Dockerfile diff --git a/GetIntoTeachingApi/env.test b/GetIntoTeachingApi/env.test index 06a0634bd..5a18bc020 100644 --- a/GetIntoTeachingApi/env.test +++ b/GetIntoTeachingApi/env.test @@ -1,2 +1 @@ APPLY_CANDIDATE_API_URL=https://sandbox.apply-for-teacher-training.service.gov.uk/candidate-api/v1.2 -Sentry__Dsn="" diff --git a/GetIntoTeachingApiTests/Helpers/ContractTestGitWebApplicationFactory.cs b/GetIntoTeachingApiTests/Helpers/ContractTestGitWebApplicationFactory.cs index 611aa027e..f046072fc 100644 --- a/GetIntoTeachingApiTests/Helpers/ContractTestGitWebApplicationFactory.cs +++ b/GetIntoTeachingApiTests/Helpers/ContractTestGitWebApplicationFactory.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Linq; using AspNetCoreRateLimit; using GetIntoTeachingApi.Adapters; @@ -25,6 +25,8 @@ public ContractTestGitWebApplicationFactory(ContractTestState state) protected override void ConfigureWebHost(IWebHostBuilder builder) { + builder.UseSentry(dsn: ""); + builder.ConfigureServices(services => { // Use in-memory rate limit counters for tests. diff --git a/GetIntoTeachingApiTests/Helpers/GitWebApplicationFactory.cs b/GetIntoTeachingApiTests/Helpers/GitWebApplicationFactory.cs index 417249024..876473daa 100644 --- a/GetIntoTeachingApiTests/Helpers/GitWebApplicationFactory.cs +++ b/GetIntoTeachingApiTests/Helpers/GitWebApplicationFactory.cs @@ -12,6 +12,8 @@ public class GitWebApplicationFactory { protected override void ConfigureWebHost(IWebHostBuilder builder) { + builder.UseSentry(dsn: ""); + builder.ConfigureServices(services => { // Remove Redis rate limiting.