Skip to content

Commit

Permalink
Merge pull request #1672 from DuendeSoftware/joe/license-warning-lang…
Browse files Browse the repository at this point in the history
…uage

Update trial mode warning language
  • Loading branch information
josephdecock authored Dec 11, 2024
2 parents 4a1564c + ce59226 commit 5c68cf3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
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.");
}
}

0 comments on commit 5c68cf3

Please sign in to comment.