Skip to content

Commit

Permalink
Set DSN to "" in tests
Browse files Browse the repository at this point in the history
Using an env var does not work as "" is treated as NULL
  • Loading branch information
martyn-w committed May 23, 2024
1 parent 09ea274 commit 179f677
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 6 deletions.
2 changes: 0 additions & 2 deletions .github/common_environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 0 additions & 2 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion GetIntoTeachingApi/env.test
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
APPLY_CANDIDATE_API_URL=https://sandbox.apply-for-teacher-training.service.gov.uk/candidate-api/v1.2
Sentry__Dsn=""
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Linq;
using AspNetCoreRateLimit;
using GetIntoTeachingApi.Adapters;
Expand All @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions GetIntoTeachingApiTests/Helpers/GitWebApplicationFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ public class GitWebApplicationFactory<TStartup>
{
protected override void ConfigureWebHost(IWebHostBuilder builder)
{
builder.UseSentry(dsn: "");

builder.ConfigureServices(services =>
{
// Remove Redis rate limiting.
Expand Down

0 comments on commit 179f677

Please sign in to comment.