Skip to content

Removed flattened assertion from xpack usage tests #5696

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ci/test-matrix.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---

STACK_VERSION:
- 7.x-SNAPSHOT
- 7.13.0-SNAPSHOT

TEST_SUITE:
- free
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ [I] public void EnableDebugMode()
// hide
settings.DefaultIndex(Client.ConnectionSettings.DefaultIndex);
// hide
settings.PingTimeout(TimeSpan.FromSeconds(5)); // Avoids occasional CI failures
settings.PingTimeout(TimeSpan.FromSeconds(10)); // Avoids occasional CI failures

var client = new ElasticClient(settings);

Expand Down
16 changes: 11 additions & 5 deletions tests/Tests/XPack/Info/XPackInfoApiTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,12 @@ [I] public async Task XPackInfoResponse() => await Assert<XPackInfoResponse>(XPa
r.Features.Watcher.Should().NotBeNull();
r.License.Should().NotBeNull();

// Flattened fields were moved from x-pack to core in 7.13.0 (https://github.com/elastic/elasticsearch/pull/68780)
if (TestConfiguration.Instance.InRange(">=7.3.0") && TestConfiguration.Instance.InRange("<7.13.0"))
r.Features.Flattened.Should().NotBeNull();

if (TestConfiguration.Instance.InRange(">=7.3.0"))
{
r.Features.Flattened.Should().NotBeNull();
r.Features.Vectors.Should().NotBeNull();

if (TestConfiguration.Instance.InRange("<7.5.0"))
Expand Down Expand Up @@ -110,19 +113,22 @@ [I] public async Task XPackUsageResponse() => await Assert<XPackUsageResponse>(X
r.Alerting.Execution.Should().NotBeNull();
r.Alerting.Watch.Should().NotBeNull();

// Flattened fields were moved from x-pack to core in 7.13.0 (https://github.com/elastic/elasticsearch/pull/68780)
if (TestConfiguration.Instance.InRange(">=7.3.0") && TestConfiguration.Instance.InRange("<7.13.0"))
r.Flattened.Should().NotBeNull();

if (TestConfiguration.Instance.InRange(">=7.6.0") && TestConfiguration.Instance.InRange("<7.13.0"))
r.Flattened.FieldCount.Should().HaveValue();

if (TestConfiguration.Instance.InRange(">=7.3.0"))
{
r.Flattened.Should().NotBeNull();
r.Vectors.Should().NotBeNull();
r.VotingOnly.Should().NotBeNull();

if (TestConfiguration.Instance.InRange("<7.5.0"))
#pragma warning disable 618
r.DataFrame.Should().NotBeNull();
#pragma warning restore 618

if (TestConfiguration.Instance.InRange(">=7.6.0"))
r.Flattened.FieldCount.Should().HaveValue();
}

if (TestConfiguration.Instance.InRange(">=7.5.0"))
Expand Down