Skip to content

Commit

Permalink
Parse buckets key on ip range aggregation (#3446)
Browse files Browse the repository at this point in the history
as per elastic/elasticsearch#30701 

(cherry picked from commit 13867d0)
  • Loading branch information
Mpdreamz authored and russcam committed Oct 26, 2018
1 parent 37cd46a commit 4cc8fa2
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
using System;
using System.Collections.Generic;
using Elastic.Xunit.XunitPlumbing;
using FluentAssertions;
using Nest;
using Tests.Configuration;
using Tests.Core.Extensions;
using Tests.Core.ManagedElasticsearch.Clusters;
using Tests.Domain;
using Tests.Framework;
using Tests.Framework.Integration;
using Tests.Framework.ManagedElasticsearch.Clusters;
using static Nest.Infer;

namespace Tests.Aggregations.Bucket.IpRange
{
[SkipVersion("5.0.0-alpha2", "broken in this release. error reason: Expected numeric type on field [leadDeveloper.iPAddress], but got [ip]")]
public class IpRangeAggregationUsageTests : AggregationUsageTestBase
{
public IpRangeAggregationUsageTests(ReadOnlyCluster i, EndpointUsage usage) : base(i, usage) { }
Expand Down Expand Up @@ -62,7 +59,12 @@ protected override void ExpectResponse(ISearchResponse<Project> response)
ipRanges.Buckets.Should().NotBeNull();
ipRanges.Buckets.Count.Should().BeGreaterThan(0);
foreach (var range in ipRanges.Buckets)
{
if (TestConfiguration.Instance.InRange("6.4.0"))
range.Key.Should().NotBeNullOrEmpty();

range.DocCount.Should().BeGreaterThan(0);
}
}
}
}

0 comments on commit 4cc8fa2

Please sign in to comment.