Steeltoe
Steeltoe copied to clipboard
Broken test for Common.Certificates
The test ConfigureCertificateOptionsTest.CertificateOptionsUpdateOnFileLocationChange contains the following line twice:
_ = changeToken.RegisterChangeCallback(_ => changeCalled = true, "state");
The second occurrence can be commented out, but the test still succeeds. Having two callbacks on the same token that execute identical logic is pointless. It doesn't prove that a change is triggered the second time.
Also, the return value of RegisterChangeCallback is disposable, so it should be wrapped in a using statement.