Skip to content

Commit 0611575

Browse files
committed
ExpectResponse for GetTrialLicenseStatus should be dependent on how the cluster was bootstrapped
1 parent e35868b commit 0611575

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Tests/Tests/XPack/License/GetTrialLicenseStatus/GetTrialLicenseStatusApiTests.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ public GetTrialLicenseStatusApiTests(XPackCluster cluster, EndpointUsage usage)
2222
protected override bool SupportsDeserialization => false;
2323
protected override string UrlPath => $"/_xpack/license/trial_status";
2424

25+
protected bool BootstrappedWithLicense => !string.IsNullOrEmpty(Cluster.ClusterConfiguration.XPackLicenseJson);
26+
2527
protected override LazyResponses ClientUsage() => Calls(
2628
(client, f) => client.GetTrialLicenseStatus(f),
2729
(client, f) => client.GetTrialLicenseStatusAsync(f),
@@ -32,7 +34,8 @@ protected override LazyResponses ClientUsage() => Calls(
3234
protected override void ExpectResponse(IGetTrialLicenseStatusResponse response)
3335
{
3436
response.ShouldBeValid();
35-
response.EligibleToStartTrial.Should().BeFalse();
37+
// returns false if bootstrap already started the trial
38+
response.EligibleToStartTrial.Should().Be(BootstrappedWithLicense);
3639
}
3740
}
3841
}

0 commit comments

Comments
 (0)