Skip to content

Commit fa8c5c8

Browse files
committed
make sure we parse the bucket key on ip range as expected now that its always returned as per elastic/elasticsearch#30701
1 parent ae973dc commit fa8c5c8

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/Tests/Tests/Aggregations/Bucket/IpRange/IpRangeAggregationUsageTests.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
11
using System;
22
using System.Collections.Generic;
3-
using Elastic.Xunit.XunitPlumbing;
43
using FluentAssertions;
54
using Nest;
5+
using Tests.Configuration;
66
using Tests.Core.Extensions;
77
using Tests.Core.ManagedElasticsearch.Clusters;
88
using Tests.Domain;
9-
using Tests.Framework;
109
using Tests.Framework.Integration;
11-
using Tests.Framework.ManagedElasticsearch.Clusters;
1210
using static Nest.Infer;
1311

1412
namespace Tests.Aggregations.Bucket.IpRange
1513
{
16-
[SkipVersion("5.0.0-alpha2", "broken in this release. error reason: Expected numeric type on field [leadDeveloper.iPAddress], but got [ip]")]
1714
public class IpRangeAggregationUsageTests : AggregationUsageTestBase
1815
{
1916
public IpRangeAggregationUsageTests(ReadOnlyCluster i, EndpointUsage usage) : base(i, usage) { }
@@ -62,7 +59,12 @@ protected override void ExpectResponse(ISearchResponse<Project> response)
6259
ipRanges.Buckets.Should().NotBeNull();
6360
ipRanges.Buckets.Count.Should().BeGreaterThan(0);
6461
foreach (var range in ipRanges.Buckets)
62+
{
63+
if (TestConfiguration.Instance.InRange("6.4.0"))
64+
range.Key.Should().NotBeNullOrEmpty();
65+
6566
range.DocCount.Should().BeGreaterThan(0);
67+
}
6668
}
6769
}
6870
}

0 commit comments

Comments
 (0)