Skip to content

Commit 91fc76e

Browse files
authored
Skip on <7.13.0 and run in intrusive operation cluster (#5648)
1 parent 71883d3 commit 91fc76e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/Tests/ClientConcepts/Connection/HttpConnectionTests.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
using HttpMethod = Elasticsearch.Net.HttpMethod;
3232
using FluentAssertions;
3333
using System.Text.RegularExpressions;
34+
using Tests.Core.Xunit;
3435
using Environment = System.Environment;
3536

3637
namespace Tests.ClientConcepts.Connection
@@ -348,11 +349,13 @@ protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage
348349
}
349350
}
350351

351-
public class HttpConnectionEnvironmentalTests : ClusterTestClassBase<ReadOnlyCluster>, IDisposable
352+
// using IntrusiveOperationCluster to avoid affecting other tests with the ENV VAR
353+
[SkipVersion("<7.13.0", "Setting only valid in 7.13.0+")]
354+
public class HttpConnectionEnvironmentalTests : ClusterTestClassBase<IntrusiveOperationCluster>, IDisposable
352355
{
353356
private readonly string _previousEnvironmentVariable;
354357

355-
public HttpConnectionEnvironmentalTests(ReadOnlyCluster cluster) : base(cluster) =>
358+
public HttpConnectionEnvironmentalTests(IntrusiveOperationCluster cluster) : base(cluster) =>
356359
_previousEnvironmentVariable = Environment.GetEnvironmentVariable(ConnectionConfiguration.ApiVersioningEnvironmentVariableName);
357360

358361
[I]
@@ -366,7 +369,6 @@ public async Task HttpClientSetsApiVersioningHeaderWhenEnabledAsTrue()
366369
responseMessage.RequestMessage.Content.Headers.ContentType.Should().NotBeNull();
367370
var contentType = responseMessage.RequestMessage.Content.Headers.ContentType.ToString();
368371
contentType.Should().Contain("compatible-with");
369-
370372
});
371373

372374
var r = connection.Request<StringResponse>(requestData);

0 commit comments

Comments
 (0)