Skip to content
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

Update trial mode warning language #1672

Merged
merged 1 commit into from
Dec 11, 2024
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 src/IdentityServer/Licensing/V2/ProtocolRequestCounter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ internal void Increment()
{
return;
}
_logger.LogError("IdentityServer has handled {total} protocol requests without a license. In future versions, unlicensed IdentityServer instances will shut down after {threshold} protocol requests. Please contact sales to obtain a license. If you are running in a test environment, please use a test license", total, Threshold);
_logger.LogError($"You are using IdentityServer in trial mode and have exceeded the trial threshold of {Threshold} requests handled by IdentityServer. In a future version, you will need to restart the server or configure a license key to continue testing. For more information, please see https://docs.duendesoftware.com/trial-mode.");
_warned = true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,6 @@ public async Task unlicensed_protocol_requests_log_a_warning()
}

_mockPipeline.MockLogger.LogMessages.Should().Contain(
$"IdentityServer has handled {threshold + 1} protocol requests without a license. In future versions, unlicensed IdentityServer instances will shut down after {threshold} protocol requests. Please contact sales to obtain a license. If you are running in a test environment, please use a test license");
$"You are using IdentityServer in trial mode and have exceeded the trial threshold of {threshold} requests handled by IdentityServer. In a future version, you will need to restart the server or configure a license key to continue testing. For more information, please see https://docs.duendesoftware.com/trial-mode.");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public void warning_is_logged_once_after_too_many_protocol_requests_are_handled(
_logger.Collector.GetSnapshot().Should()
.ContainSingle(r =>
r.Message ==
$"IdentityServer has handled {_counter.Threshold + 1} protocol requests without a license. In future versions, unlicensed IdentityServer instances will shut down after {_counter.Threshold} protocol requests. Please contact sales to obtain a license. If you are running in a test environment, please use a test license");
$"You are using IdentityServer in trial mode and have exceeded the trial threshold of {_counter.Threshold} requests handled by IdentityServer. In a future version, you will need to restart the server or configure a license key to continue testing. For more information, please see https://docs.duendesoftware.com/trial-mode.");
}

[Fact]
Expand All @@ -57,6 +57,6 @@ public void warning_is_not_logged_before_too_many_protocol_requests_are_handled(
_logger.Collector.GetSnapshot().Should()
.NotContain(r =>
r.Message ==
$"IdentityServer has handled {_counter.Threshold + 1} protocol requests without a license. In future versions, unlicensed IdentityServer instances will shut down after {_counter.Threshold} protocol requests. Please contact sales to obtain a license. If you are running in a test environment, please use a test license");
$"You are using IdentityServer in trial mode and have exceeded the trial threshold of {_counter.Threshold} requests handled by IdentityServer. In a future version, you will need to restart the server or configure a license key to continue testing. For more information, please see https://docs.duendesoftware.com/trial-mode.");
}
}
Loading