Skip to content

Commit dc1c003

Browse files
committed
Avoid Redis Testcontainers on Windows
1 parent 78e434c commit dc1c003

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

tracer/test/Datadog.Trace.TestHelpers.AutoInstrumentation/Containers/StackExchangeRedisFixture.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
using System;
99
using System.Collections.Generic;
10+
using System.Runtime.InteropServices;
1011
using System.Threading.Tasks;
1112
using DotNet.Testcontainers.Builders;
1213
using DotNet.Testcontainers.Containers;
@@ -42,6 +43,13 @@ public override IEnumerable<KeyValuePair<string, string>> GetEnvironmentVariable
4243

4344
protected override async Task InitializeResources(Action<string, object> registerResource)
4445
{
46+
// The Redis smoke tests in this collection are skipped on Windows, where CI does not provide Docker.
47+
// Collection fixtures are initialized before test-level skips are evaluated, so avoid starting containers here.
48+
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
49+
{
50+
return;
51+
}
52+
4553
// Keep synchronized with the image version in docker-compose.yml.
4654
const string image = "redis:4-alpine";
4755

0 commit comments

Comments
 (0)