fix(launcher): close Campaign LA LA1 review findings
This commit is contained in:
parent
4edc122085
commit
d511e4c348
12 changed files with 413 additions and 65 deletions
|
|
@ -234,6 +234,26 @@ public sealed class RuntimeOptionsTests
|
|||
Assert.Equal("testpassword", realValues.LivePass);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void RecordPrintMembersRedactsTheLivePassword()
|
||||
{
|
||||
RuntimeOptions options = RuntimeOptions.Parse(
|
||||
AnyDatDir,
|
||||
Env(new()
|
||||
{
|
||||
["ACDREAM_LIVE"] = "1",
|
||||
["ACDREAM_TEST_USER"] = "testaccount",
|
||||
["ACDREAM_TEST_PASS"] = "top-secret-value",
|
||||
}));
|
||||
|
||||
string printed = options.ToString();
|
||||
|
||||
Assert.DoesNotContain("top-secret-value", printed, StringComparison.Ordinal);
|
||||
Assert.Contains("LivePass = <redacted>", printed, StringComparison.Ordinal);
|
||||
Assert.Contains("LiveHost = 127.0.0.1", printed, StringComparison.Ordinal);
|
||||
Assert.Contains("HasLiveCredentials = True", printed, StringComparison.Ordinal);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void HasLiveCredentials_RequiresLiveModeAndBothUserAndPass()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue